forked from Lephenixnoir/sh-elf-gcc
update configure.sh
This commit is contained in:
parent
0f691fb916
commit
0e9ffdd1b2
30
configure.sh
30
configure.sh
|
@ -72,13 +72,14 @@ ln -sf $(command -v sh-elf-as) sh3eb-elf/bin/as
|
|||
ln -sf $(command -v sh-elf-ld) sh3eb-elf/bin/ld
|
||||
ln -sf $(command -v sh-elf-ar) sh3eb-elf/bin/ar
|
||||
ln -sf $(command -v sh-elf-ranlib) sh3eb-elf/bin/ranlib
|
||||
ln -sf $(command -v sh-elf-nm) sh3eb-elf/bin/ranlib
|
||||
|
||||
cd build
|
||||
|
||||
echo "$TAG Configuring gcc..."
|
||||
|
||||
|
||||
if command -v termux-setup-storage >/dev/null 2>&1; then
|
||||
|
||||
# Android 5.0 and later only support position-independent executables (-fPIE)
|
||||
sed -i -e's/NO_PIE_FLAG="-no-pie"/NO_PIE_FLAG="-pie"/g' -e's/NO_PIE_CFLAGS="-fno-PIE"/NO_PIE_CFLAGS="-fPIC"/g' ../gcc-$VERSION/gcc/configure
|
||||
|
||||
|
@ -90,19 +91,16 @@ if command -v termux-setup-storage >/dev/null 2>&1; then
|
|||
# * https://github.com/termux/termux-packages/issues/6176
|
||||
# * https://github.com/termux/termux-packages/issues/2469
|
||||
|
||||
run_quietly giteapc-configure.log \
|
||||
../gcc-$VERSION/configure --prefix="$PREFIX" --target=sh3eb-elf --with-multilib-list=m3,m4-nofpu --enable-languages=c,c++ --without-headers --with-newlib --program-prefix=sh-elf- --enable-libssp --enable-lto CFLAGS="-D__ANDROID_API__=$(getprop ro.build.version.sdk) -g -O2" CXXFLAGS="-D__ANDROID_API__=$(getprop ro.build.version.sdk) -g -O2"
|
||||
|
||||
else
|
||||
|
||||
# OpenBSD apparently installs these in /usr/local
|
||||
if [[ $(uname) == "OpenBSD" ]]; then
|
||||
extra_args="--with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local"
|
||||
else
|
||||
extra_args=
|
||||
fi
|
||||
|
||||
run_quietly giteapc-configure.log \
|
||||
../gcc-$VERSION/configure --prefix="$PREFIX" --target=sh3eb-elf --with-multilib-list=m3,m4-nofpu --enable-languages=c,c++ --without-headers --with-newlib --program-prefix=sh-elf- --enable-libssp --enable-lto $extra_args
|
||||
|
||||
export CFLAGS="-D__ANDROID_API__=$(getprop ro.build.version.sdk) -g -O2" \
|
||||
CXXFLAGS="-D__ANDROID_API__=$(getprop ro.build.version.sdk) -g -O2"
|
||||
fi
|
||||
|
||||
# OpenBSD apparently installs these in /usr/local
|
||||
if [[ $(uname) == "OpenBSD" ]]; then
|
||||
extra_args="--with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local"
|
||||
else
|
||||
extra_args=
|
||||
fi
|
||||
|
||||
run_quietly giteapc-configure.log \
|
||||
../gcc-$VERSION/configure --prefix="$PREFIX" --target=sh3eb-elf --with-multilib-list=m3,m4-nofpu --enable-languages=c,c++ --without-headers --with-newlib --program-prefix=sh-elf- --enable-libssp --enable-lto $extra_args
|
||||
|
|
Loading…
Reference in New Issue