]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
jni.exp (gcj_jni_test_one): For darwin, use -shared-libgcc not -lgcc_s, and explain...
authorAndrew Pinski <pinskia@physics.uc.edu>
Sun, 2 Oct 2005 21:40:55 +0000 (21:40 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Sun, 2 Oct 2005 21:40:55 +0000 (14:40 -0700)
2005-10-02  Andrew Pinski  <pinskia@physics.uc.edu>

        * 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.

From-SVN: r104878

libjava/ChangeLog
libjava/testsuite/libjava.jni/jni.exp

index f580c67ecc31dea1a56a0004ec2a6d7ad8ea912d..257c011d1addfe555227503171c5d168c45bbbb5 100644 (file)
@@ -1,3 +1,9 @@
+2005-10-02  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       * 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  <tromey@redhat.com>
 
        PR libgcj/24051:
index c32330a23544d785250a71bd407b509a8ab955a0..1810668111fb7a7c915918cdb2d7f751f171f40a 100644 (file)
@@ -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] {