[Bug testsuite/71021] [libatomic testsuite] Test program compilation fail (missing -pthread flag)

nsz at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon May 9 13:32:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71021

nsz at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nsz at gcc dot gnu.org

--- Comment #1 from nsz at gcc dot gnu.org ---
i think target lib tests are broken in gcc (other than libstdc++ and
libgfortran).

if the build-sysroot paths were used then the right libc would be linked.

but CC (with all the necessary flags) is not passed from make to the test
system, instead dejagnu find_gcc is used and some heuristics to reconstruct the
-B etc flags, and thus the build sysroot is missing. (e.g. getenv CC instead of
find_gcc would be a correct fix in libatomic.exp.. +export CC in the makefile).

others seem to have run into this too, but apparently it was not fixed:
https://gcc.gnu.org/ml/gcc-patches/2013-05/msg01181.html

(the libstdc++ solution is also less than elegant: it generates a shell script
that knows the paths/flags and call that repeatedly from the dejagnu tcl code..
instead of just passing the envvars from make to runtest)

all target libs with tests need this fix when --with-build-sysroot is used.


More information about the Gcc-bugs mailing list