Skip to content

Commit 9d6c8b9

Browse files
author
Damian Rouson
committed
Default GCC build to make --disable-bootstrap
Replace install.sh/build.sh arguments -z/--disable-bootstrap with -Z/--bootstrap.
1 parent 75b4060 commit 9d6c8b9

File tree

5 files changed

+14
-9
lines changed

5 files changed

+14
-9
lines changed

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ info "-U (--print-url): ${arg_U}"
169169
info "-v (--version): ${arg_v}"
170170
info "-V (--print-version): ${arg_V}"
171171
info "-y (--yes-to-all): ${arg_y}"
172-
info "-z (--disable-bootstrap):${arg_z}"
172+
info "-Z (--bootstrap): ${arg_Z}"
173173
}
174174
# This file is organized into three sections:
175175
# 1. Command-line argument and environment variable processing.

install.sh-usage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
-v --version Print OpenCoarrays version number.
2323
-V --print-version [arg] Print version number for specified package (Example: -V mpich).
2424
-y --yes-to-all Build non-interactively by assuming affirmative user responses.
25-
-z --disable-bootstrap Disabling bootstrap build of GCC for speed when a recent GCC is already installed.
25+
-Z --bootstrap Enable bootstrap build for robustness when building the required GCC version with an old GCC version.

prerequisites/build.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,15 @@ info "-l (--list-packages): ${arg_l} "
103103
info "-m (--with-cmake): ${arg_m} "
104104
info "-M (--with-mpi): ${arg_M} "
105105
info "-n (--no-color): ${arg_n} "
106-
info "-p (--package): ${arg_p}"
106+
info "-p (--package): ${arg_p} "
107107
info "-P (--print-path): ${arg_P} "
108108
info "-t (--with-tau): ${arg_t} "
109109
info "-u (--from-url): ${arg_u} "
110110
info "-U (--print-url): ${arg_U} "
111111
info "-v (--version): ${arg_v} "
112112
info "-V (--print-version): ${arg_V} "
113113
info "-y (--yes-to-all): ${arg_y} "
114-
info "-z (--disable-bootstrap):${arg_z} "
114+
info "-Z (--bootstrap): ${arg_Z} "
115115
}
116116

117117
if [[ -z "${arg_B}" ]]; then
@@ -148,8 +148,9 @@ if [[ ${arg_o:-} == "${__flag_present}" ]]; then
148148
exit 0
149149
fi
150150

151-
# If -z or --disable-bootstrap was specified, disable bootstrap configure & build
152-
if [[ ${arg_z:-} == "${__flag_present}" ]]; then
151+
# If -Z or --bootstrap was specified, enable bootstrap configure & build
152+
if [[ ${arg_Z:-} != "${__flag_present}" ]]; then
153+
info "Disabling bootstrap. If the gcc/g++/gfortran build fails, try './install.sh --bootstrap'."
153154
export bootstrap_configure="--disable-bootstrap"
154155
export bootstrap_build=""
155156
else

prerequisites/build.sh-usage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@
2424
-v --version Print OpenCoarrays version number.
2525
-V --print-version [arg] Print installation version for package specified in argument.
2626
-y --yes-to-all Build non-interactively by assuming affirmative user responses.
27-
-z --disable-bootstrap Disabling bootstrap build of GCC for speed when a recent GCC is already installed.
27+
-Z --bootstrap Enable bootstrap build for robustness when building the required GCC version with an old GCC version.

prerequisites/install-functions/find_or_install.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,9 +599,13 @@ find_or_install()
599599
yes_to_all="-y"
600600
fi
601601

602+
if [[ "${arg_Z}" == "${__flag_present}" ]]; then
603+
bootstrap="-Z"
604+
fi
605+
602606
echo -e "$this_script: Downloading, building, and installing $package \n"
603-
echo "$this_script: Build command: FC=$FC CC=$CC CXX=$CXX ./build.sh -p $package -i $package_install_prefix -j $num_threads ${yes_to_all:-}"
604-
FC="$FC" CC="$CC" CXX="$CXX" ./build.sh -p "$package" -i "$package_install_prefix" -j "$num_threads" "${yes_to_all:-}"
607+
echo "$this_script: Build command: FC=$FC CC=$CC CXX=$CXX ./build.sh -p $package -i $package_install_prefix -j $num_threads ${yes_to_all:-} ${bootstrap:-}"
608+
FC="$FC" CC="$CC" CXX="$CXX" ./build.sh -p "$package" -i "$package_install_prefix" -j "$num_threads" "${yes_to_all:-}" "${bootstrap:-}"
605609

606610
if [[ -x "$package_install_path/bin/$executable" ]]; then
607611
echo -e "$this_script: Installation successful.\n"

0 commit comments

Comments
 (0)