diff options
author | Thomas Rodgers <trodgers@redhat.com> | 2019-05-21 04:37:45 +0000 |
---|---|---|
committer | Thomas Rodgers <rodgertq@gcc.gnu.org> | 2019-05-21 04:37:45 +0000 |
commit | 838373111f611ef374b196d16285cd26716737f3 (patch) | |
tree | c32fec3a47bba08875de8a8f87addbcaa61c9662 | |
parent | d748c543b603704ac8ec8214cc8614ddf01aea47 (diff) | |
download | gcc-838373111f611ef374b196d16285cd26716737f3.zip gcc-838373111f611ef374b196d16285cd26716737f3.tar.gz gcc-838373111f611ef374b196d16285cd26716737f3.tar.bz2 |
tbb-backend effective target should check ability to link TBB
PR libstdc++/90252
* testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
Changed v3_target_compile check from preprocess to executable.
Added "-ltbb" to v3_target_compile flags.
From-SVN: r271451
-rw-r--r-- | libstdc++-v3/ChangeLog | 7 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/lib/libstdc++.exp | 9 |
2 files changed, 14 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 5633216..79318f7 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,12 @@ 2019-05-20 Thomas Rodgers <trodgers@redhat.com> + PR libstdc++/90252 + * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend): + Changed v3_target_compile check from preprocess to executable. + Added "-ltbb" to v3_target_compile flags. + +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. diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp index 011630f..26f3d46 100644 --- a/libstdc++-v3/testsuite/lib/libstdc++.exp +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp @@ -1586,15 +1586,20 @@ proc check_effective_target_tbb-backend { } { # Set up and preprocess a C++ test program that depends # on tbb set src tbb_backend[pid].cc - + set exe tbb_backend[pid].x + set f [open $src "w"] puts $f "#include <tbb/tbb.h>" puts $f "#if TBB_INTERFACE_VERSION < 10000" puts $f "# error Intel(R) Threading Building Blocks 2018 is required; older versions are not supported." puts $f "#endif" + puts $f "int main ()" + puts $f "{" + puts $f " return 0;" + puts $f "}" close $f - set lines [v3_target_compile $src /dev/null preprocess ""] + set lines [v3_target_compile $src $exe executable "-ltbb"] file delete $src if [string match "" $lines] { |