This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[patch] darwin testsuite fix cxxtest
- From: Andreas Tobler <toa at pop dot agri dot ch>
- To: Java Patches <java-patches at gcc dot gnu dot org>
- Date: Sun, 06 Jun 2004 15:13:06 +0200
- Subject: [patch] darwin testsuite fix cxxtest
Hi,
this fixes one more compilation problem on darwin. Up to now we don't
find the lgcc_s on darwin because we don't have it. The test cxxtest.cc
fails to compile because it is looking for the lgcc_s via libstdc++.
In case one has not installed the tree, libstdc++ does not find the lgcc_s.
Ok for main ?
Andreas
2004-06-06 Andreas Tobler <a.tobler@schweiz.ch>
* testsuite/libjava.jni/jni.exp (gcj_jni_test_one): Add lgcc_s for
darwin.
Index: testsuite/libjava.jni/jni.exp
===================================================================
RCS file: /cvs/gcc/gcc/libjava/testsuite/libjava.jni/jni.exp,v
retrieving revision 1.15
diff -u -r1.15 jni.exp
--- testsuite/libjava.jni/jni.exp 10 May 2004 20:44:13 -0000 1.15
+++ testsuite/libjava.jni/jni.exp 6 Jun 2004 13:08:06 -0000
@@ -11,7 +11,7 @@
set options ""
# 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] } {
@@ -131,7 +131,15 @@
lappend cxxflaglist "-L$cxxldlibflags"
}
- lappend cxxflaglist "-lstdc++"
+ # 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] } {
+ lappend cxxflaglist "-lgcc_s -lstdc++"
+ } else {
+ lappend cxxflaglist "-lstdc++"
+ }
+
set cxxflags [join $cxxflaglist]
}