jni.exp (gcj_jni_test_one): For darwin, use -shared-libgcc not -lgcc_s, and explain why.

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
This commit is contained in:
Andrew Pinski 2005-10-02 21:40:55 +00:00 committed by Andrew Pinski
parent c0ad5a3173
commit cc86dcfb99
2 changed files with 18 additions and 7 deletions

View 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> 2005-09-30 Tom Tromey <tromey@redhat.com>
PR libgcj/24051: PR libgcj/24051:

View file

@ -131,11 +131,13 @@ proc gcj_jni_test_one {file} {
lappend cxxflaglist "-L$cxxldlibflags" lappend cxxflaglist "-L$cxxldlibflags"
} }
# Darwin does not yet have a libgcc_s.dylib library. # If you're building the compiler with --prefix set to a place
# So we add it here. If the libgcc_s is installed, the libstdc++ # where it's not yet installed, then the linker won't be able to
# would pick it up. # 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*"] } { if { [istarget "*-*-darwin*"] } {
lappend cxxflaglist "-lgcc_s -lstdc++" lappend cxxflaglist "-shared-libgcc -lstdc++"
} else { } else {
lappend cxxflaglist "-lstdc++" lappend cxxflaglist "-lstdc++"
} }
@ -243,10 +245,13 @@ proc gcj_jni_invocation_test_one {file} {
set cfile [file rootname $file].c set cfile [file rootname $file].c
# Darwin needs -liconv linked, otherwise we get some unresolved. # Darwin needs -liconv linked, otherwise we get some unresolved.
# Also, like in the cxxtest we need to add -lgcc_s since Darwin # If you're building the compiler with --prefix set to a place
# has no libgcc_s.dylib installed yet. # 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*"] } { if { [istarget "*-*-darwin*"] } {
set cxxflags "-L../.libs -lgcc_s -lgcj -liconv" set cxxflags "-L../.libs -shared-libgcc -lgcj -liconv"
} else { } else {
global LIBJAVA global LIBJAVA
if [info exists LIBJAVA] { if [info exists LIBJAVA] {