From d1a3939015b3f88d28831d3f6b584356edbefb5a Mon Sep 17 00:00:00 2001 From: Wolfgang Thaller Date: Wed, 16 May 2018 02:07:49 +0200 Subject: [PATCH] Copy OpenTransportAppPPC.o and other PPC static libraries --- build-toolchain.bash | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/build-toolchain.bash b/build-toolchain.bash index 05b4d2a97a..e9d35dde5c 100755 --- a/build-toolchain.bash +++ b/build-toolchain.bash @@ -238,6 +238,13 @@ if [ $BUILD_PPC != false ]; then explainInterfaces fi + if locateInterfaceThing OPENTRANSPORTAPPPPC OpenTransportAppPPC.o; then + PPCLIBRARIES=`dirname "$OPENTRANSPORTAPPPPC"` + else + echo "Could not find OpenTransportAppPPC.o anywhere inside InterfaceAndLibraries/" + echo "(This file is required for OpenTransport on PPC only)" +fi + fi if [ $BUILD_CARBON != false ]; then @@ -475,6 +482,21 @@ if [ $BUILD_PPC != false ]; then done ;; esac + + if [ -d ${PPCLIBRARIES} ]; then + echo "Copying static PPC libraries" + for obj in ${PPCLIBRARIES}/OpenT*.o ${PPCLIBRARIES}/CarbonAccessors.o ${PPCLIBRARIES}/CursorDevicesGlue.o; do + if [ -r $obj ]; then + # copy the library: + cp $obj toolchain/powerpc-apple-macos/lib/ + + # and wrap it in a .a archive for convenience + lib=toolchain/powerpc-apple-macos/lib/lib`basename "${obj%.o}"`.a + rm -f $lib + toolchain/bin/powerpc-apple-macos-ar cqs $lib $obj + fi + done + fi fi # if [ $BUILD_PPC != false ]; then