------- Comment #14 from hjl dot tools at gmail dot com 2008-06-09 02:28 ------- (In reply to comment #13) > Subject: Re: [4.3/4.4 Regression]: HOSTCC doesn't work > with unstalled gcc > > hjl dot tools at gmail dot com wrote: > > >>>> 1. User puts libraries/headers in $pefix/{lib,include} > >>>> 2. User builds GCC with corresponding --prefix option > >>>> 3. User runs "make check" > > > > Do you have an example to show it doesn't work if > > GCC_EXEC_PREFIX isn't set. > > Yes -- the scenario you quote above. If you want to remove the setting > of GCC_EXEC_PREFIX, you need to explain how that is going to work.
Is 3-stage bootstrap used here? How does stage 1/2/3 compilers find those libraries and header files? > > > That means we have to do it whenever HOSTCC is used, including new > > and old tests. I don't think it is the right fix, given that no one > > has shown GCC_EXEC_PREFIX really has to be set here. > > In order to properly control the test environment for the compiler just > built, all environment variables used by the compiler being tested > should be explicitly set or cleared. Otherwise, the behavior of the > tests will depend on things set in the user's environment, possibly for > their /usr/bin/gcc, which clearly makes no sense. Will setting GCC_EXEC_PREFIX not test the just built files, but those under GCC_EXEC_PREFIX instead? > > Unless you can find a way to localize those environment changes only to > the tested compiler (by setting/restoring them around every call to the > compiler being tested for example), HOSTCC must set/clear all the > environment variables that it uses. > Doesn't it make a very hard requirement for HOSTCC? You may clear all all environment variables for gcc 4.3 today. Someone may add a new variable later to gcc 4.5. Then you have to go back to change all HOSTCC. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36443