On Tiger, automatically apply the -fno-PIE workaround/hack (see previous commit); also, check that --host-c*-compiler options have been specified

This commit is contained in:
Wolfgang Thaller 2017-10-08 10:40:47 +02:00
parent 1a7ff978fe
commit f2c5029218
2 changed files with 23 additions and 3 deletions

View File

@ -82,10 +82,9 @@ the build directory. All the commands are in `toolchain/bin`, so you might want
to add that to your `PATH`.
If you're building this on a PowerMac running Mac OS X 10.4, tell the build script
to use the gcc you've installed via tigerbrew, and set an environment variable to work around
a problem caused by GCC's build system:
to use the gcc you've installed via tigerbrew:
gcc_cv_c_no_fpie=no ../Retro68/build-toolchain.bash --host-cxx-compiler=g++-5 --host-c-compiler=gcc-5
../Retro68/build-toolchain.bash --host-cxx-compiler=g++-5 --host-c-compiler=gcc-5
### Build options and recompiling

View File

@ -93,6 +93,7 @@ if [ $BUILD_PPC != false ]; then
ARCHS="$ARCHS powerpc"
fi
##################### Sanity checks
if [ `pwd -P` == "$SRC" ]; then
@ -124,6 +125,26 @@ if [ $SKIP_THIRDPARTY != false ]; then
fi
fi
### Running on a Power Mac (tested with 10.4 Tiger)
if [ "`uname -m`" = "Power Macintosh" ]; then
# The default compiler won't work,
# check whether the compiler has been explictly specified
# on the command line
if [ $SKIP_THIRDPARTY = false ]; then
if [ -z "$HOST_CXX_COMPILER" -o -z "$HOST_C_COMPILER" ]; then
echo "**** Apple's version of GCC on Power Macs is too old."
echo "**** Please explicitly specify the C and C++ compilers"
echo "**** using the --host-c-compiler and --host-cxx-compiler options."
echo "**** You can install a usable compiler using tigerbrew."
exit 1
fi
fi
# work around a problem with building gcc-7 with homebrew's gcc-5
export gcc_cv_c_no_fpie=no
fi
##################### Locate and check Interfaces & Libraries
if [ -d "$SRC/CIncludes" -o -d "$SRC/RIncludes" ]; then