1 Index: libffi/ChangeLog
2 ===================================================================
3 --- libffi.orig/ChangeLog
6 +2012-03-21 Peter Rosin <peda@lysator.liu.se>
8 + * testsuite/lib/target-libpath.exp [*-*-cygwin*, *-*-mingw*]
9 + (set_ld_library_path_env_vars): Add the library search dir to PATH
10 + (and save PATH for later).
11 + (restore_ld_library_path_env_vars): Restore PATH.
13 2012-03-20 Peter Rosin <peda@lysator.liu.se>
15 * testsuite/libffi.call/strlen2_win32.c (main): Remove bug.
16 Index: libffi/testsuite/lib/target-libpath.exp
17 ===================================================================
18 --- libffi.orig/testsuite/lib/target-libpath.exp
19 +++ libffi/testsuite/lib/target-libpath.exp
20 @@ -25,7 +25,7 @@ set orig_ld_library64_path_saved 0
21 set orig_ld_library_path_32_saved 0
22 set orig_ld_library_path_64_saved 0
23 set orig_dyld_library_path_saved 0
25 +set orig_path_saved 0
27 #######################################
28 # proc set_ld_library_path_env_vars { }
29 @@ -42,6 +42,7 @@ proc set_ld_library_path_env_vars { } {
30 global orig_ld_library_path_32_saved
31 global orig_ld_library_path_64_saved
32 global orig_dyld_library_path_saved
33 + global orig_path_saved
34 global orig_ld_library_path
35 global orig_ld_run_path
36 global orig_shlib_path
37 @@ -50,6 +51,7 @@ proc set_ld_library_path_env_vars { } {
38 global orig_ld_library_path_32
39 global orig_ld_library_path_64
40 global orig_dyld_library_path
42 global GCC_EXEC_PREFIX
44 # Set the relocated compiler prefix, but only if the user hasn't specified one.
45 @@ -100,6 +102,10 @@ proc set_ld_library_path_env_vars { } {
46 set orig_dyld_library_path "$env(DYLD_LIBRARY_PATH)"
47 set orig_dyld_library_path_saved 1
49 + if [info exists env(PATH)] {
50 + set orig_path "$env(PATH)"
51 + set orig_path_saved 1
55 # We need to set ld library path in the environment. Currently,
56 @@ -169,6 +175,13 @@ proc set_ld_library_path_env_vars { } {
58 setenv DYLD_LIBRARY_PATH "$ld_library_path"
60 + if { [istarget *-*-cygwin*] || [istarget *-*-mingw*] } {
61 + if { $orig_path_saved } {
62 + setenv PATH "$ld_library_path:$orig_path"
64 + setenv PATH "$ld_library_path"
68 verbose -log "set_ld_library_path_env_vars: ld_library_path=$ld_library_path"
70 @@ -187,6 +200,7 @@ proc restore_ld_library_path_env_vars {
71 global orig_ld_library_path_32_saved
72 global orig_ld_library_path_64_saved
73 global orig_dyld_library_path_saved
74 + global orig_path_saved
75 global orig_ld_library_path
76 global orig_ld_run_path
77 global orig_shlib_path
78 @@ -195,6 +209,7 @@ proc restore_ld_library_path_env_vars {
79 global orig_ld_library_path_32
80 global orig_ld_library_path_64
81 global orig_dyld_library_path
84 if { $orig_environment_saved == 0 } {
86 @@ -240,6 +255,11 @@ proc restore_ld_library_path_env_vars {
87 } elseif [info exists env(DYLD_LIBRARY_PATH)] {
88 unsetenv DYLD_LIBRARY_PATH
90 + if { $orig_path_saved } {
91 + setenv PATH "$orig_path"
92 + } elseif [info exists env(PATH)] {
97 #######################################