jvmti-interp.exp (gij_jvmti_test_one): Add -shared-libgcc to the cxxflaglist for...
authorAndreas Tobler <a.tobler@schweiz.org>
Wed, 31 Jan 2007 21:28:28 +0000 (21:28 +0000)
committerAndreas Tobler <andreast@gcc.gnu.org>
Wed, 31 Jan 2007 21:28:28 +0000 (22:28 +0100)
2007-01-31  Andreas Tobler  <a.tobler@schweiz.org>

* testsuite/libjava.jvmti/jvmti-interp.exp (gij_jvmti_test_one): Add
-shared-libgcc to the cxxflaglist for Darwin.

From-SVN: r121438

libjava/ChangeLog
libjava/testsuite/libjava.jvmti/jvmti-interp.exp

index 3dd1dfaaec3bf12d12e7d84ce4559f048f3f085f..3ae5d1942d747e8477c11f6a5564d75eca0eab86 100644 (file)
@@ -1,3 +1,8 @@
+2007-01-31  Andreas Tobler  <a.tobler@schweiz.org>
+
+       * testsuite/libjava.jvmti/jvmti-interp.exp (gij_jvmti_test_one): Add
+       -shared-libgcc to the cxxflaglist for Darwin.
+
 2007-01-31  Tom Tromey  <tromey@redhat.com>
 
        * scripts.am, Makefile.in: Rebuilt.
index 0c0fca1137ee6843c420e16f62fb4f660639dc2a..73a0582200555c9f432750d93b64a06aca5f2945 100644 (file)
@@ -112,9 +112,16 @@ proc gij_jvmti_test_one {file} {
           # directory of it to the cxxflaglist.
           lappend cxxflaglist "-L$cxxldlibflags"
       }
-       
-      lappend cxxflaglist "-lstdc++"
-
+      # 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 libgcj.dylib/libstdc++.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 "-shared-libgcc -lstdc++"
+      } else {
+         lappend cxxflaglist "-lstdc++"
+      }
       set cxxflags [join $cxxflaglist]
   }