[PATCH] libstd++ linking location fix(?) for arm eabi
Riku Voipio
riku.voipio@iki.fi
Thu Sep 13 14:50:00 GMT 2007
Hi,
First attempt to build gij/gcj on arm eabi (thanks, Andrew, Matthias!) failed
when linking:
(cd .libs && rm -f libgcj_bc.la && ln -s ../libgcj_bc.la libgcj_bc.la)
/bin/sh ./libtool --tag=GCJ --mode=link /root/gcj-4.2/gcj-4.2-4.2.1/build/gcc/gcj -B/root/gcj-4.2/gcj-4.2-4.2.1/build/arm-linux-gnueabi/libjava/ -B/root/gcj-4.2/gcj-4.2-4.2.1/build/gcc/ -L/root/gcj-4.2/gcj-4.2-4.2.1/build/arm-linux-gnueabi/libjava -g -O2 -o jv-convert --main=gnu.gcj.convert.Convert -rpath /usr/lib -shared-libgcc -L/root/gcj-4.2/gcj-4.2-4.2.1/build/arm-linux-gnueabi/libjava/../libstdc++-v3/src/.libs -lstdc++ -L/root/gcj-4.2/gcj-4.2-4.2.1/build/arm-linux-gnueabi/libjava/.libs libgcj.la
/root/gcj-4.2/gcj-4.2-4.2.1/build/gcc/gcj -B/root/gcj-4.2/gcj-4.2-4.2.1/build/arm-linux-gnueabi/libjava/ -B/root/gcj-4.2/gcj-4.2-4.2.1/build/gcc/ -g -O2 -o .libs/jv-convert --main=gnu.gcj.convert.Convert -shared-libgcc -L/root/gcj-4.2/gcj-4.2-4.2.1/build/arm-linux-gnueabi/libjava -L/root/gcj-4.2/gcj-4.2-4.2.1/build/arm-linux-gnueabi/libjava/../libstdc++-v3/src/.libs /root/gcj-4.2/gcj-4.2-4.2.1/build/arm-linux-gnueabi/libjava/../libstdc++-v3/src/.libs/.libs/libstdc++.so -L/root/gcj-4.2/gcj-4.2-4.2.1/build/arm-linux-gnueabi/libstdc++-v3/src -L/root/gcj-4.2/gcj-4.2-4.2.1/build/arm-linux-gnueabi/libstdc++-v3/src/.libs -lm -lm -lm -L/root/gcj-4.2/gcj-4.2-4.2.1/build/./gcc -L/usr/lib/gcc/arm-linux-gnueabi/4.2.1 -L/usr/lib/gcc/arm-linux-gnueabi/4.2.1/../../.. -lgcc_s -lc -lgcc_s -lm -lgcc_s -lc -lgcc_s -L/root/gcj-4.2/gcj-4.2-4.2.1/build/arm-linux-gnueabi/libjava/.libs ./.libs/libgcj.so -lm -lm -lm -lgcc_s -lc -lgcc_s -lm -lgcc_s -lc -lgcc_s /root/gcj-4.2/gcj-4.2-4.2.1/build/arm-linux-gnueabi/libstdc++-v3/src/.libs/libstdc++.so -lm -lm -lm -lgcc_s -lc -lgcc_s -lm -lgcc_s -lc -lgcc_s -lpthread -lrt -ldl -lz -lgcc_s -lc -lgcc_s -Wl,--rpath -Wl,/usr/lib
gcj: /root/gcj-4.2/gcj-4.2-4.2.1/build/arm-linux-gnueabi/libjava/../libstdc++-v3/src/.libs/.libs/libstdc++.so: No such file or directory
As the .libs/.libs stanza seemed suspicious, I simply dropped .libs
from extra_ldflags and gcj compiled successfully. Now I don't really know
who from the autofoo gang is adding the extra .libs and if it should be
rather removed from there...
Patch attached.
--
"rm -rf" only sounds scary if you don't have backups
-------------- next part --------------
diff -urN gcj-4.2-4.2.1/src/libjava/configure.ac gcj-4.2-4.2.1.patched/src/libjava/configure.ac
--- gcj-4.2-4.2.1/src/libjava/configure.ac 2007-09-13 17:19:19.000000000 +0300
+++ gcj-4.2-4.2.1.patched/src/libjava/configure.ac 2007-09-13 17:17:20.000000000 +0300
@@ -795,7 +795,7 @@
# Some of the ARM unwinder code is actually in libstdc++. We
# could in principle replicate it in libgcj, but it's better to
# have a dependency on libstdc++.
- extra_ldflags='-L$(here)/../libstdc++-v3/src/.libs -lstdc++'
+ extra_ldflags='-L$(here)/../libstdc++-v3/src -lstdc++'
LIBSTDCXXSPEC=-lstdc++
LIBGCJTESTSPEC="-L`${PWDCMD-pwd}`/.libs -L`${PWDCMD-pwd}`/../libstdc++-v3/src/.libs -rpath `${PWDCMD-pwd}`/.libs:`${PWDCMD-pwd}`/../libstdc++-v3/src/.libs -lstdc++"
;;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20070913/96ece024/attachment.sig>
More information about the Java-patches
mailing list