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

Reply via email to