Bug 71931 - build sysroot flags are not passed to target lib tests
Summary: build sysroot flags are not passed to target lib tests
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: testsuite (show other bugs)
Version: 7.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-19 11:23 UTC by nsz
Modified: 2024-08-03 18:24 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nsz 2016-07-19 11:23:33 UTC
when gcc is built --with-build-sysroot then $CC for the target libs
includes --sysroot, but when the test is run for these target libs
CC=xgcc is used without --sysroot

libstdc++ tests have special workaround to pass build time CC and
CFLAGS settings to the test system, same for libgfortran, but
libatomic or libgomp tests fail when --with-build-sysroot is used.

it was reported earlier but i could not find it in bugzilla:
https://gcc.gnu.org/ml/gcc-patches/2013-05/msg01181.html

the root cause is that the dejagnu 'find_gcc' function is used
as CC in the tests which is wrong if any special flag
(like --sysroot) is needed for compilation/linking.
Comment 1 nsz 2016-07-20 11:10:05 UTC
a workaround is passing EXTRA_DEJAGNU_SITE_CONFIG=foo.exp to make, where foo.exp has

set GCC_UNDER_TEST "build-dir/gcc/xgcc -Bbuild-dir/gcc --sysroot build-sysroot"
Comment 2 Eric Gallager 2024-08-03 18:24:36 UTC
I wonder if this is related to bug 79885 at all?