Commit 33cde516 by Richard Sandiford Committed by Richard Sandiford

re PR testsuite/40699 (All sparcv9 libjava execution tests fail on Solaris 11/SPARC)

gcc/testsuite/
	PR testsuite/40699
	PR testsuite/40707
	PR testsuite/40709
	* lib/gcc-defs.exp, lib/target-libpath.exp, lib/objc.exp,
	lib/gfortran.exp, lib/g++.exp, lib/obj-c++.exp, lib/c-torture.exp,
	lib/gcc-dg.exp, lib/gnat.exp, g++.dg/compat/compat.exp,
	g++.dg/compat/struct-layout-1.exp: Revert 2009-06-30 commit.

libstdc++-v3/
	PR testsuite/40699
	PR testsuite/40707
	PR testsuite/40709
	* testsuite/lib/libstdc++.exp: Revert 2009-06-30 commit.

libjava/
	PR testsuite/40699
	PR testsuite/40707
	PR testsuite/40709
	* testsuite/lib/libjava.exp: Revert 2009-06-30 commit.

libgomp/
	PR testsuite/40699
	PR testsuite/40707
	PR testsuite/40709
	* testsuite/lib/libgomp.exp: Revert 2009-07-02 and 2009-06-30 commits.
	* testsuite/libgomp.c/c.exp, testsuite/libgomp.c++/c++.exp,
	testsuite/libgomp.fortran/fortran.exp: Revert 2009-06-30 commits.

libffi/
	PR testsuite/40699
	PR testsuite/40707
	PR testsuite/40709
	* testsuite/lib/libffi-dg.exp: Revert 2009-07-02, 2009-07-01 and
	2009-06-30 commits.

libmudflap/
	PR testsuite/40699
	PR testsuite/40707
	PR testsuite/40709
	* testsuite/lib/libmudflap.exp: Revert 2009-06-30 commit.

