Darwin, libffi, testsuite: Ensure we pick up the convenience lib.
authorIain Sandoe <iain@sandoe.co.uk>
Sat, 21 Jan 2023 19:52:58 +0000 (19:52 +0000)
committerIain Sandoe <iain@sandoe.co.uk>
Sun, 22 Jan 2023 09:32:50 +0000 (09:32 +0000)
For several Darwin linker versions, the link paths are first traversed
looking for shared libraries, and then again looking for archives.

We want the paths to be searched for both shared and archives in order
so that we will find the non-shared libffi in the testsuite (otherwise
the installed version in the system will be found instead).

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
libffi/ChangeLog:

* testsuite/lib/libffi.exp: Search for both shared and archive
in each path in turn.

libffi/testsuite/lib/libffi.exp

index 7dc7b5d..15d3d5e 100644 (file)
@@ -384,6 +384,7 @@ proc libffi_target_compile { source dest type options } {
     if { [istarget "*-*-darwin9*"] || [istarget "*-*-darwin1*"]
         || [istarget "*-*-darwin2*"] } {
        lappend options "additional_flags=-Wl,-allow_stack_execute"
+       lappend options "additional_flags=-Wl,-search_paths_first"
     }
 
     # If you're building the compiler with --prefix set to a place