Odd problem with building 3.4.2 on Solaris (use of as and ld)

Timothy Borgeaud tim.borgeaud@csc.mrc.ac.uk
Thu Sep 23 11:49:00 GMT 2004


Eric Botcazou wrote:

>>What I'm trying to do is build version 3.4.2 with the prefix /opt/hi and
>>which will use the gnu binutils which will also be in /opt/hi (actually
>>they are in place already but /opt/hi is currently a link to a temporary
>>space).
>>
>>If I build 3.4.2 with just --prefix=/opt/hi everything works ok and I
>>end up with a working version of 3.4.2 that uses /usr/ccs/bin.
>>
>>However if I use the configure options:
>>
>>--with-gnu-as --with-as=/opt/hi/bin/as
>>
>>and
>>
>>--with-gnu-ld --with-ld=/opt/hi/bin/ld
>>    
>>
>
>Just to be sure: are GNU as and GNU ld installed where you tell the configure 
>script they are?
>
>  
>
No, when I build gcc /opt/hi actually points to an empty area. Building 
with /opt/hi
pointing to the place where all the stuff is actually installed causes 
me a problem with
conflicting copies of libiconv. It's a bit of a mess because I'm 
building a version of gcc
designed to run from /opt/hi on a machine with a bunch of stuff in 
/usr/local/.
I suppose I might have to remove the conflicting packages from 
/usr/local/ which is
not really a problem but means I have to be more careful about where 
/opt/hi points
during various installs as the system will be more dependent upon 
/opt/hi rather than
/usr/local/.

>>Which is what I expect. The --with-gnu-as --with-as=/opt/hi/bin/as
>>options seem to trigger the build into assuming Gnu as is being used to
>>perform the build as well as configuring the new compiler to use this tool.
>>    
>>
>
>Note that the line you pasted starts with ./xgcc.  The newly built compiler 
>attempts to compile its libgcc, so it will invoke /opt/hi/bin/as and 
>/opt/hi/bin/ld as you instructed it to do.
>
>  
>
Thanks. I see that when /opt/hi/bin/ld etc are not found then the build 
uses /usr/bin/ccs/ld.
Which is why my fudge of linking /usr/bin/ccs/as to /usr/local/bin/as 
(Gnu) works.

Tim



More information about the Gcc mailing list