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 jni/PR16923.c on Solaris


Hi,

The test fails because the C code cannot be linked: it needs libsocket.

Tested on sparc-sun-solaris2.8.  OK for mainline and 4.0 branch?


2005-03-25  Eric Botcazou  <ebotcazou@libertysurf.fr>

	* testsuite/libjava.jni/jni.exp (gcj_jni_invocation_test_one): Pass
	-lsocket on Solaris.


-- 
Eric Botcazou
Index: testsuite/libjava.jni/jni.exp
===================================================================
RCS file: /cvs/gcc/gcc/libjava/testsuite/libjava.jni/jni.exp,v
retrieving revision 1.18.2.1
diff -u -r1.18.2.1 jni.exp
--- testsuite/libjava.jni/jni.exp	3 Mar 2005 21:59:22 -0000	1.18.2.1
+++ testsuite/libjava.jni/jni.exp	25 Mar 2005 09:39:29 -0000
@@ -240,6 +240,10 @@
   set cfile [file rootname $file].c
   set cxxflags "-L../.libs -lgcj"
 
+  if { [istarget "*-*-solaris*"] } {
+    lappend cxxflags "-lsocket"
+  }
+
   if {! [gcj_jni_invocation_compile_c_to_binary $cfile $cxxflags]} {
     # FIXME
     return 0

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