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

Re: [Q] Configure: Choosing as on Solaris, --with-gnu-as, and --with-as


On Mon, Feb 26, 2001 at 03:27:24PM +0100, Wolfgang Bangerth wrote:
> Oh, so I don't understand much about it, I fear. But how's it that gcc
> takes an assembler depending on where it is installed? That does not seem
> intuitive. (It isn't anyway, since gcc even takes /usr/ccs/bin/as if that
> is not in $PATH.) Could someone clarify the rules which assembler is
> taken?

This is just a data point, not an explanation:  if I build binutils along
with gcc (e.g., a unified source tree), AND specify --with-gnu-as, AND do
not specify --with-as=anything, then the installed gcc will use the GNU 'as'
(which was built and installed alongside gcc).

Under any other conditions under Solaris, gcc will try to use /usr/ccs/bin/as
(in fact, it's easy to fool gcc into using the native assembler when it
thinks it's using the GNU assembler, thereby breaking everything).

Same goes for the linker.  Truthfully I have this problem more often with
the linker than the assembler.

Don't let me discourage you when I say that I gave up trying to figure
out exactly what twisty little problems are involved here.  Once I found
that the above combination *always* worked, I stopped asking.  (Yes,
it's serious cargo cult programming, and no, I'm not proud of it...)


Phil

-- 
pedwards at disaster dot jaj dot com  |  pme at sources dot redhat dot com
devphil at several other less interesting addresses in various dot domains
The gods do not protect fools.  Fools are protected by more capable fools.


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