This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
fix libffi testsuite on Darwin
- From: gkeating at apple dot com (Geoffrey Keating)
- To: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Cc: pinskia at physics dot uc dot edu
- Date: Fri, 30 Sep 2005 23:10:52 -0700 (PDT)
- Subject: fix libffi testsuite on Darwin
Using -lgcc_s bad. Using -shared-libgcc better. Having a
comment to explain what's going on, *much* better.
Tested by running the libffi testsuite. No failures!
--
- Geoffrey Keating <geoffk@apple.com>
===File ~/patches/gcc-darwin-minversionlibgccffitests.patch===
2005-09-30 Geoffrey Keating <geoffk@apple.com>
* testsuite/lib/libffi-dg.exp (libffi_target_compile): For
darwin, use -shared-libgcc not -lgcc_s, and explain why.
Index: testsuite/lib/libffi-dg.exp
===================================================================
RCS file: /cvs/gcc/gcc/libffi/testsuite/lib/libffi-dg.exp,v
retrieving revision 1.13
diff -u -p -u -p -r1.13 libffi-dg.exp
--- testsuite/lib/libffi-dg.exp 20 Apr 2005 10:59:26 -0000 1.13
+++ testsuite/lib/libffi-dg.exp 1 Oct 2005 06:03:46 -0000
@@ -187,8 +187,13 @@ proc libffi_target_compile { source dest
lappend options "additional_flags=-I${libffi_include} -I${srcdir}/../include -I${libffi_include}/.."
lappend options "additional_flags=${libffi_link_flags}"
- if { [string match "powerpc-*-darwin*" $target_triplet] } {
- lappend options "libs= -lgcc_s"
+ # 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 libffi.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 { [string match "*-*-darwin*" $target_triplet] } {
+ lappend options "libs= -shared-libgcc"
}
lappend options "libs= -lffi"
============================================================