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

mark at codesourcery dot com gcc-bugzilla@gcc.gnu.org
Mon Jun 9 21:17:00 GMT 2008



------- Comment #17 from mark at codesourcery dot com  2008-06-09 21:16 -------
Subject: Re:  [4.3/4.4 Regression]: HOSTCC doesn't work
 with unstalled gcc

hjl dot tools at gmail dot com wrote:
> ------- Comment #16 from hjl dot tools at gmail dot com  2008-06-09 14:16 -------
> (In reply to comment #9)
>> I suspect that if you remove the setting in site.exp you will break the 
>> following scenario:
>>
>> 1. User puts libraries/headers in $pefix/{lib,include}
> 
> I am not convinced it is the right thing to do. What
> are those libraries/headers? Are they from gcc? If yes,
> you don't need to do it. If not, can you use --sysroot
> to handle non-gcc libraries/headers?

In general, no, these are not from GCC.  They're probably from your C 
library -- which might not be GLIBC or Newlib, of course.  And, they 
probably include your installed assembler and linker -- which not be 
from GNU binutils, of course.

I don't know if --sysroot might be a solution.  Historically, I believe 
the scenario I put forth has worked, so you are going to break people's 
test methodology.  Maybe there is some solution that involves changing 
the compiler flags used in site.exp (like by adding --sysroot, or -B 
options, or something) so that you don't need to set GCC_EXEC_PREFIX.

But, I think that's going to be complicated.  That's why I think the 
right thing to do is to set up HOSTCC to be robust.  Like having the 
command to run default to:

   unset GCC_EXEC_PREFIX && gcc

rather than just:

   gcc


-- 


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



More information about the Gcc-bugs mailing list