This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
glue file built with compiler in PATH in out of tree testing
- From: Thomas Preudhomme <thomas dot preudhomme at foss dot arm dot com>
- To: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, Mike Stump <mikestump at comcast dot net>, Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- Date: Wed, 6 Dec 2017 17:24:45 +0000
- Subject: glue file built with compiler in PATH in out of tree testing
- Authentication-results: sourceware.org; auth=none
Hi,
TL;DR: where to tell dejagnu about the compiler to use for building testglue?
== context ==
I've just found out that testglue.c is built using the compiler in PATH when
doing out of tree testing rather than using the one specified by GCC_UNDER_TEST
(or other *_UNDER_TEST). This is because testglue is built using build_wrapper
in gcc/testsuite/lib/wrapper.exp which ultimately calls default_target_compile
most of the time. The compiler is then looked for in the options (something
starting with ^compiler), then in CC_FOR_TARGET (or similar *_FOR_TARGET) and
then default to use the one in the PATH.
== problem ==
I'm not sure where is the proper place to fix this. Obviously setting
CC_FOR_TARGET in contrib/test_installed or when calling runtest manually would
work but I wonder if this would not be better fixed somewhere else? The rest of
the testsuite seems happy with using GCC_UNDER_TEST, so surely testglue should
be using the same thing? Should this be done in wrapper.exp? If yes, should we
set *_FOR_TARGET? I don't see a way to pass ^compiler to build_wrapper's $flag
variable.
Best regards,
Thomas