This is the mail archive of the gcc-bugs@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]

[Bug testsuite/36443] [4.3/4.4 Regression]: HOSTCC doesn't work with installed gcc



------- Comment #52 from rob1weld at aol dot com  2009-02-07 06:00 -------
(In reply to comment #48)
> Subject: Re:  [4.3/4.4 Regression]: HOSTCC doesn't work
>  with installed gcc
> 
> rob1weld at aol dot com wrote:
> > One example is inherently derived from where we see it being set (wrongly),
> > ...
> 
> There is no perfect answer here.  Not setting GCC_EXEC_PREFIX is wrong
> for some usage models.  Setting it may be wrong for your usage model.


One answer is to have "make -i check" TEST to determine if the user
did a "make install" previously. One way to get a "proof-positive"
test (and use a new feature that seems to be unused) is to check
the executables checksum.

# /usr/local/bin/gcc -v test_gcc_1.c 2>&1 | grep Compiler\ executable\ checksum
Compiler executable checksum: 66c417bcdd572534d3c78dc025037bd3

# gcc/xgcc -v test_gcc_1.c 2>&1 | grep Compiler\ executable\ checksum
Compiler executable checksum: 66c417bcdd572534d3c78dc025037bd3

Now it should be safe to run "make -i check" on the basis that the
compiler was installed prior to running the tests. This does not
guarantee that the tests are correct, only that the environment is
the same as it would be after "make install" is done.

_IF_ it is determined that the compiler was NOT installed (using the
prior test method) then to avoid actually having to install gcc (which
the user _would_ do _if_ they wanted to) the "make -i check" procedure
would then be to install to a temporary directory (as though a
different "--prefix=" was specified ONLY for "make -i check" (which
has NO prior "make install).


This may not fix everything but it will be up to us 'doubters' to
come up with new scenarios which prove there remains circumstances
under which "make -i check" will give results we can prove untrue.

This is likely to occur during "pseudo-cross-compiling" (changing
your ABI, object file format, Linker, 32vs64, or compiling for
a subset of the Instruction Set (EG: Host=i686 Target=i386), etc...).

Rob


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36443


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