From 193c2942bdf616be8a9ab205f5076ed5702f2d0a Mon Sep 17 00:00:00 2001 From: geoffk Date: Sat, 1 Oct 2005 06:11:29 +0000 Subject: * testsuite/lib/libffi-dg.exp (libffi_target_compile): For darwin, use -shared-libgcc not -lgcc_s, and explain why. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104847 138bc75d-0d04-0410-961f-82ee72b054a4 --- libffi/testsuite/lib/libffi-dg.exp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'libffi/testsuite/lib') diff --git a/libffi/testsuite/lib/libffi-dg.exp b/libffi/testsuite/lib/libffi-dg.exp index 4708ef7b4e7..c3eecff96c0 100644 --- a/libffi/testsuite/lib/libffi-dg.exp +++ b/libffi/testsuite/lib/libffi-dg.exp @@ -187,8 +187,13 @@ proc libffi_target_compile { source dest type options } { 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" -- cgit v1.2.1