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 Wed, 2009-04-01 at 16:44 -0700, Janis Johnson wrote:
> On Wed, 2009-04-01 at 18:59 -0400, John David Anglin wrote:
> > > > --- ./target-libpath.exp.foo =A0 =A02009-03-28 08:39:46.000000000 -0700
> > > > +++ ./target-libpath.exp =A0 =A0 =A0 =A02009-03-31 18:05:01.000000000 -07=
> > > 00
> > > > @@ -213,16 +213,16 @@ proc restore_ld_library_path_env_vars {
> > > > =A0 global orig_gcc_exec_prefix
> > > > =A0 global env
> > > >
> > > > - =A0if { $orig_environment_saved =3D=3D 0 } {
> > > > - =A0 =A0return
> > > > - =A0}
> > > > -
> > > > =A0 if { $orig_gcc_exec_prefix_saved } {
> > > > =A0 =A0 setenv GCC_EXEC_PREFIX "$orig_gcc_exec_prefix"
> > > > =A0 } elseif [info exists env(GCC_EXEC_PREFIX)] {
> > > > =A0 =A0 unsetenv GCC_EXEC_PREFIX
> > > > =A0 }
> > > >
> > > > + =A0if { $orig_environment_saved =3D=3D 0 } {
> > > > + =A0 =A0return
> > > > + =A0}
> > > > +
> > > > =A0 if { $orig_ld_library_path_saved } {
> > > > =A0 =A0 setenv LD_LIBRARY_PATH "$orig_ld_library_path"
> > > > =A0 } elseif [info exists env(LD_LIBRARY_PATH)] {
> > > >
> > > 
> > > I am checking it in as an obvious fix.
> > 
> > The change doesn't fix the problem on darwin.  I also incorrectly reported
> > that Janis's suggestion worked.  It worked when I ran the gcc/g++ tests from
> > the gcc directory.  However, it doesn't work when the tests are run from
> > the top directory.
> 
> The problem that HJ fixed is different from the problem of unsetenv
> not working on Darwin; I'm looking into that one now.  I'll try running
> the tests from the top directory as well as from obj/gcc, thanks for
> the warning.

D'oh, me doing more testing on GNU/Linux doesn't help figure out
whether or not a fix will work on Darwin.  David, let me know if
you see any obvious differences between running from the top
directory vs. the gcc directory.

Janis


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