From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27208 invoked by alias); 7 Feb 2009 06:00:26 -0000 Received: (qmail 27136 invoked by uid 48); 7 Feb 2009 06:00:08 -0000 Date: Sat, 07 Feb 2009 06:00:00 -0000 Message-ID: <20090207060008.27135.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug testsuite/36443] [4.3/4.4 Regression]: HOSTCC doesn't work with installed gcc In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rob1weld at aol dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-02/txt/msg00639.txt.bz2 ------- 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