diff --git a/.gitignore b/.gitignore index a900faaa9b..e0c979d001 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ .*.swp CMakeLists.txt.user .finf -InterfacesAndLibraries \ No newline at end of file +InterfacesAndLibraries +.DS_Store diff --git a/README.md b/README.md index d5f815e60b..fdbd21ed8e 100644 --- a/README.md +++ b/README.md @@ -31,10 +31,11 @@ On a Mac, get the homebrew package manager and: brew install boost --c++11 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 - brew install gcc cmake + brew install gcc cmake gmp mpfr libmpc bison + brew install boost --c++11 ### 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`. 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 diff --git a/build-toolchain.bash b/build-toolchain.bash index 00b8b4903a..85a862a96f 100755 --- a/build-toolchain.bash +++ b/build-toolchain.bash @@ -67,6 +67,7 @@ for ARG in $*; do ;; --host-cxx-compiler=*) HOST_CMAKE_FLAGS[${#HOST_CMAKE_FLAGS[@]}]="-DCMAKE_CXX_COMPILER=${ARG#*=}" + HOST_CXX_COMPILER="${ARG#*=}" ;; --host-c-compiler=*) 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 LDFLAGS="-L/usr/local/lib" + export CC=$HOST_C_COMPILER + export CXX=$HOST_CXX_COMPILER + # Build binutils for 68K mkdir -p binutils-build cd binutils-build @@ -283,6 +287,8 @@ if [ $SKIP_THIRDPARTY != true ]; then unset CPPFLAGS unset LDFLAGS + unset CC + unset CXX # Move the real linker aside and install symlinks to Elf2Mac # (Elf2Mac is built by cmake below) @@ -306,6 +312,9 @@ if [ $SKIP_THIRDPARTY != true ]; then export CPPFLAGS="-I/usr/local/include" export LDFLAGS="-L/usr/local/lib" + export CC=$HOST_C_COMPILER + export CXX=$HOST_CXX_COMPILER + # Build binutils for PPC mkdir -p binutils-build-ppc cd binutils-build-ppc @@ -327,6 +336,8 @@ if [ $SKIP_THIRDPARTY != true ]; then unset CPPFLAGS unset LDFLAGS + unset CC + unset CXX if [ $CLEAN_AFTER_BUILD != false ]; then rm -rf binutils-build-ppc