This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [testsuite] clean up GCC_EXEC_PREFIX use for PR38526


On Mon, 2009-03-30 at 22:27 -0400, Hans-Peter Nilsson wrote:
> On Mon, 30 Mar 2009, John David Anglin wrote:
> 
> > > Will commit the following as per your approval on IRC, after
> > > testing cross to crisv32-axis-linux-gnu and native
> > > x86_64-unknown-linux-gnu:
> >
> > Unfortunately, this change re-introduces the problem compiling the
> > compat generator on darwin:
> > http://gcc.gnu.org/ml/gcc-testresults/2009-03/msg02935.html
> >
> > Executing on build: gcc -g -O2 -o /Users/dave/gnu/gcc/objdir/gcc/testsuite/g++/g
> > ++.dg-struct-layout-1_generate.exe /Users/dave/gnu/gcc/gcc/gcc/testsuite/g++.dg/
> > compat/struct-layout-1_generate.c /Users/dave/gnu/gcc/gcc/gcc/testsuite/g++.dg/c
> > ompat/../../gcc.dg/compat/generate-random.c /Users/dave/gnu/gcc/gcc/gcc/testsuit
> > e/g++.dg/compat/../../gcc.dg/compat/generate-random_r.c    (timeout = 300)
> > gcc: error trying to exec 'cc1': execvp: No such file or directory
> > gcc: error trying to exec 'cc1': execvp: No such file or directory
> > gcc: error trying to exec 'cc1': execvp: No such file or directory
> 
> Looks pretty trivial, given the "re-introduction" patch.
> (Everything looks trivial if it's misunderstood correctly. :)
> 
> Does this help?  I haven't tested it by any means whatsoever.

I think the problem on Darwin is that the unsetenv had no effect,
so this won't help.

> gcc/testsuite:
> 
> 	* lib/target-libpath.exp (restore_ld_library_path_env_vars):
> 	Unsetenv GCC_EXEC_PREFIX also if TEST_GCC_EXEC_PREFIX exists.
> 
> Index: target-libpath.exp
> ===================================================================
> --- target-libpath.exp	(revision 145328)
> +++ target-libpath.exp	(working copy)
> @@ -219,7 +219,8 @@
> 
>    if { $orig_gcc_exec_prefix_saved } {
>      setenv GCC_EXEC_PREFIX "$orig_gcc_exec_prefix"
> -  } elseif [info exists env(GCC_EXEC_PREFIX)] {
> +  } elseif { [info exists env(GCC_EXEC_PREFIX)] \
> +	     || [info exists TEST_GCC_EXEC_PREFIX] } {
>      unsetenv GCC_EXEC_PREFIX
>    }

If GCC_EXEC_PREFIX was set when we started running the tests, then
we want to use that again for the host compiler.  If the testsuite
set GCC_EXEC_PREFIX then we want to unset it.  The check for
TEST_GCC_EXEC_PREFIX would be redundant because it will have been
used to set GCC_EXEC_PREFIX.

David, does it work to replace the unsetenv with this?

  setenv GCC_EXEC_PREFIX ""

Janis


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]