diff options
Diffstat (limited to 'libffi/testsuite/lib/libffi.exp')
-rw-r--r-- | libffi/testsuite/lib/libffi.exp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libffi/testsuite/lib/libffi.exp b/libffi/testsuite/lib/libffi.exp index 8ee3f1509fc..3c61baa1dff 100644 --- a/libffi/testsuite/lib/libffi.exp +++ b/libffi/testsuite/lib/libffi.exp @@ -16,7 +16,7 @@ proc load_gcc_lib { filename } { global srcdir - load_file $srcdir/lib/$filename + load_file $srcdir/../../gcc/testsuite/lib/$filename } load_lib dg.exp @@ -94,6 +94,7 @@ proc libffi-init { args } { global srcdir global blddirffi global objdir + global blddircxx global TOOL_OPTIONS global tool global libffi_include @@ -101,8 +102,10 @@ proc libffi-init { args } { global tool_root_dir global ld_library_path - set blddirffi [pwd]/.. + set blddirffi [lookfor_file [get_multilibs] libffi] verbose "libffi $blddirffi" + set blddircxx [lookfor_file [get_multilibs] libstdc++-v3] + verbose "libstdc++ $blddircxx" set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a] if {$gccdir != ""} { @@ -129,6 +132,8 @@ proc libffi-init { args } { } # add the library path for libffi. append ld_library_path ":${blddirffi}/.libs" + # add the library path for libstdc++ as well. + append ld_library_path ":${blddircxx}/src/.libs" verbose "ld_library_path: $ld_library_path" @@ -141,6 +146,7 @@ proc libffi-init { args } { if { $libffi_dir != "" } { set libffi_dir [file dirname ${libffi_dir}] set libffi_link_flags "-L${libffi_dir}/.libs" + lappend libffi_link_flags "-L${blddircxx}/src/.libs" } set_ld_library_path_env_vars |