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 natgetstacktrace.cc compilation for Darwin


Hi all,

this little patch fixes the mentioned test case on Darwin.

Ok for trunk ?

Andreas


2007-01-31 Andreas Tobler <a.tobler@schweiz.org>


	* testsuite/libjava.jvmti/jvmti-interp.exp (gij_jvmti_test_one): Add
	-shared-libgcc to the cxxflaglist for Darwin.


Index: jvmti-interp.exp
===================================================================
--- jvmti-interp.exp (revision 121436)
+++ jvmti-interp.exp (working copy)
@@ -112,9 +112,16 @@
# directory of it to the cxxflaglist.
lappend cxxflaglist "-L$cxxldlibflags"
}
-
- lappend cxxflaglist "-lstdc++"
-
+ # If you're building the compiler with --prefix set to a place
+ # where it's not yet installed, then the linker won't be able to
+ # find the libgcc used by libgcj.dylib/libstdc++.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*"] } {
+ lappend cxxflaglist "-shared-libgcc -lstdc++"
+ } else {
+ lappend cxxflaglist "-lstdc++"
+ }
set cxxflags [join $cxxflaglist]
}



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