From-SVN: r149508
parent 82e45095
2009-07-11 Richard Sandiford <rdsandiford@googlemail.com>
PR testsuite/40699
PR testsuite/40707
PR testsuite/40709
* lib/gcc-defs.exp, lib/target-libpath.exp, lib/objc.exp,
lib/gfortran.exp, lib/g++.exp, lib/obj-c++.exp, lib/c-torture.exp,
lib/gcc-dg.exp, lib/gnat.exp, g++.dg/compat/compat.exp,
g++.dg/compat/struct-layout-1.exp: Revert 2009-06-30 commit.
2009-07-11 Tobias Burnus <burnus@net-b.de>
PR fortran/33197
......
......@@ -103,14 +103,14 @@ set sid "cp_compat"
# are different.
set use_alt 0
set same_alt 0
set alt_ld_library_path ""
set alt_ld_library_path "."
if [info exists ALT_CXX_UNDER_TEST] then {
set use_alt 1
if [string match "same" $ALT_CXX_UNDER_TEST] then {
set same_alt 1
} else {
if [info exists ALT_LD_LIBRARY_PATH] then {
set alt_ld_library_path $ALT_LD_LIBRARY_PATH
append alt_ld_library_path ":${ALT_LD_LIBRARY_PATH}"
}
}
}
......
......@@ -109,14 +109,14 @@ set sid "cp_compat"
# are different.
set use_alt 0
set same_alt 0
set alt_ld_library_path ""
set alt_ld_library_path "."
if [info exists ALT_CXX_UNDER_TEST] then {
set use_alt 1
if [string match "same" $ALT_CXX_UNDER_TEST] then {
set same_alt 1
} else {
if [info exists ALT_LD_LIBRARY_PATH] then {
set alt_ld_library_path $ALT_LD_LIBRARY_PATH
append alt_ld_library_path ":${ALT_LD_LIBRARY_PATH}"
}
}
}
......
......@@ -54,6 +54,15 @@ if ![info exists GCC_UNDER_TEST] {
set GCC_UNDER_TEST "[find_gcc]"
}
global orig_environment_saved
# This file may be sourced, so don't override environment settings
# that have been previously setup.
if { $orig_environment_saved == 0 } {
append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
set_ld_library_path_env_vars
}
#
# c-torture-compile -- runs the Tege C-torture test
#
......@@ -99,13 +108,6 @@ proc c-torture-compile { src option } {
#
proc c-torture-execute { sources args } {
global tmpdir tool srcdir output compiler_conditional_xfail_data
global ld_library_path ld_library_path_multilib GCC_UNDER_TEST
if { "$ld_library_path_multilib"
!= "[board_info target multilib_flags]" } {
set ld_library_path [find_libgcc_s $GCC_UNDER_TEST]
set_ld_library_path_env_vars
}
# Use the first source filename given as the filename under test.
set src [lindex $sources 0]
......
......@@ -106,51 +106,52 @@ proc g++_link_flags { paths } {
set gccpath ${paths}
set libio_dir ""
set flags ""
set ld_library_path ""
set ld_library_path "."
set shlib_ext [get_shlib_extension]
verbose "shared lib extension: $shlib_ext"
if { $gccpath != "" } {
if [file exists "${gccpath}/lib/libstdc++.a"] {
add_path ld_library_path "${gccpath}/lib"
append ld_library_path ":${gccpath}/lib"
}
if [file exists "${gccpath}/libg++/libg++.a"] {
append flags "-L${gccpath}/libg++ "
add_path ld_library_path "${gccpath}/libg++"
append ld_library_path ":${gccpath}/libg++"
}
if [file exists "${gccpath}/libstdc++/libstdc++.a"] {
append flags "-L${gccpath}/libstdc++ "
add_path ld_library_path "${gccpath}/libstdc++"
append ld_library_path ":${gccpath}/libstdc++"
}
if [file exists "${gccpath}/libstdc++-v3/src/.libs/libstdc++.a"] {
append flags " -L${gccpath}/libstdc++-v3/src/.libs "
add_path ld_library_path "${gccpath}/libstdc++-v3/src/.libs"
append ld_library_path ":${gccpath}/libstdc++-v3/src/.libs"
}
# Look for libstdc++.${shlib_ext}.
if [file exists "${gccpath}/libstdc++-v3/src/.libs/libstdc++.${shlib_ext}"] {
append flags " -L${gccpath}/libstdc++-v3/src/.libs "
add_path ld_library_path "${gccpath}/libstdc++-v3/src/.libs"
append ld_library_path ":${gccpath}/libstdc++-v3/src/.libs"
}
if [file exists "${gccpath}/libiberty/libiberty.a"] {
append flags "-L${gccpath}/libiberty "
}
if [file exists "${gccpath}/librx/librx.a"] {
append flags "-L${gccpath}/librx "
}
add_path ld_library_path [find_libgcc_s $GXX_UNDER_TEST]
append ld_library_path [gcc-set-multilib-library-path $GXX_UNDER_TEST]
} else {
global tool_root_dir
set libgpp [lookfor_file ${tool_root_dir} libg++]
if { $libgpp != "" } {
append flags "-L${libgpp} "
add_path ld_library_path ${libgpp}
append ld_library_path ":${libgpp}"
}
set libstdcpp [lookfor_file ${tool_root_dir} libstdc++]
if { $libstdcpp != "" } {
append flags "-L${libstdcpp} "
add_path ld_library_path ${libstdcpp}
append ld_library_path ":${libstdcpp}"
}
set libiberty [lookfor_file ${tool_root_dir} libiberty]
if { $libiberty != "" } {
......
......@@ -233,3 +233,35 @@ proc dg-additional-files-options { options source } {
return $options
}
# Return a colon-separate list of directories to search for libraries
# for COMPILER, including multilib directories.
proc gcc-set-multilib-library-path { compiler } {
global rootme
# ??? rootme will not be set when testing an installed compiler.
# In that case, we should perhaps use some other method to find
# libraries.
if {![info exists rootme]} {
return ""
}
set libpath ":${rootme}"
set compiler [lindex $compiler 0]
if { [is_remote host] == 0 && [which $compiler] != 0 } {
foreach i "[exec $compiler --print-multi-lib]" {
set mldir ""
regexp -- "\[a-z0-9=_/\.-\]*;" $i mldir
set mldir [string trimright $mldir "\;@"]
if { "$mldir" == "." } {
continue
}
if { [llength [glob -nocomplain ${rootme}/${mldir}/libgcc_s*.so.*]] >= 1 } {
append libpath ":${rootme}/${mldir}"
}
}
}
return $libpath
}
......@@ -65,6 +65,15 @@ if ![info exists GCC_UNDER_TEST] {
set GCC_UNDER_TEST "[find_gcc]"
}
global orig_environment_saved
# This file may be sourced, so don't override environment settings
# that have been previously setup.
if { $orig_environment_saved == 0 } {
append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
set_ld_library_path_env_vars
}
# Define gcc callbacks for dg.exp.
proc gcc-dg-test-1 { target_compile prog do_what extra_tool_flags } {
......@@ -108,14 +117,6 @@ proc gcc-dg-test-1 { target_compile prog do_what extra_tool_flags } {
set output_file "[file rootname [file tail $prog]].o"
}
"run" {
global ld_library_path ld_library_path_multilib GCC_UNDER_TEST
if { "$ld_library_path_multilib"
!= "[board_info target multilib_flags]" } {
set ld_library_path [find_libgcc_s $GCC_UNDER_TEST]
set_ld_library_path_env_vars
}
set compile_type "executable"
# FIXME: "./" is to cope with "." not being in $PATH.
# Should this be handled elsewhere?
......
......@@ -84,7 +84,7 @@ proc gfortran_link_flags { paths } {
set gccpath ${paths}
set libio_dir ""
set flags ""
set ld_library_path ""
set ld_library_path "."
set shlib_ext [get_shlib_extension]
verbose "shared lib extension: $shlib_ext"
......@@ -94,11 +94,11 @@ proc gfortran_link_flags { paths } {
# for uninstalled testing.
append flags "-B${gccpath}/libgfortran/.libs "
append flags "-L${gccpath}/libgfortran/.libs "
add_path ld_library_path "${gccpath}/libgfortran/.libs"
append ld_library_path ":${gccpath}/libgfortran/.libs"
}
if [file exists "${gccpath}/libgfortran/.libs/libgfortran.${shlib_ext}"] {
append flags "-L${gccpath}/libgfortran/.libs "
add_path ld_library_path "${gccpath}/libgfortran/.libs"
append ld_library_path ":${gccpath}/libgfortran/.libs"
}
if [file exists "${gccpath}/libgfortran/libgforbegin.a"] {
append flags "-L${gccpath}/libgfortran "
......@@ -106,7 +106,8 @@ proc gfortran_link_flags { paths } {
if [file exists "${gccpath}/libiberty/libiberty.a"] {
append flags "-L${gccpath}/libiberty "
}
add_path ld_library_path [find_libgcc_s $GFORTRAN_UNDER_TEST]
append ld_library_path \
[gcc-set-multilib-library-path $GFORTRAN_UNDER_TEST]
}
set_ld_library_path_env_vars
......
......@@ -147,7 +147,7 @@ proc gnat_target_compile { source dest type options } {
set GNAT_UNDER_TEST "$GNAT_UNDER_TEST_ORIG $gnat_rts_opt"
}
set ld_library_path ${gnat_libgcc_s_path}
set ld_library_path ".:${gnat_libgcc_s_path}"
lappend options "compiler=$GNAT_UNDER_TEST -q -f"
lappend options "timeout=[timeout_value]"
......
......@@ -106,30 +106,30 @@ proc obj-c++_link_flags { paths } {
set gccpath ${paths}
set libio_dir ""
set flags ""
set ld_library_path ""
set ld_library_path "."
set shlib_ext [get_shlib_extension]
verbose "shared lib extension: $shlib_ext"
if { $gccpath != "" } {
if [file exists "${gccpath}/lib/libstdc++.a"] {
add_path ld_library_path "${gccpath}/lib"
append ld_library_path ":${gccpath}/lib"
}
if [file exists "${gccpath}/libg++/libg++.a"] {
append flags "-L${gccpath}/libg++ "
add_path ld_library_path "${gccpath}/libg++"
append ld_library_path ":${gccpath}/libg++"
}
if [file exists "${gccpath}/libstdc++/libstdc++.a"] {
append flags "-L${gccpath}/libstdc++ "
add_path ld_library_path "${gccpath}/libstdc++"
append ld_library_path ":${gccpath}/libstdc++"
}
if [file exists "${gccpath}/libstdc++-v3/src/.libs/libstdc++.a"] {
append flags " -L${gccpath}/libstdc++-v3/src/.libs "
add_path ld_library_path "${gccpath}/libstdc++-v3/src/.libs"
append ld_library_path ":${gccpath}/libstdc++-v3/src/.libs"
}
# Look for libstdc++.${shlib_ext}.
if [file exists "${gccpath}/libstdc++-v3/src/.libs/libstdc++.${shlib_ext}"] {
append flags " -L${gccpath}/libstdc++-v3/src/.libs "
add_path ld_library_path "${gccpath}/libstdc++-v3/src/.libs"
append ld_library_path ":${gccpath}/libstdc++-v3/src/.libs"
}
if [file exists "${gccpath}/libiberty/libiberty.a"] {
append flags "-L${gccpath}/libiberty "
......@@ -158,21 +158,23 @@ proc obj-c++_link_flags { paths } {
if { $libobjc_dir != "" } {
set libobjc_dir [file dirname ${libobjc_dir}]
append flags "-L${libobjc_dir}"
add_path ld_library_path ${libobjc_dir}
append ld_library_path ":${libobjc_dir}"
}
add_path ld_library_path [find_libgcc_s $OBJCXX_UNDER_TEST]
append ld_library_path \
[gcc-set-multilib-library-path $OBJCXX_UNDER_TEST]
} else {
global tool_root_dir;
set libgpp [lookfor_file ${tool_root_dir} libg++];
if { $libgpp != "" } {
append flags "-L${libgpp} ";
add_path ld_library_path ${libgpp}
append ld_library_path ":${libgpp}"
}
set libstdcpp [lookfor_file ${tool_root_dir} libstdc++];
if { $libstdcpp != "" } {
append flags "-L${libstdcpp} ";
add_path ld_library_path ${libstdcpp}
append ld_library_path ":${libstdcpp}"
}
set libiberty [lookfor_file ${tool_root_dir} libiberty];
if { $libiberty != "" } {
......
......@@ -121,7 +121,7 @@ proc objc_init { args } {
objc_maybe_build_wrapper "${tmpdir}/objc-testglue.o"
set objc_libgcc_s_path [find_libgcc_s $OBJC_UNDER_TEST]
set objc_libgcc_s_path [gcc-set-multilib-library-path $OBJC_UNDER_TEST]
}
proc objc_target_compile { source dest type options } {
......@@ -135,7 +135,7 @@ proc objc_target_compile { source dest type options } {
global objc_libgcc_s_path
global shlib_ext
set ld_library_path ${objc_libgcc_s_path}
set ld_library_path ".:${objc_libgcc_s_path}"
lappend options "libs=-lobjc"
set shlib_ext [get_shlib_extension]
verbose "shared lib extension: $shlib_ext"
......@@ -191,7 +191,7 @@ proc objc_target_compile { source dest type options } {
set libobjc_dir [file dirname ${libobjc_dir}]
set objc_link_flags "-L${libobjc_dir}"
lappend options "additional_flags=${objc_link_flags}"
add_path ld_library_path ${libobjc_dir}
append ld_library_path ":${libobjc_dir}"
}
if { $type == "precompiled_header" } {
# If we generating a precompiled header, we have say this is an
......
2009-07-11 Richard Sandiford <rdsandiford@googlemail.com>
PR testsuite/40699
PR testsuite/40707
PR testsuite/40709
* testsuite/lib/libffi-dg.exp: Revert 2009-07-02, 2009-07-01 and
2009-06-30 commits.
2009-07-01 Richard Sandiford <r.sandiford@uk.ibm.com>
* testsuite/lib/libffi-dg.exp (libffi-init): Set ld_library_path
......
......@@ -107,16 +107,33 @@ proc libffi-init { args } {
set blddircxx [lookfor_file [get_multilibs] libstdc++-v3]
verbose "libstdc++ $blddircxx"
set ld_library_path ""
set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a]
if {$gccdir != ""} {
set gccdir [file dirname $gccdir]
add_path ld_library_path [find_libgcc_s "$gccdir/xgcc"]
}
verbose "gccdir $gccdir"
set ld_library_path "."
append ld_library_path ":${gccdir}"
set compiler "${gccdir}/xgcc"
if { [is_remote host] == 0 && [which $compiler] != 0 } {
foreach i "[exec $compiler --print-multi-lib]" {
set mldir ""
regexp -- "\[a-z0-9=_/\.-\]*;" $i mldir
set mldir [string trimright $mldir "\;@"]
if { "$mldir" == "." } {
continue
}
if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]] >= 1 } {
append ld_library_path ":${gccdir}/${mldir}"
}
}
}
# add the library path for libffi.
add_path ld_library_path "${blddirffi}/.libs"
append ld_library_path ":${blddirffi}/.libs"
# add the library path for libstdc++ as well.
add_path ld_library_path "${blddircxx}/src/.libs"
append ld_library_path ":${blddircxx}/src/.libs"
verbose "ld_library_path: $ld_library_path"
......
2009-07-11 Richard Sandiford <rdsandiford@googlemail.com>
PR testsuite/40699
PR testsuite/40707
PR testsuite/40709
* testsuite/lib/libgomp.exp: Revert 2009-07-02 and 2009-06-30 commits.
* testsuite/libgomp.c/c.exp, testsuite/libgomp.c++/c++.exp,
testsuite/libgomp.fortran/fortran.exp: Revert 2009-06-30 commits.
2009-07-02 Richard Sandiford <r.sandiford@uk.ibm.com>
* testsuite/lib/libgomp.exp (libgomp_init): Use the ALWAYS_CFLAGS
......
......@@ -86,6 +86,40 @@ proc libgomp_init { args } {
set CFLAGS ""
}
# Locate libgcc.a so we don't need to account for different values of
# SHLIB_EXT on different platforms
set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a]
if {$gccdir != ""} {
set gccdir [file dirname $gccdir]
}
# Compute what needs to be put into LD_LIBRARY_PATH
set always_ld_library_path ".:${blddir}/.libs"
# Compute what needs to be added to the existing LD_LIBRARY_PATH.
if {$gccdir != ""} {
# Add AIX pthread directory first.
if { [llength [glob -nocomplain ${gccdir}/pthread/libgcc_s*.a]] >= 1 } {
append always_ld_library_path ":${gccdir}/pthread"
}
append always_ld_library_path ":${gccdir}"
set compiler [lindex $GCC_UNDER_TEST 0]
if { [is_remote host] == 0 && [which $compiler] != 0 } {
foreach i "[exec $compiler --print-multi-lib]" {
set mldir ""
regexp -- "\[a-z0-9=_/\.-\]*;" $i mldir
set mldir [string trimright $mldir "\;@"]
if { "$mldir" == "." } {
continue
}
if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]] >= 1 } {
append always_ld_library_path ":${gccdir}/${mldir}"
}
}
}
}
set ALWAYS_CFLAGS ""
if { $blddir != "" } {
lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/"
......@@ -119,16 +153,6 @@ proc libgomp_init { args } {
# And, gee, turn on OpenMP.
lappend ALWAYS_CFLAGS "additional_flags=-fopenmp"
set compiler $GCC_UNDER_TEST
foreach flag $ALWAYS_CFLAGS {
if { [regexp {^(additional_flags|ldflags)=(.*)} $flag d1 d2 option] } {
lappend compiler $option
}
}
set always_ld_library_path "${blddir}/.libs"
add_path always_ld_library_path [find_libgcc_s $compiler]
}
#
......
......@@ -37,10 +37,12 @@ if { $lang_test_file_found } {
# Gather a list of all tests.
set tests [lsort [glob -nocomplain $srcdir/$subdir/*.C]]
set ld_library_path $always_ld_library_path
if { $blddir != "" } {
add_path ld_library_path "${blddir}/${lang_library_path}"
set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}"
} else {
set ld_library_path "$always_ld_library_path"
}
append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
set_ld_library_path_env_vars
set flags_file "${blddir}/../libstdc++-v3/scripts/testsuite_flags"
......
......@@ -20,6 +20,7 @@ dg-init
set tests [lsort [find $srcdir/$subdir *.c]]
set ld_library_path $always_ld_library_path
append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
set_ld_library_path_env_vars
# Main loop.
......
......@@ -26,10 +26,12 @@ if { $lang_test_file_found } {
# Gather a list of all tests.
set tests [lsort [find $srcdir/$subdir *.\[fF\]{,90,95,03,08}]]
set ld_library_path $always_ld_library_path
if { $blddir != "" } {
add_path ld_library_path "${blddir}/${lang_library_path}"
set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}"
} else {
set ld_library_path "$always_ld_library_path"
}
append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
set_ld_library_path_env_vars
# Main loop.
......
2009-07-11 Richard Sandiford <rdsandiford@googlemail.com>
PR testsuite/40699
PR testsuite/40707
PR testsuite/40709
* testsuite/lib/libjava.exp: Revert 2009-06-30 commit.
2009-06-30 Richard Sandiford <r.sandiford@uk.ibm.com>
* testsuite/lib/libjava.exp (libjava_init): Just add
......
......@@ -197,8 +197,36 @@ proc libjava_init { args } {
}
# Finally, add the gcc build directory so that we can find the
# shared libgcc.
set libjava_libgcc_s_path [find_libgcc_s $GCJ_UNDER_TEST]
# shared libgcc. This, like much of dejagnu, is hideous.
set libjava_libgcc_s_path {}
if { [istarget "*-*-darwin*"] } {
set so_extension "dylib"
} elseif { [istarget "*-*-cygwin*"] || [istarget "*-*-mingw*"] } {
set so_extension "dll"
} else {
set so_extension "so"
}
set gccdir [lookfor_file $tool_root_dir gcc/libgcc_s.${so_extension}]
if {$gccdir != ""} {
set gccdir [file dirname $gccdir]
lappend libjava_libgcc_s_path $gccdir
verbose "libjava_libgcc_s_path = $libjava_libgcc_s_path"
set compiler ${gccdir}/xgcc
if { [is_remote host] == 0 && [which $compiler] != 0 } {
foreach i "[exec $compiler --print-multi-lib]" {
set mldir ""
regexp -- "\[a-z0-9=_/\.-\]*;" $i mldir
set mldir [string trimright $mldir "\;@"]
if { "$mldir" == "." } {
continue
}
if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.${so_extension}.*]] >= 1 } {
lappend libjava_libgcc_s_path "${gccdir}/${mldir}"
}
}
}
}
set libjava_initialized 1
}
......@@ -309,8 +337,6 @@ proc libjava_arguments {{mode compile}} {
# Basically we want to build up a colon separated path list from
# the value of $libjava.
# Add "." to the list so that we pick up shared libraries created
# by the testsuite itself.
set lpath "."
foreach dir [list $libjava] {
foreach item [split $dir " "] {
......@@ -444,8 +470,8 @@ proc gcj_invoke {program expectFile ld_library_additions} {
global ld_library_path
set ld_library_path "$libjava_ld_library_path"
foreach path $ld_library_additions {
add_path ld_library_path $path
if {[llength $ld_library_additions] > 0} {
append ld_library_path :[join $ld_library_additions :]
}
set_ld_library_path_env_vars
......@@ -486,8 +512,8 @@ proc exec_gij {jarfile expectFile {ld_library_additions {}} {addl_flags {}}} {
global ld_library_path
set ld_library_path "$libjava_ld_library_path"
foreach path $ld_library_additions {
add_path ld_library_path $path
if {[llength $ld_library_additions] > 0} {
append ld_library_path :[join $ld_library_additions :]
}
set_ld_library_path_env_vars
......@@ -536,8 +562,8 @@ proc libjava_invoke {errname testName optName executable inpfile resultfile
global ld_library_path
set ld_library_path "$libjava_ld_library_path"
foreach path $ld_library_additions {
add_path ld_library_path $path
if {[llength $ld_library_additions] > 0} {
append ld_library_path :[join $ld_library_additions :]
}
set_ld_library_path_env_vars
......
2009-07-11 Richard Sandiford <rdsandiford@googlemail.com>
PR testsuite/40699
PR testsuite/40707
PR testsuite/40709
* testsuite/lib/libmudflap.exp: Revert 2009-06-30 commit.
2009-07-01 Richard Guenther <rguenther@suse.de>
PR tree-optimization/19831
......
......@@ -60,9 +60,28 @@ proc libmudflap-init { language } {
# set LD_LIBRARY_PATH so that libgcc_s, libstdc++ binaries can be found.
# locate libgcc.a so we don't need to account for different values of
# SHLIB_EXT on different platforms
set ld_library_path [find_libgcc_s $cxx]
add_path ld_library_path "${cxxblddir}/src/.libs"
add_path ld_library_path "${blddir}/.libs"
set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a]
if {$gccdir != ""} {
set gccdir [file dirname $gccdir]
}
set ld_library_path "."
append ld_library_path ":${gccdir}"
append ld_library_path ":${cxxblddir}/src/.libs"
if {[is_remote host] == 0} {
foreach i "[exec ${gccdir}/xgcc --print-multi-lib]" {
set mldir ""
regexp -- "\[a-z0-9=_/\.-\]*;" $i mldir
set mldir [string trimright $mldir "\;@"]
if { "$mldir" == "." } {
continue
}
if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]] >= 1 } {
append ld_library_path ":${gccdir}/${mldir}"
}
}
}
append ld_library_path ":${blddir}/.libs"
set libs "-L${blddir}/.libs"
set cxxflags "-ggdb3 -DDEBUG_ASSERT"
......
2009-07-11 Richard Sandiford <rdsandiford@googlemail.com>
PR testsuite/40699
PR testsuite/40707
PR testsuite/40709
* testsuite/lib/libstdc++.exp: Revert 2009-06-30 commit.
2009-07-08 Janis Johnson <janis187@us.ibm.com>
PR libstdc++/40691
......
......@@ -132,6 +132,7 @@ proc libstdc++_init { testfile } {
set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a]
if {$gccdir != ""} {
set gccdir [file dirname $gccdir]
append ld_library_path_tmp ":${gccdir}"
}
v3track gccdir 3
......@@ -141,7 +142,7 @@ proc libstdc++_init { testfile } {
if {$libgompdir != ""} {
set v3-libgomp 1
set libgompdir [file dirname $libgompdir]
add_path ld_library_path_tmp ${libgompdir}
append ld_library_path_tmp ":${libgompdir}"
verbose -log "libgomp support detected"
}
v3track libgompdir 3
......@@ -161,8 +162,22 @@ proc libstdc++_init { testfile } {
if {$gccdir != ""} {
set compiler ${gccdir}/g++
set ld_library_path ${ld_library_path_tmp}
add_path ld_library_path "${blddir}/src/.libs"
add_path ld_library_path [find_libgcc_s $compiler]
append ld_library_path ":${blddir}/src/.libs"
if { [is_remote host] == 0 && [which $compiler] != 0 } {
foreach i "[exec $compiler --print-multi-lib]" {
set mldir ""
regexp -- "\[a-z0-9=_/\.-\]*;" $i mldir
set mldir [string trimright $mldir "\;@"]
if { "$mldir" == "." } {
continue
}
if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]] >= 1 } {
append ld_library_path ":${gccdir}/${mldir}"
}
}
}
set_ld_library_path_env_vars
if [info exists env(LD_LIBRARY_PATH)] {
verbose -log "LD_LIBRARY_PATH = $env(LD_LIBRARY_PATH)"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment