[PATCH] tbb-backend effective target should check ability to link TBB

Jonathan Wakely jwakely@redhat.com
Tue May 21 13:51:00 GMT 2019


On 20/05/19 21:41 -0700, Thomas Rodgers wrote:
>With the addition of "-ltbb" to the v3_target_compile flags (so as to,
>you know, actually try to link tbb).
>
>Tested x86_64-linux, committed to trunk.

This didn't work, I still get a FAIL for every pstl test when
tbb.x86_64 and tbb-devel.x86_64 are installed but not tbb.i686.

Adding -v to RUNTESTFLAGS shows -ltbb wasn't being added to the
command, and because the test program didn't actually refer to any TBB
symbols, it still linked successfully.

This patch uses additional_flags=-ltbb to pass that flag, which seems
to work correctly. I've also cached the result of the effective-target
check, because it's pretty slow and was being run again for each of
the 56 pstl tests, multiplied by the number of test permutations. Now
it runs once per permutation, e.g. once for "unix" and once for
"unix/-m32".

Tested x86_64-linux (with 64-bit tbb only, 32-bit tbb only, and both
32-bit and 64-bit tbb), and powerpc64le-linux (with no tbb installed).

Committed to trunk. I'll backport it to gcc-9-branch too.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 2673 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20190521/be0243ca/attachment.bin>


More information about the Libstdc++ mailing list