Hi Chung-Lin,

> sorry for the late reply.

 No worries.

> The 'AM_RUNTESTFLAGS = --tool_exec "$(CC)"' does work for us, but only 
> because you backed out the change
> from libgomp-test-support.exp, and our installed testing doesn't use the 
> libgomp/testsuite/Makefile.* files
> (we invoke runtest using another script).
> 
>  From the code in libgomp/testsuite/lib/libgomp.exp:libgomp_init():
> ...
>      if ![info exists GCC_UNDER_TEST] then {
>          if [info exists TOOL_EXECUTABLE] {
>              set GCC_UNDER_TEST $TOOL_EXECUTABLE
>          } else {
>              set GCC_UNDER_TEST "[find_gcc]"
>          }
>      }
> 
> So essentially this patch is the same as the prior one, and still blocks the 
> usual find_gcc logic from
> ever getting control (as long as we use the in-tree 'make check'). I'm not 
> sure that is the right
> thing to do...

 That is intentional.  The libgomp.exp test driver is generic and can be 
invoked standalone (e.g. with `contrib/test_installed'), in which case the 
user will decide with `runtest' options whether to use a compiler pointed 
at explicitly or to fall back to `[find_gcc]'.

 OTOH `make check' is tied to the build tree and I think it ought to use 
the same compiler, there's no point in using any compiler search logic.

 The only uncertainty was about libgomp-test-support.exp.  Since it's 
generated I concluded it could be treated as tied to the build tree, 
however your use case has served as a counter example, so I have backed 
out my change as I have come up with a change that is equally good for my 
purpose and does not cause you and possibly other people trouble.

> That said, I don't have anything further against this patch. Okay for me.

 Great, thanks for verifying my proposal.

> (I do still think that actually detecting the right in-tree compiler and 
> giving the correct sysroot
> options from the configuration is the more proper approach, maybe later)

 Well, the in-tree compiler is $(CC), $(CXX), etc., as embedded in the 
Makefile structure, and I don't think you can guess it in DejaGNU without 
referring to those `make' variables.

 I'll post an updated series; it has passed my testing.

  Maciej

Reply via email to