aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorAndreas Tobler <a.tobler@schweiz.ch>2005-03-11 22:33:56 +0100
committerAndreas Tobler <andreast@gcc.gnu.org>2005-03-11 22:33:56 +0100
commita96cf7633a4094a9fab58127913f66f53fc7d08c (patch)
tree780a14a295471df853c13dd65f76c5b566bb9ac1 /libjava
parentf817d5d47008f94b9ea1a20daf8707ac7e7a9058 (diff)
downloadgcc-a96cf7633a4094a9fab58127913f66f53fc7d08c.zip
gcc-a96cf7633a4094a9fab58127913f66f53fc7d08c.tar.gz
gcc-a96cf7633a4094a9fab58127913f66f53fc7d08c.tar.bz2
libjava.exp (libjava_init): Use the same target check for Darwin.
2005-03-11 Andreas Tobler <a.tobler@schweiz.ch> * testsuite/lib/libjava.exp (libjava_init): Use the same target check for Darwin. (libjava_arguments): Likewise. * testsuite/libjava.jni/jni.exp (gcj_jni_compile_c_to_so): Likewise. (gcj_jni_test_one): Likewise. (gcj_jni_invocation_compile_c_to_binary): Likewise. Add flags to keep the Darwin linker quiet. (gcj_jni_invocation_test_one): Use the same target check for Darwin. Add -liconv for Darwin. From-SVN: r96311
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog13
-rw-r--r--libjava/testsuite/lib/libjava.exp4
-rw-r--r--libjava/testsuite/libjava.jni/jni.exp21
3 files changed, 30 insertions, 8 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 40de415..8d10cf1 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,16 @@
+2005-03-11 Andreas Tobler <a.tobler@schweiz.ch>
+
+ * testsuite/lib/libjava.exp (libjava_init): Use the same target
+ check for Darwin.
+ (libjava_arguments): Likewise.
+
+ * testsuite/libjava.jni/jni.exp (gcj_jni_compile_c_to_so): Likewise.
+ (gcj_jni_test_one): Likewise.
+ (gcj_jni_invocation_compile_c_to_binary): Likewise.
+ Add flags to keep the Darwin linker quiet.
+ (gcj_jni_invocation_test_one): Use the same target check for Darwin.
+ Add -liconv for Darwin.
+
2005-03-11 Tom Tromey <tromey@redhat.com>
* gnu/gcj/tools/gcj_dbtool/Main.java (main): Handle '-p'.
diff --git a/libjava/testsuite/lib/libjava.exp b/libjava/testsuite/lib/libjava.exp
index 443259d..b3a16f6 100644
--- a/libjava/testsuite/lib/libjava.exp
+++ b/libjava/testsuite/lib/libjava.exp
@@ -197,8 +197,8 @@ proc libjava_init { args } {
# Finally, add the gcc build directory so that we can find the
# shared libgcc. This, like much of dejagnu, is hideous.
set libjava_libgcc_s_path {}
-
- if { [string match "powerpc-*-darwin*" $target_triplet] } {
+
+ if { [istarget "*-*-darwin*"] } {
set so_extension "dylib"
} else {
set so_extension "so"
diff --git a/libjava/testsuite/libjava.jni/jni.exp b/libjava/testsuite/libjava.jni/jni.exp
index fb10bd4..989a164 100644
--- a/libjava/testsuite/libjava.jni/jni.exp
+++ b/libjava/testsuite/libjava.jni/jni.exp
@@ -14,7 +14,7 @@ proc gcj_jni_compile_c_to_so {file {options {}}} {
# so we check against powerpc-apple-darwin and set them to
# dylib, else we assume it's .so
- if { [ regexp {powerpc-apple-darwin} $host_triplet] } {
+ if { [istarget "*-*-darwin*"] } {
set so_extension "dylib"
set so_flag "-dynamiclib"
} else {
@@ -77,10 +77,10 @@ proc gcj_jni_test_one {file} {
global INTERPRETER
# apple uses a different extension for shared/dynamic libraries
-# so we check against powerpc-apple-darwin and set them to
+# so we check against powerpc-apple-darwin and set them to
# dylib, else we assume it's .so
- if { [ regexp {powerpc-apple-darwin} $host_triplet] } {
+ if { [istarget "*-*-darwin*"] } {
set so_extension "dylib"
} else {
set so_extension "so"
@@ -134,12 +134,12 @@ proc gcj_jni_test_one {file} {
# 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 { [ regexp {powerpc-apple-darwin} $host_triplet] } {
+ if { [istarget "*-*-darwin*"] } {
lappend cxxflaglist "-lgcc_s -lstdc++"
} else {
lappend cxxflaglist "-lstdc++"
}
-
+
set cxxflags [join $cxxflaglist]
}
@@ -194,6 +194,10 @@ proc gcj_jni_invocation_compile_c_to_binary {file {options {}}} {
set filename [file tail $file]
set name [file rootname $filename]
+ # Set some darwin specific options
+ if { [istarget "*-*-darwin*"] } {
+ lappend options "additional_flags=-multiply_defined suppress"
+ }
# Find the generated header.
lappend options "additional_flags=-I. -I.."
@@ -238,7 +242,12 @@ proc gcj_jni_invocation_test_one {file} {
pass "bytecompile $file"
set cfile [file rootname $file].c
- set cxxflags "-L../.libs -lgcj"
+ # Darwin needs -liconv linked, otherwise we get some unresolved.
+ if { [istarget "*-*-darwin*"] } {
+ set cxxflags "-L../.libs -lgcj -liconv"
+ } else {
+ set cxxflags "-L../.libs -lgcj"
+ }
if {! [gcj_jni_invocation_compile_c_to_binary $cfile $cxxflags]} {
# FIXME