From 56d317f7466cfefc73f54101da10f79e616f68a2 Mon Sep 17 00:00:00 2001 From: pinskia Date: Sun, 2 Oct 2005 21:40:55 +0000 Subject: [PATCH] 2005-10-02 Andrew Pinski * testsuite/lib/jni.exp (gcj_jni_test_one): For darwin, use -shared-libgcc not -lgcc_s, and explain why. (gcj_jni_invocation_test_one): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104878 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/ChangeLog | 6 ++++++ libjava/testsuite/libjava.jni/jni.exp | 19 ++++++++++++------- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index f580c67ecc3..257c011d1ad 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +2005-10-02 Andrew Pinski + + * testsuite/lib/jni.exp (gcj_jni_test_one): For + darwin, use -shared-libgcc not -lgcc_s, and explain why. + (gcj_jni_invocation_test_one): Likewise. + 2005-09-30 Tom Tromey PR libgcj/24051: diff --git a/libjava/testsuite/libjava.jni/jni.exp b/libjava/testsuite/libjava.jni/jni.exp index c32330a2354..1810668111f 100644 --- a/libjava/testsuite/libjava.jni/jni.exp +++ b/libjava/testsuite/libjava.jni/jni.exp @@ -131,11 +131,13 @@ proc gcj_jni_test_one {file} { lappend cxxflaglist "-L$cxxldlibflags" } - # Darwin does not yet have a libgcc_s.dylib library. - # So we add it here. If the libgcc_s is installed, the libstdc++ - # would pick it up. + # If you're building the compiler with --prefix set to a place + # where it's not yet installed, then the linker won't be able to + # find the libgcc used by libffi.dylib. We could pass the + # -dylib_file option, but that's complicated, and it's much easier + # to just make the linker find libgcc using -L options. if { [istarget "*-*-darwin*"] } { - lappend cxxflaglist "-lgcc_s -lstdc++" + lappend cxxflaglist "-shared-libgcc -lstdc++" } else { lappend cxxflaglist "-lstdc++" } @@ -243,10 +245,13 @@ proc gcj_jni_invocation_test_one {file} { set cfile [file rootname $file].c # Darwin needs -liconv linked, otherwise we get some unresolved. - # Also, like in the cxxtest we need to add -lgcc_s since Darwin - # has no libgcc_s.dylib installed yet. + # If you're building the compiler with --prefix set to a place + # where it's not yet installed, then the linker won't be able to + # find the libgcc used by libffi.dylib. We could pass the + # -dylib_file option, but that's complicated, and it's much easier + # to just make the linker find libgcc using -L options. if { [istarget "*-*-darwin*"] } { - set cxxflags "-L../.libs -lgcc_s -lgcj -liconv" + set cxxflags "-L../.libs -shared-libgcc -lgcj -liconv" } else { global LIBJAVA if [info exists LIBJAVA] { -- 2.11.0