Skip to content

Commit a241512

Browse files
author
Damian Rouson
committed
update GCC version default minimum to 10.1.0
1. The GCC version can still be overriden for users who want to build OpenCoarrays with an older version by passing the -f, -c, and -C arguments or their longer equivalents. 2. Updaing the GCC version ensures co_broadcast handles derived-type arguments. 3. This commit also updates the gcc download to use git to fix the problem of ftp being present and therefore chosen as the default even though ftp access is blocked by a user's network (for security reasons).
1 parent 78fa980 commit a241512

File tree

5 files changed

+13
-25
lines changed

5 files changed

+13
-25
lines changed

install.sh-usage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-b --install-branch [arg] Install the specified repository development branch (Examples: -b trunk or -b gcc-7-branch).
1+
-b --install-branch [arg] Install the specified repository development branch (Examples: -b master).
22
-c --with-c [arg] Use specified C compiler (Example: -c /usr/local/bin/gcc).
33
-C --with-cxx [arg] Use specified C++ compiler (Example: -C /usr/local/bin/g++).
44
-d --debug Enable debug mode.

prerequisites/build-functions/set_or_print_default_version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ set_or_print_default_version()
2727
# See http://stackoverflow.com/questions/1494178/how-to-define-hash-tables-in-bash
2828
package_version=(
2929
"cmake:3.10.0"
30-
"gcc:8.3.0"
30+
"gcc:10.1.0"
3131
"mpich:3.2"
3232
"wget:1.16.3"
3333
"flex:2.6.0"

prerequisites/build-functions/set_or_print_downloader.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@ set_or_print_downloader()
77
{
88
# Verify requirements
99
[ ! -z "${arg_D}" ] && [ ! -z "${arg_p:-${arg_P:-${arg_U:-${arg_V}}}}" ] &&
10-
emergency "Please pass only one of {-B, -D, -p, -P, -U, -V} or a longer equivalent (multiple detected)."
10+
emergency "Please pass only one of {-D, -p, -P, -U, -V} or a longer equivalent (multiple detected)."
1111

1212
package_name="${arg_p:-${arg_D:-${arg_P:-${arg_U:-${arg_V}}}}}"
1313

14-
if [[ "${package_name}" == "ofp" ]]; then
14+
if [[ "${package_name}" == "gcc" ]]; then
15+
arg_b=${arg_b:-releases/gcc-${version_to_build}}
16+
elif [[ "${package_name}" == "ofp" ]]; then
1517
"${OPENCOARRAYS_SRC_DIR}/prerequisites/install-ofp.sh" "${@}"
1618
exit 0
1719
fi
1820

1921
# Choose the first available download mechanism, prioritizing first any absolute requirement
20-
# (git for gcc development branches) and second robustness:
22+
# (git for gcc) and second robustness:
2123
info "Checking available download mechanisms: ftp, wget, and curl."
2224
info "\${package_name}=${package_name} \${arg_b:-}=${arg_b:-}"
2325

@@ -26,15 +28,15 @@ set_or_print_downloader()
2628
elif type wget &> /dev/null; then
2729
gcc_prereqs_fetch=wget
2830
elif type ftp &> /dev/null; then
29-
if [[ "${package_name}" == "gcc" || "${package_name}" == "wget" || "${package_name}" == "make" ||
31+
if [[ "${package_name}" == "wget" || "${package_name}" == "make" ||
3032
"${package_name}" == "bison" || "${package_name}" == "m4" ]]; then
3133
gcc_prereqs_fetch=ftp_url
3234
fi
3335
else
3436
tried="curl, wget, and ftp"
3537
fi
3638

37-
if [[ "${package_name}" == "gcc" && ! -z "${arg_b}" ]]; then
39+
if [[ "${package_name}" == "gcc" ]]; then
3840
if type git &> /dev/null; then
3941
fetch=git
4042
else
@@ -45,7 +47,7 @@ set_or_print_downloader()
4547
fi
4648

4749
if [[ -z "${fetch:-}" ]]; then
48-
emergency "No available download mechanism. Option tried: ${tried}"
50+
emergency "No available download mechanism. Option(s) tried: ${tried}"
4951
fi
5052

5153
# If a printout of the download mechanism was requested, then print it and exit with normal status

prerequisites/build-functions/set_or_print_url.sh

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,9 @@ else
1919

2020
if [[ "${package_to_build}" == 'cmake' ]]; then
2121
major_minor="${version_to_build%.*}"
22-
elif [[ "${package_to_build}" == "gcc" ]]; then
23-
if [[ -z "${arg_b}" ]]; then
24-
gcc_url_head="https://ftpmirror.gnu.org/gcc/gcc-${version_to_build}/"
25-
else
26-
gcc_url_head="git://gcc.gnu.org/git/"
27-
fi
2822
fi
2923
package_url_head=(
30-
"gcc;${gcc_url_head-}"
24+
"gcc;https://gcc.gnu.org/git/"
3125
"wget;https://ftpmirror.gnu.org/gnu/wget/"
3226
"m4;https://ftpmirror.gnu.org/gnu/m4/"
3327
"pkg-config;https://pkgconfig.freedesktop.org/releases/"
@@ -51,15 +45,8 @@ else
5145
done
5246

5347
# Set differing tails for GCC release downloads versus development branch checkouts
54-
if [[ "${package_to_build}" == 'gcc' ]]; then
55-
if [[ "${fetch}" == 'git' ]]; then
56-
gcc_tail="gcc"
57-
else
58-
gcc_tail="gcc-${version_to_build}.tar.gz"
59-
fi
60-
fi
6148
package_url_tail=(
62-
"gcc;${gcc_tail-}"
49+
"gcc;gcc.git"
6350
"wget;wget-${version_to_build-}.tar.gz"
6451
"m4;m4-${version_to_build-}.tar.bz2"
6552
"pkg-config;pkg-config-${version_to_build-}.tar.gz"

prerequisites/build.sh-usage

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
-b --install-branch [arg] Install the specified repository development branch.
2-
-B --list-branches [arg] List the available branches in the specified package's repository.
1+
-b --install-branch [arg] Install the specified repository development branch (Examples: -b master).
32
-c --with-c [arg] Use the specified C compiler. Default="gcc"
43
-C --with-cxx [arg] Use the specified C++ compiler. Default="g++"
54
-d --debug Enable debug mode.

0 commit comments

Comments
 (0)