This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] fix pr16923 for darwin


Hello,

this one fixes the PR16923 for darwin. The linker is a chatterbox and we get some unresolved.

ok for main?

Andreas

2005-03-04 Andreas Tobler <a.tobler@schweiz.ch>

	* testsuite/libjava.jni/jni.exp
	(gcj_jni_invocation_compile_c_to_binary): Add flags to keep the
	Darwin linker quiet.
	(gcj_jni_invocation_test_one): Add -liconv for Darwin.
Index: testsuite/libjava.jni/jni.exp
===================================================================
RCS file: /cvs/gcc/gcc/libjava/testsuite/libjava.jni/jni.exp,v
retrieving revision 1.19
diff -u -r1.19 jni.exp
--- testsuite/libjava.jni/jni.exp	3 Mar 2005 22:17:26 -0000	1.19
+++ testsuite/libjava.jni/jni.exp	4 Mar 2005 16:29:04 -0000
@@ -194,6 +194,10 @@
   set filename [file tail $file]
   set name [file rootname $filename]
 
+  # Set some darwin specific options
+  if { [ regexp {powerpc-apple-darwin} $host_triplet] } {
+      lappend options "additional_flags=-multiply_defined suppress"
+  }
   # Find the generated header.
   lappend options "additional_flags=-I. -I.."
 
@@ -238,7 +242,12 @@
   pass "bytecompile $file"
 
   set cfile [file rootname $file].c
-  set cxxflags "-L../.libs -lgcj"
+  # Darwin needs -liconv linked, otherwise we get some unresolved.
+  if { [ regexp {powerpc-apple-darwin} $host_triplet] } {
+      set cxxflags "-L../.libs -lgcj -liconv"
+  } else {
+      set cxxflags "-L../.libs -lgcj"
+  }
 
   if {! [gcj_jni_invocation_compile_c_to_binary $cfile $cxxflags]} {
     # FIXME

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]