PR libstdc++/90252 fix effective-target check for TBB

PR libstdc++/90252
	* testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
	Use "additional_flags" to pass -ltbb to v3_target_compile command.
	Use check_v3_target_prop_cached to cache the result of the test.

From-SVN: r271466
This commit is contained in:
Jonathan Wakely 2019-05-21 14:50:41 +01:00 committed by Jonathan Wakely
parent 049f115abb
commit f445f0f06c
2 changed files with 30 additions and 26 deletions

View File

@ -1,5 +1,10 @@
2019-05-21 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/90252
* testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
Use "additional_flags" to pass -ltbb to v3_target_compile command.
Use check_v3_target_prop_cached to cache the result of the test.
* doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
2019-05-20 Thomas Rodgers <trodgers@redhat.com>

View File

@ -1581,10 +1581,8 @@ proc check_effective_target_random_device { } {
# Return 1 if tbb parallel backend is available
proc check_effective_target_tbb-backend { } {
global cxxflags
# Set up and preprocess a C++ test program that depends
# on tbb
return [check_v3_target_prop_cached et_tbb {
# Set up and compile a C++ test program that depends on tbb
set src tbb_backend[pid].cc
set exe tbb_backend[pid].x
@ -1599,16 +1597,17 @@ proc check_effective_target_tbb-backend { } {
puts $f "}"
close $f
set lines [v3_target_compile $src $exe executable "-ltbb"]
set lines [v3_target_compile $src $exe executable "additional_flags=-std=c++17 additional_flags=-ltbb"]
file delete $src
if [string match "" $lines] {
# No error message, preprocessing succeeded.
# No error message, compilation succeeded.
verbose "check_v3_tbb-backend: `1'" 2
return 1
}
verbose "check_v3_tbb-backend: `0'" 2
return 0
}]
}
set additional_prunes ""