From 5e93cc704d127c2c8ae7f5d2cef621145d43e777 Mon Sep 17 00:00:00 2001 From: aph Date: Tue, 16 Jun 2009 17:41:47 +0000 Subject: [PATCH] 2009-06-16 Andreas Tobler PR libffi/40444 * testsuite/lib/libffi-dg.exp (libffi_target_compile): Add allow_stack_execute for Darwin. --- libffi/ChangeLog | 6 ++++++ libffi/testsuite/lib/libffi-dg.exp | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/libffi/ChangeLog b/libffi/ChangeLog index 8c8d7925..82759758 100644 --- a/libffi/ChangeLog +++ b/libffi/ChangeLog @@ -1,3 +1,9 @@ +2009-06-16 Andreas Tobler + + PR libffi/40444 + * testsuite/lib/libffi-dg.exp (libffi_target_compile): Add + allow_stack_execute for Darwin. + 2009-06-16 Andrew Haley * configure.ac (TARGETDIR): Add missing blank lines. diff --git a/libffi/testsuite/lib/libffi-dg.exp b/libffi/testsuite/lib/libffi-dg.exp index 226893dc..2f5e2f5d 100644 --- a/libffi/testsuite/lib/libffi-dg.exp +++ b/libffi/testsuite/lib/libffi-dg.exp @@ -181,6 +181,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}" + # Darwin needs a stack execution allowed flag. + + if { [istarget "*-*-darwin9*"] || [istarget "*-*-darwin1*"] + || [istarget "*-*-darwin2*"] } { + lappend options "additional_flags=-Wl,-allow_stack_execute" + } + # 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