Commit d748c543 by Thomas Rodgers Committed by Thomas Rodgers

Check TBB version in tbb-backed effective target check

      * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
      Add check for Thread Building Blocks 2018 or later.

From-SVN: r271450
parent 469528f2
2019-05-20 Thomas Rodgers <trodgers@redhat.com>
* testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
Add check for Thread Building Blocks 2018 or later.
2019-05-20 Jonathan Wakely <jwakely@redhat.com> 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
* testsuite/experimental/names.cc: Only include Networking TS headers * testsuite/experimental/names.cc: Only include Networking TS headers
......
...@@ -1581,25 +1581,29 @@ proc check_effective_target_random_device { } { ...@@ -1581,25 +1581,29 @@ proc check_effective_target_random_device { } {
# Return 1 if tbb parallel backend is available # Return 1 if tbb parallel backend is available
proc check_effective_target_tbb-backend { } { proc check_effective_target_tbb-backend { } {
global cxxflags global cxxflags
# Set up and preprocess a C++ test program that depends # Set up and preprocess a C++ test program that depends
# on tbb # on tbb
set src tbb_backend[pid].cc set src tbb_backend[pid].cc
set f [open $src "w"] set f [open $src "w"]
puts $f "#include <tbb/tbb.h>" puts $f "#include <tbb/tbb.h>"
close $f puts $f "#if TBB_INTERFACE_VERSION < 10000"
set lines [v3_target_compile $src /dev/null preprocess ""] puts $f "# error Intel(R) Threading Building Blocks 2018 is required; older versions are not supported."
file delete $src puts $f "#endif"
close $f
if [string match "" $lines] {
# No error message, preprocessing succeeded. set lines [v3_target_compile $src /dev/null preprocess ""]
verbose "check_v3_tbb-backend: `1'" 2 file delete $src
return 1
} if [string match "" $lines] {
verbose "check_v3_tbb-backend: `0'" 2 # No error message, preprocessing succeeded.
return 0 verbose "check_v3_tbb-backend: `1'" 2
return 1
}
verbose "check_v3_tbb-backend: `0'" 2
return 0
} }
set additional_prunes "" set additional_prunes ""
......
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