re PR target/41605 (Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution.)
2009-12-22 Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk> gcc/ PR target/41605 * lib/g++.exp: Provide -B options to allow for link spec %s substitutions for static libraries. libstdc++-v3/ PR target/41605 * testsuite/libstdc++-abi/abi.exp: Provide -B options to allow for link spec %s substitutions for static libraries. * testsuite/lib/libstdc++.exp: Ditto libgomp/ PR target/41605 * testsuite/lib/libgomp.exp: Provide -B options to allow for link spec %s substitutions for static libraries. From-SVN: r155408
This commit is contained in:
parent
4e7caa34a2
commit
1d32a77299
|
@ -1,3 +1,9 @@
|
||||||
|
2009-12-22 Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk>
|
||||||
|
|
||||||
|
PR target/41605
|
||||||
|
* lib/g++.exp: Provide -B options to allow for link spec %s
|
||||||
|
substitutions for static libraries.
|
||||||
|
|
||||||
2009-12-22 Brian Hackett <bhackett1024@gmail.com>
|
2009-12-22 Brian Hackett <bhackett1024@gmail.com>
|
||||||
|
|
||||||
* g++.dg/plugin/attribute_plugin.c: Rename pre-genericize event.
|
* g++.dg/plugin/attribute_plugin.c: Rename pre-genericize event.
|
||||||
|
|
|
@ -125,6 +125,9 @@ proc g++_link_flags { paths } {
|
||||||
}
|
}
|
||||||
if [file exists "${gccpath}/libstdc++-v3/src/.libs/libstdc++.a"] {
|
if [file exists "${gccpath}/libstdc++-v3/src/.libs/libstdc++.a"] {
|
||||||
append flags " -L${gccpath}/libstdc++-v3/src/.libs "
|
append flags " -L${gccpath}/libstdc++-v3/src/.libs "
|
||||||
|
# Some targets use libstdc++.a%s in their specs, so they need a
|
||||||
|
# -B option for uninstalled testing.
|
||||||
|
append flags " -B${gccpath}/libstdc++-v3/src/.libs "
|
||||||
append ld_library_path ":${gccpath}/libstdc++-v3/src/.libs"
|
append ld_library_path ":${gccpath}/libstdc++-v3/src/.libs"
|
||||||
}
|
}
|
||||||
# Look for libstdc++.${shlib_ext}.
|
# Look for libstdc++.${shlib_ext}.
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
2009-12-22 Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk>
|
||||||
|
|
||||||
|
PR target/41605
|
||||||
|
* testsuite/lib/libgomp.exp: Provide -B options to allow for
|
||||||
|
link spec %s substitutions for static libraries.
|
||||||
|
|
||||||
2009-12-18 Jack Howarth <howarth@bromo.med.uc.edu>
|
2009-12-18 Jack Howarth <howarth@bromo.med.uc.edu>
|
||||||
|
|
||||||
PR testsuite/42135
|
PR testsuite/42135
|
||||||
|
|
|
@ -130,6 +130,9 @@ proc libgomp_init { args } {
|
||||||
set ALWAYS_CFLAGS ""
|
set ALWAYS_CFLAGS ""
|
||||||
if { $blddir != "" } {
|
if { $blddir != "" } {
|
||||||
lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/"
|
lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/"
|
||||||
|
# targets that use libgomp.a%s in their specs need a -B option
|
||||||
|
# for uninstalled testing.
|
||||||
|
lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/.libs"
|
||||||
lappend ALWAYS_CFLAGS "additional_flags=-I${blddir}"
|
lappend ALWAYS_CFLAGS "additional_flags=-I${blddir}"
|
||||||
lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/.libs"
|
lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/.libs"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
2009-12-22 Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk>
|
||||||
|
|
||||||
|
PR target/41605
|
||||||
|
* testsuite/libstdc++-abi/abi.exp: Provide -B options to allow for
|
||||||
|
link spec %s substitutions for static libraries.
|
||||||
|
* testsuite/lib/libstdc++.exp: Ditto
|
||||||
|
|
||||||
2009-12-22 Jonathan Wakely <jwakely.gcc@gmail.com>
|
2009-12-22 Jonathan Wakely <jwakely.gcc@gmail.com>
|
||||||
|
|
||||||
* include/std/mutex (call_once(once_flag&, _Callable, _Args&&...)):
|
* include/std/mutex (call_once(once_flag&, _Callable, _Args&&...)):
|
||||||
|
|
|
@ -91,6 +91,8 @@ proc libstdc++_init { testfile } {
|
||||||
global target_triplet
|
global target_triplet
|
||||||
global flags_file
|
global flags_file
|
||||||
global tool_timeout
|
global tool_timeout
|
||||||
|
global DEFAULT_CXXFLAGS
|
||||||
|
global STATIC_LIBCXXFLAGS
|
||||||
|
|
||||||
# We set LC_ALL and LANG to C so that we get the same error
|
# We set LC_ALL and LANG to C so that we get the same error
|
||||||
# messages as expected.
|
# messages as expected.
|
||||||
|
@ -106,6 +108,7 @@ proc libstdc++_init { testfile } {
|
||||||
|
|
||||||
set blddir [lookfor_file [get_multilibs] libstdc++-v3]
|
set blddir [lookfor_file [get_multilibs] libstdc++-v3]
|
||||||
set flags_file "${blddir}/scripts/testsuite_flags"
|
set flags_file "${blddir}/scripts/testsuite_flags"
|
||||||
|
set shlib_ext [get_shlib_extension]
|
||||||
v3track flags_file 2
|
v3track flags_file 2
|
||||||
|
|
||||||
# If a test doesn't have special options, use DEFAULT_CXXFLAGS.
|
# If a test doesn't have special options, use DEFAULT_CXXFLAGS.
|
||||||
|
@ -114,7 +117,7 @@ proc libstdc++_init { testfile } {
|
||||||
# 2) might need to be negated
|
# 2) might need to be negated
|
||||||
# In particular, some tests have to be run without precompiled
|
# In particular, some tests have to be run without precompiled
|
||||||
# headers, or without assertions.
|
# headers, or without assertions.
|
||||||
global DEFAULT_CXXFLAGS
|
|
||||||
if ![info exists DEFAULT_CXXFLAGS] then {
|
if ![info exists DEFAULT_CXXFLAGS] then {
|
||||||
set DEFAULT_CXXFLAGS ""
|
set DEFAULT_CXXFLAGS ""
|
||||||
# Host specific goo here.
|
# Host specific goo here.
|
||||||
|
@ -145,7 +148,7 @@ proc libstdc++_init { testfile } {
|
||||||
|
|
||||||
# Locate libgomp. This is only required for parallel mode.
|
# Locate libgomp. This is only required for parallel mode.
|
||||||
set v3-libgomp 0
|
set v3-libgomp 0
|
||||||
set libgompdir [lookfor_file $blddir/../libgomp .libs/libgomp.so]
|
set libgompdir [lookfor_file $blddir/../libgomp .libs/libgomp.$shlib_ext]
|
||||||
if {$libgompdir != ""} {
|
if {$libgompdir != ""} {
|
||||||
set v3-libgomp 1
|
set v3-libgomp 1
|
||||||
set libgompdir [file dirname $libgompdir]
|
set libgompdir [file dirname $libgompdir]
|
||||||
|
@ -156,7 +159,7 @@ proc libstdc++_init { testfile } {
|
||||||
|
|
||||||
# Locate libstdc++ shared library. (ie libstdc++.so.)
|
# Locate libstdc++ shared library. (ie libstdc++.so.)
|
||||||
set v3-sharedlib 0
|
set v3-sharedlib 0
|
||||||
set sharedlibdir [lookfor_file $blddir src/.libs/libstdc++.so]
|
set sharedlibdir [lookfor_file $blddir src/.libs/libstdc++.$shlib_ext]
|
||||||
if {$sharedlibdir != ""} {
|
if {$sharedlibdir != ""} {
|
||||||
if { [string match "*-*-linux*" $target_triplet] && [isnative] } {
|
if { [string match "*-*-linux*" $target_triplet] && [isnative] } {
|
||||||
set v3-sharedlib 1
|
set v3-sharedlib 1
|
||||||
|
@ -165,6 +168,15 @@ proc libstdc++_init { testfile } {
|
||||||
}
|
}
|
||||||
v3track v3-sharedlib 3
|
v3track v3-sharedlib 3
|
||||||
|
|
||||||
|
set STATIC_LIBCXXFLAGS ""
|
||||||
|
set staticlibdir [lookfor_file $blddir src/.libs/libstdc++.a]
|
||||||
|
if {$staticlibdir != ""} {
|
||||||
|
set staticlibdir [file dirname $staticlibdir]
|
||||||
|
# Some targets use libstdc++.a%s in their specs, so they need a
|
||||||
|
# -B option for uninstalled testing.
|
||||||
|
set STATIC_LIBCXXFLAGS " -B${staticlibdir} "
|
||||||
|
}
|
||||||
|
|
||||||
# Compute what needs to be added to the existing LD_LIBRARY_PATH.
|
# Compute what needs to be added to the existing LD_LIBRARY_PATH.
|
||||||
if {$gccdir != ""} {
|
if {$gccdir != ""} {
|
||||||
set compiler ${gccdir}/g++
|
set compiler ${gccdir}/g++
|
||||||
|
@ -403,6 +415,7 @@ proc v3_target_compile { source dest type options } {
|
||||||
global cxxflags
|
global cxxflags
|
||||||
global cxxldflags
|
global cxxldflags
|
||||||
global includes
|
global includes
|
||||||
|
global STATIC_LIBCXXFLAGS
|
||||||
|
|
||||||
if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } {
|
if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } {
|
||||||
lappend options "libs=${gluefile}"
|
lappend options "libs=${gluefile}"
|
||||||
|
@ -412,6 +425,7 @@ proc v3_target_compile { source dest type options } {
|
||||||
set cxx_final $cxx
|
set cxx_final $cxx
|
||||||
set cxxlibglossflags [libgloss_link_flags]
|
set cxxlibglossflags [libgloss_link_flags]
|
||||||
set cxx_final [concat $cxx_final $cxxlibglossflags]
|
set cxx_final [concat $cxx_final $cxxlibglossflags]
|
||||||
|
set cxx_final [concat $cxx_final $STATIC_LIBCXXFLAGS]
|
||||||
set cxx_final [concat $cxx_final $cxxflags]
|
set cxx_final [concat $cxx_final $cxxflags]
|
||||||
set cxx_final [concat $cxx_final $includes]
|
set cxx_final [concat $cxx_final $includes]
|
||||||
|
|
||||||
|
@ -443,6 +457,7 @@ proc v3_target_compile_as_c { source dest type options } {
|
||||||
global blddir
|
global blddir
|
||||||
global cc
|
global cc
|
||||||
global cxxflags
|
global cxxflags
|
||||||
|
global STATIC_LIBCXXFLAGS
|
||||||
|
|
||||||
if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } {
|
if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } {
|
||||||
lappend options "libs=${gluefile}"
|
lappend options "libs=${gluefile}"
|
||||||
|
@ -453,6 +468,7 @@ proc v3_target_compile_as_c { source dest type options } {
|
||||||
set cc_final $cc
|
set cc_final $cc
|
||||||
set cxxlibglossflags [libgloss_link_flags]
|
set cxxlibglossflags [libgloss_link_flags]
|
||||||
set cc_final [concat $cc_final $cxxlibglossflags]
|
set cc_final [concat $cc_final $cxxlibglossflags]
|
||||||
|
set cc_final [concat $cc_final $STATIC_LIBCXXFLAGS]
|
||||||
set cc_final [concat $cc_final $cxxflags]
|
set cc_final [concat $cc_final $cxxflags]
|
||||||
set cc_final [concat $cc_final $includes]
|
set cc_final [concat $cc_final $includes]
|
||||||
regsub -all {\s[-]nostdinc[+][+]} $cc_final "" cc_final
|
regsub -all {\s[-]nostdinc[+][+]} $cc_final "" cc_final
|
||||||
|
|
|
@ -18,7 +18,12 @@
|
||||||
# this test. Or, hey, if we don't support this kind of symbol
|
# this test. Or, hey, if we don't support this kind of symbol
|
||||||
# versioning test: don't run it.
|
# versioning test: don't run it.
|
||||||
|
|
||||||
set lib $blddir/src/.libs/libstdc++.so
|
if { [string match "*-*-darwin*" $target_triplet] } {
|
||||||
|
set lib $blddir/src/.libs/libstdc++.dylib
|
||||||
|
} else {
|
||||||
|
set lib $blddir/src/.libs/libstdc++.so
|
||||||
|
}
|
||||||
|
|
||||||
set baseline_subdir "[eval exec $cxx --print-multi-dir]"
|
set baseline_subdir "[eval exec $cxx --print-multi-dir]"
|
||||||
|
|
||||||
# Build the support objects.
|
# Build the support objects.
|
||||||
|
|
Loading…
Reference in New Issue