Skip to content

Commit ef8069d

Browse files
Merge pull request #730 from sourceryinstitute/download-gcc-release-tar-balls
feat(install.sh): download GCC release tar balls
2 parents 5c4bd62 + 02dce3e commit ef8069d

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

prerequisites/build-functions/set_or_print_downloader.sh

+2-4
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ set_or_print_downloader()
1111

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

14-
if [[ "${package_name}" == "gcc" ]]; then
15-
arg_b=${arg_b:-releases/gcc-${version_to_build}}
16-
elif [[ "${package_name}" == "ofp" ]]; then
14+
if [[ "${package_name}" == "ofp" ]]; then
1715
"${OPENCOARRAYS_SRC_DIR}/prerequisites/install-ofp.sh" "${@}"
1816
exit 0
1917
fi
@@ -36,7 +34,7 @@ set_or_print_downloader()
3634
tried="curl, wget, and ftp"
3735
fi
3836

39-
if [[ "${package_name}" == "gcc" ]]; then
37+
if [[ "${package_name}" == "gcc" && ! -z ${arg_b:-} ]]; then
4038
if type git &> /dev/null; then
4139
fetch=git
4240
else

prerequisites/build-functions/set_or_print_url.sh

+9-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ else
2121
major_minor="${version_to_build%.*}"
2222
fi
2323
package_url_head=(
24-
"gcc;https://gcc.gnu.org/git/"
24+
"gcc;https://ftp.gnu.org/gnu/gcc/gcc-${version_to_build-}/"
2525
"wget;https://ftpmirror.gnu.org/gnu/wget/"
2626
"m4;https://ftpmirror.gnu.org/gnu/m4/"
2727
"pkg-config;https://pkgconfig.freedesktop.org/releases/"
@@ -44,9 +44,13 @@ else
4444
fi
4545
done
4646

47+
if [[ ! -z ${arg_b:-} && ${package_to_build} == 'gcc' ]]; then
48+
url_head="https://gcc.gnu.org/git/"
49+
fi
50+
4751
# Set differing tails for GCC release downloads versus development branch checkouts
4852
package_url_tail=(
49-
"gcc;gcc"
53+
"gcc;gcc-${version_to_build-}.tar.gz"
5054
"wget;wget-${version_to_build-}.tar.gz"
5155
"m4;m4-${version_to_build-}.tar.bz2"
5256
"pkg-config;pkg-config-${version_to_build-}.tar.gz"
@@ -71,6 +75,9 @@ else
7175
fi
7276
done
7377

78+
if [[ ! -z ${arg_b:-} && ${package_to_build} == 'gcc' ]]; then
79+
url_tail="gcc"
80+
fi
7481

7582
if [[ -z "${url_head:-}" || -z "${url_tail}" ]]; then
7683
emergency "Package ${package_name:-} not recognized. Use --l or --list-packages to list the allowable names."

0 commit comments

Comments
 (0)