2003/09/08 01:16:44
[org.ibex.core.git] / Makefile.upstream
index 0ea759f..29da789 100644 (file)
@@ -5,6 +5,7 @@
 
 # deal with Apple's brokenness
 setcc := CC="$(patsubst Darwin,/usr/bin/gcc3 -no-cpp-precomp,$(findstring Darwin,$(shell uname)))"
+setcc += PATH=`pwd`/upstream/install/bin:$$PATH
 
 # where to get stuff
 url_newlib-1.11.0      := ftp://sources.redhat.com/pub/newlib/newlib-1.11.0.tar.gz
@@ -27,14 +28,18 @@ url_jikes-1.18         := http://www.megacz.com/tmp/jikes-1.18.tgz       #ftp://
        make -C upstream/darwin-linker/src/cctools/as
        make -C upstream/darwin-linker/src/cctools/ar
        mkdir -p upstream/install/powerpc-apple-darwin/bin
-       cp upstream/darwin-linker/src/cctools/ld/ld_dir/ld.NEW \
-               upstream/install/powerpc-apple-darwin/bin/ld
-       cp upstream/darwin-linker/src/cctools/misc/strip.NEW \
-               upstream/install/powerpc-apple-darwin/bin/strip
-       cp upstream/darwin-linker/src/cctools/as/appc_dir/as \
-               upstream/install/powerpc-apple-darwin/bin/as
-       cp upstream/darwin-linker/src/cctools/ar/ar \
-               upstream/install/powerpc-apple-darwin/bin/ar
+       cp upstream/darwin-linker/src/cctools/ld/ld_dir/ld.NEW upstream/install/powerpc-apple-darwin/bin/ld.NEW
+       echo -e "#!/bin/sh\n"`pwd`/upstream/install/powerpc-apple-darwin/bin/ld.NEW -dylib_file /usr/lib/system/libmathCommon.A.dylib:`pwd`/xwt/upstream/install/powerpc-apple-darwin/lib/libmathCommon.A.dylib -Z -L`pwd`/upstream/install/powerpc-apple-darwin/lib $$@ > upstream/install/powerpc-apple-darwin/bin/ld
+       chmod +x upstream/install/powerpc-apple-darwin/bin/ld
+       cp upstream/darwin-linker/src/cctools/misc/strip.NEW upstream/install/powerpc-apple-darwin/bin/strip
+       cp upstream/darwin-linker/src/cctools/as/appc_dir/as upstream/install/powerpc-apple-darwin/bin/as
+       cp upstream/darwin-linker/src/cctools/ar/ar.NEW upstream/install/powerpc-apple-darwin/bin/ar
+       mkdir -p upstream/install/bin
+       cd upstream/install/bin; ln -s ../powerpc-apple-darwin/bin/ld powerpc-apple-darwin-ld
+       cd upstream/install/bin; ln -s ../powerpc-apple-darwin/bin/as powerpc-apple-darwin-as
+       cd upstream/install/bin; ln -s ../powerpc-apple-darwin/bin/ar powerpc-apple-darwin-ar
+       cd upstream/install/bin; ln -s ../powerpc-apple-darwin/bin/strip powerpc-apple-darwin-strip
+       echo -e "#!/bin/sh\nc++filt $$@\n" > upstream/install/bin/c++filt3; chmod +x upstream/install/bin/c++filt3
        touch $@
 
 # building gcc requires binutils