diff --git a/ImportLibraries/libInterfaceLib.a b/ImportLibraries/libInterfaceLib.a new file mode 100755 index 0000000000..1ed2c8d9e9 Binary files /dev/null and b/ImportLibraries/libInterfaceLib.a differ diff --git a/build-toolchain.sh b/build-toolchain.sh index f6f4682b52..f7bfa7e660 100644 --- a/build-toolchain.sh +++ b/build-toolchain.sh @@ -21,7 +21,7 @@ set -e SRC=$(cd `dirname $0` && pwd -P) PREFIX=`pwd -P`/toolchain/ BINUTILS=`pwd -P`/binutils-build -if false; then + # Remove old install tree rm -rf toolchain mkdir -p toolchain @@ -85,7 +85,6 @@ make make install cd .. -fi # Install Universal Interfaces for arch in m68k powerpc; do sh "$SRC/prepare-headers.sh" "$SRC/CIncludes" toolchain/${arch}-apple-macos/include @@ -93,6 +92,8 @@ for arch in m68k powerpc; do sh "$SRC/prepare-rincludes.sh" "$SRC/RIncludes" toolchain/${arch}-apple-macos/RIncludes done +cp $SRC/ImportLibraries/*.a toolchain/powerpc-apple-macos/lib/ + # Build host-based components mkdir -p build-host cd build-host diff --git a/gcc/gcc/config/rs6000/macos.h b/gcc/gcc/config/rs6000/macos.h index 4401535bfb..771d53739e 100644 --- a/gcc/gcc/config/rs6000/macos.h +++ b/gcc/gcc/config/rs6000/macos.h @@ -69,7 +69,7 @@ /* Profiled library versions are used by linking with special directories. */ #define LIB_SPEC "-lc" -#define LIBGCC_SPEC "-lretrocrt -lgcc" +#define LIBGCC_SPEC "-lretrocrt -lgcc -lInterfaceLib" /* Static linking with shared libstdc++ requires libsupc++ as well. */ #define LIBSTDCXX_STATIC "supc++" @@ -158,13 +158,14 @@ while (0) /* --no-check-sections : sections overlap on purpose! - --bnogc : something's going wrong when csects are gc'ed + -undefined=_consolewrite : hack to allow easy configuration of console output */ #define LINK_SPEC "%{!r:-btextro} -bhalt:4 -bnodelcsect \ ---no-check-sections -bnogc \ +--no-check-sections -undefined=_consolewrite \ %{shared:-bM:SRE}" + #undef STARTFILE_SPEC #define STARTFILE_SPEC "" @@ -191,7 +192,6 @@ #undef PTRDIFF_TYPE #define PTRDIFF_TYPE "long int" - #if 0 /* The AIX linker will discard static constructors in object files before collect has a chance to see them, so scan the object files directly. */