diff options
author | lns <matzeton@googlemail.com> | 2019-06-16 10:35:18 +0200 |
---|---|---|
committer | lns <matzeton@googlemail.com> | 2019-06-16 10:35:18 +0200 |
commit | 2aa5b5ab9d6e7b50dd74429b1da8b6bbfcecf758 (patch) | |
tree | 1692c51b9e560c7b0cb88c8b3a088bc1ec395a2b /build-gcc.sh | |
parent | 4730ee9fac66a286675a8c539fa119d2da2d7c27 (diff) | |
parent | 0c603d8a85f9f9d45aa0b97e7dcce72539b9c45b (diff) |
Merge branch 'master' of https://github.com/lnslbrty/foo-scripts
Diffstat (limited to 'build-gcc.sh')
-rwxr-xr-x | build-gcc.sh | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/build-gcc.sh b/build-gcc.sh index 8369448..2d77d80 100755 --- a/build-gcc.sh +++ b/build-gcc.sh @@ -10,6 +10,16 @@ set -x #or #GCC_VERSION="4.4.2" #BINUTILS_VERSION="2.25" +#or +#GCC_VERSION="4.9.4" +#BINUTILS_VERSION="2.27" + +if [ ! -x /usr/bin/wget -o ! -x /usr/bin/whiptail ]; then + echo "${0}: missing wget/whiptail" + echo "${0}: On Debian: \`sudo apt install wget whiptail\`" + echo "${0}: On ArchLinux: \`sudo pacman -S wget libnewt\`" + exit 1 +fi BIN_DLSITE="https://ftp.gnu.org/gnu/binutils" GCC_DLSITE="https://mirrors-usa.go-parts.com/gcc/releases" @@ -27,6 +37,14 @@ GCC_MENU=$(echo "${GCC_CONTENT}" | sed -n 's/^"gcc-\(.*\)\/"$/\1 gcc-\1/p') GCC_VERSION=$(whiptail --menu 'choose gcc version' 35 55 25 ${GCC_MENU} 3>&1 1>&2 2>&3) echo "gcc: ${GCC_VERSION}" +# enable multilib? +MULTILIB_ENABLE=$(whiptail --clear --menu 'enable multilib? (requires libc-dev:i386 as well as libc-dev:amd64)' 15 35 5 y yes n no 3>&1 1>&2 2>&3) +if [ x"${MULTILIB_ENABLE}" = x'y' ]; then + MULTILIB_ARG="--enable-multilib" +else + MULTILIB_ARG="--disable-multilib" +fi + # build gccgo? GCCGO_ENABLE=$(whiptail --clear --menu 'build gccgo?' 15 35 5 y yes n no 3>&1 1>&2 2>&3) if [ x"${GCCGO_ENABLE}" = x'y' ]; then @@ -132,7 +150,7 @@ cd ${BIN_BUILD} # build binutils ../binutils-${BINUTILS_VERSION}/configure \ ${MULTIARCH} \ - --disable-multilib \ + ${MULTILIB_ARG} \ --prefix=${INSTALLDIR} \ --disable-nls \ ${GCCGO_BIN} \ @@ -153,7 +171,7 @@ cd ../${GCC_BUILD} --enable-__cxa_atexit \ --enable-clocale=gnu \ --enable-languages=c,c++${GCCGO_GCC} \ - --disable-multilib \ + ${MULTILIB_ARG} \ --with-system-zlib \ ${GCCGO_BIN} \ --enable-lto \ |