g++.exp (g++_link_flags): Use gcc-set-multilib-library-path.
* lib/g++.exp (g++_link_flags): Use gcc-set-multilib-library-path. (g++_init): Make sure that CXXFLAGS is set. * lib/gcc-defs.exp (gcc-set-multilib-library-path): New function. * lib/gcc-dg.exp: Use gcc-set-multilib-library-path. * lib/gfortran.exp (gfortran_link_flags): Likewise. * lib/objc.exp (objc_init): Likewise. * lib/treelang.exp (treelang_init): Likewise. From-SVN: r97076
This commit is contained in:
parent
c4803fca61
commit
e0b23a586c
|
@ -1,3 +1,13 @@
|
|||
2005-03-25 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* lib/g++.exp (g++_link_flags): Use gcc-set-multilib-library-path.
|
||||
(g++_init): Make sure that CXXFLAGS is set.
|
||||
* lib/gcc-defs.exp (gcc-set-multilib-library-path): New function.
|
||||
* lib/gcc-dg.exp: Use gcc-set-multilib-library-path.
|
||||
* lib/gfortran.exp (gfortran_link_flags): Likewise.
|
||||
* lib/objc.exp (objc_init): Likewise.
|
||||
* lib/treelang.exp (treelang_init): Likewise.
|
||||
|
||||
2005-03-25 Pat Haugen <pthaugen@us.ibm.com>
|
||||
|
||||
PR tree-optimization/20470
|
||||
|
|
|
@ -97,7 +97,6 @@ proc g++_include_flags { paths } {
|
|||
#
|
||||
|
||||
proc g++_link_flags { paths } {
|
||||
global rootme
|
||||
global srcdir
|
||||
global ld_library_path
|
||||
global GXX_UNDER_TEST
|
||||
|
@ -129,21 +128,7 @@ proc g++_link_flags { paths } {
|
|||
if [file exists "${gccpath}/librx/librx.a"] {
|
||||
append flags "-L${gccpath}/librx "
|
||||
}
|
||||
append ld_library_path ":${rootme}"
|
||||
set compiler [lindex $GXX_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 ${rootme}/${mldir}/libgcc_s*.so.*]] >= 1 } {
|
||||
append ld_library_path ":${rootme}/${mldir}"
|
||||
}
|
||||
}
|
||||
}
|
||||
append ld_library_path [gcc-set-multilib-library-path $GXX_UNDER_TEST]
|
||||
} else {
|
||||
global tool_root_dir
|
||||
|
||||
|
@ -185,6 +170,7 @@ proc g++_init { args } {
|
|||
global gluefile wrap_flags
|
||||
global objdir srcdir
|
||||
global ALWAYS_CXXFLAGS
|
||||
global CXXFLAGS
|
||||
global TOOL_EXECUTABLE TOOL_OPTIONS
|
||||
global GXX_UNDER_TEST
|
||||
global TESTING_IN_BUILD_TREE
|
||||
|
@ -227,6 +213,10 @@ proc g++_init { args } {
|
|||
|
||||
g++_maybe_build_wrapper "${tmpdir}/g++-testglue.o"
|
||||
|
||||
if {![info exists CXXFLAGS]} {
|
||||
set CXXFLAGS ""
|
||||
}
|
||||
|
||||
set ALWAYS_CXXFLAGS ""
|
||||
|
||||
if ![is_remote host] {
|
||||
|
|
|
@ -219,3 +219,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
|
||||
}
|
||||
|
|
|
@ -52,28 +52,12 @@ if ![info exists GCC_UNDER_TEST] {
|
|||
set GCC_UNDER_TEST "[find_gcc]"
|
||||
}
|
||||
|
||||
global rootme
|
||||
global ld_library_path
|
||||
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 } {
|
||||
set ld_library_path "${rootme}"
|
||||
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 ${rootme}/${mldir}/libgcc_s*.so.*]] >= 1 } {
|
||||
append ld_library_path ":${rootme}/${mldir}"
|
||||
}
|
||||
}
|
||||
}
|
||||
append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
|
||||
set_ld_library_path_env_vars
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,6 @@ proc gfortran_version { } {
|
|||
#
|
||||
|
||||
proc gfortran_link_flags { paths } {
|
||||
global rootme
|
||||
global srcdir
|
||||
global ld_library_path
|
||||
global GFORTRAN_UNDER_TEST
|
||||
|
@ -94,21 +93,8 @@ proc gfortran_link_flags { paths } {
|
|||
if [file exists "${gccpath}/libiberty/libiberty.a"] {
|
||||
append flags "-L${gccpath}/libiberty "
|
||||
}
|
||||
append ld_library_path ":${rootme}"
|
||||
set compiler [lindex $GFORTRAN_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 ${rootme}/${mldir}/libgcc_s*.so.*]] >= 1 } {
|
||||
append ld_library_path ":${rootme}/${mldir}"
|
||||
}
|
||||
}
|
||||
}
|
||||
append ld_library_path \
|
||||
[gcc-set-multilib-library-path $GFORTRAN_UNDER_TEST]
|
||||
}
|
||||
|
||||
set_ld_library_path_env_vars
|
||||
|
|
|
@ -115,21 +115,7 @@ proc objc_init { args } {
|
|||
|
||||
objc_maybe_build_wrapper "${tmpdir}/objc-testglue.o"
|
||||
|
||||
set objc_libgcc_s_path "${rootme}"
|
||||
set compiler [lindex $OBJC_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 ${rootme}/${mldir}/libgcc_s*.so.*]] >= 1 } {
|
||||
append objc_libgcc_s_path ":${rootme}/${mldir}"
|
||||
}
|
||||
}
|
||||
}
|
||||
append objc_libgcc_s_path [gcc-set-multilib-library-path $OBJC_UNDER_TEST]
|
||||
}
|
||||
|
||||
proc objc_target_compile { source dest type options } {
|
||||
|
|
|
@ -84,7 +84,6 @@ proc default_treelang_version { } {
|
|||
set treelang_initialized 0
|
||||
|
||||
proc treelang_init { args } {
|
||||
global rootme
|
||||
global tmpdir
|
||||
global libdir
|
||||
global gluefile wrap_flags
|
||||
|
@ -115,21 +114,8 @@ proc treelang_init { args } {
|
|||
|
||||
treelang_maybe_build_wrapper "${tmpdir}/treelang-testglue.o"
|
||||
|
||||
set treelang_libgcc_s_path "${rootme}"
|
||||
set compiler [lindex $TREELANG_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 ${rootme}/${mldir}/libgcc_s*.so.*]] >= 1 } {
|
||||
append treelang_libgcc_s_path ":${rootme}/${mldir}"
|
||||
}
|
||||
}
|
||||
}
|
||||
set treelang_libgcc_s_path \
|
||||
[gcc-set-multilib-library-path $TREELANG_UNDER_TEST]
|
||||
}
|
||||
|
||||
proc treelang_target_compile { source dest type options } {
|
||||
|
|
Loading…
Reference in New Issue