Gcc calling wrong assembler

Grant Edwards grante@visi.com
Tue Aug 14 08:31:00 GMT 2001


On Tue, Aug 14, 2001 at 03:57:30PM +0100, David Korn wrote:
> 
> >>    Did you use the --with-gnu-as and --with-gnu-ld flags when you
> >> configured the build ?
> >
> >Yes.
> >
> >> They should normally take care of this.
> >
> >AFAICT, arm-elf-gcc will never call "arm-elf-as" (which is what
> >I was trying to get it to do).  It will always call "as".  The
> >directories in which it will look for "as" are (as Jonathan
> >Larmour) displayed when you do "arm-elf-gcc
> >-print-search-dirs".
> >
> >Putting an "as" in one of those directories makes things work.
> 
> Ah, right you are.  By 'take care of this' I just meant that it
> will look in the right places and find the right things, but
> this does assume that you have allowed binutils to install
> itself in the standard places - in which case you should
> already have had 'as' in the arm-elf subdir.

Right.  I had left out the /usr/local/arm-elf/ files when I
configured the RPM spec file, so they didn't get installed on
my test machine.  I was convinced that at one time I had a
working installation without binaries in /usr/local/arm-elf/bin.

Probably not.

> >That is apparently wrong -- you need binutils binaries
> >installed in two places: in my case:
> >
> >  /usr/local/bin/arm-elf-as
> >  /usr/local/arm-elf-bin/as
> 
>   Oops, ITYM '/usr/local/arm-elf/bin/as'!

Yup.

> But yeah; Gcc and binutils are well interwoven with each other,
> and gcc has some knowledge of how the binutils installation is
> structured built in.  If you change that by removing parts of
> it at random, don't be surprised when gcc doesn't work!

For some reason, I thought that the files in
/usr/local/arm-elf/ were left over from a previous botched
install of binutils done with --prefix=/usr/local/arm-elf.  I
had to beat my head against a wall for most of the day before I
realized that the binaries are expected to be in two places.

> Incidentally, you could probably have still made it work by
> giving the configure command the flag
> --with-as=/usr/local/bin/arm-elf-as as well as the
> --with-gnu-as flag: --with-as specifies the exact path and
> filename of the assembler to use, while --with-gnu-as tells gcc
> that the binutils command line syntax and assembler format
> should be used, and also that it should search the standard
> binutils install locations if no value has been supplied to
> --with-as.

Ah, So it is possible!

I think I'll leave things in the normal configuration. Since
I'm going to be distributing binary RPM files, I should make
things as standard as possible.

-- 
Grant Edwards
grante@visi.com

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com



More information about the crossgcc mailing list