tbb-backend effective target should check ability to link TBB
authorThomas Rodgers <trodgers@redhat.com>
Tue, 21 May 2019 04:37:45 +0000 (04:37 +0000)
committerThomas Rodgers <rodgertq@gcc.gnu.org>
Tue, 21 May 2019 04:37:45 +0000 (04:37 +0000)
    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

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/lib/libstdc++.exp

index 5633216ca3d13aa5e69bb542219e99cb8b6852f9..79318f762d8a2e892721de5cbdc7c8eb936e999a 100644 (file)
@@ -1,3 +1,10 @@
+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):
index 011630f6d32f15fc82ab81647c927249acbaaf43..26f3d46e08910f0c85292aa18d7d1fa26c970f91 100644 (file)
@@ -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] {