hacks to make gcc7.2 compile on Tiger

This commit is contained in:
Wolfgang Thaller 2017-10-08 02:36:59 +02:00
parent f65c69f656
commit 1a7ff978fe
3 changed files with 19 additions and 5 deletions

3
.gitignore vendored
View File

@ -2,4 +2,5 @@
.*.swp .*.swp
CMakeLists.txt.user CMakeLists.txt.user
.finf .finf
InterfacesAndLibraries InterfacesAndLibraries
.DS_Store

View File

@ -31,10 +31,11 @@ On a Mac, get the homebrew package manager and:
brew install boost --c++11 brew install boost --c++11
brew install cmake gmp mpfr libmpc bison brew install cmake gmp mpfr libmpc bison
In theory, you can also run Retro68 on a PowerMac G4 or G5 running Mac OS 10.4 (Tiger). You can also run Retro68 on a PowerMac G4 or G5 running Mac OS 10.4 (Tiger).
In that case, get the tigerbrew package manager and In that case, get the tigerbrew package manager and
brew install gcc cmake brew install gcc cmake gmp mpfr libmpc bison
brew install boost --c++11
### Apple Universal Interfaces ### Apple Universal Interfaces
@ -81,9 +82,10 @@ the build directory. All the commands are in `toolchain/bin`, so you might want
to add that to your `PATH`. to add that to your `PATH`.
If you're building this on a PowerMac running Mac OS X 10.4, tell the build script 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: 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:
../Retro68/build-toolchain.bash --host-cxx-compiler=g++-5 --host-c-compiler=gcc-5 gcc_cv_c_no_fpie=no ../Retro68/build-toolchain.bash --host-cxx-compiler=g++-5 --host-c-compiler=gcc-5
### Build options and recompiling ### Build options and recompiling

View File

@ -67,6 +67,7 @@ for ARG in $*; do
;; ;;
--host-cxx-compiler=*) --host-cxx-compiler=*)
HOST_CMAKE_FLAGS[${#HOST_CMAKE_FLAGS[@]}]="-DCMAKE_CXX_COMPILER=${ARG#*=}" HOST_CMAKE_FLAGS[${#HOST_CMAKE_FLAGS[@]}]="-DCMAKE_CXX_COMPILER=${ARG#*=}"
HOST_CXX_COMPILER="${ARG#*=}"
;; ;;
--host-c-compiler=*) --host-c-compiler=*)
HOST_CMAKE_FLAGS[${#HOST_CMAKE_FLAGS[@]}]="-DCMAKE_C_COMPILER=${ARG#*=}" HOST_CMAKE_FLAGS[${#HOST_CMAKE_FLAGS[@]}]="-DCMAKE_C_COMPILER=${ARG#*=}"
@ -260,6 +261,9 @@ if [ $SKIP_THIRDPARTY != true ]; then
export CPPFLAGS="-I/usr/local/include" export CPPFLAGS="-I/usr/local/include"
export LDFLAGS="-L/usr/local/lib" export LDFLAGS="-L/usr/local/lib"
export CC=$HOST_C_COMPILER
export CXX=$HOST_CXX_COMPILER
# Build binutils for 68K # Build binutils for 68K
mkdir -p binutils-build mkdir -p binutils-build
cd binutils-build cd binutils-build
@ -283,6 +287,8 @@ if [ $SKIP_THIRDPARTY != true ]; then
unset CPPFLAGS unset CPPFLAGS
unset LDFLAGS unset LDFLAGS
unset CC
unset CXX
# Move the real linker aside and install symlinks to Elf2Mac # Move the real linker aside and install symlinks to Elf2Mac
# (Elf2Mac is built by cmake below) # (Elf2Mac is built by cmake below)
@ -306,6 +312,9 @@ if [ $SKIP_THIRDPARTY != true ]; then
export CPPFLAGS="-I/usr/local/include" export CPPFLAGS="-I/usr/local/include"
export LDFLAGS="-L/usr/local/lib" export LDFLAGS="-L/usr/local/lib"
export CC=$HOST_C_COMPILER
export CXX=$HOST_CXX_COMPILER
# Build binutils for PPC # Build binutils for PPC
mkdir -p binutils-build-ppc mkdir -p binutils-build-ppc
cd binutils-build-ppc cd binutils-build-ppc
@ -327,6 +336,8 @@ if [ $SKIP_THIRDPARTY != true ]; then
unset CPPFLAGS unset CPPFLAGS
unset LDFLAGS unset LDFLAGS
unset CC
unset CXX
if [ $CLEAN_AFTER_BUILD != false ]; then if [ $CLEAN_AFTER_BUILD != false ]; then
rm -rf binutils-build-ppc rm -rf binutils-build-ppc