This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


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

Re: Trouble building Linux host mips target binutils


Scott C. Karlin wrote:

> However, I now get stuck in the GCC build when it wants to invoke the
> assembler to build libgcc2.a.  Referring to the FAQ (thanks, Scott
> Howard!), section 5.3 -  "Assembler errors while building GCC's enquire
> or libgcc.a" suggests that GCC can't find the correct assembler.
> This seems reasonable given the last bit of output from the build:
> 
> _muldi3
> /tmp/cca21118.s: Assembler messages:
> /tmp/cca21118.s:64: Error: unrecognized opcode `mult $5,$6'
> /tmp/cca21118.s:65: Error: unrecognized opcode `mflo $10'
> 
> "which as" tells me that "as" in my search path is /usr/bin/as.
> (This is clearly not the "as" I want for mips.)

 The 'which as' is wrong command to find the 'as' which gcc uses. The right one 
is './xgcc -print-prog-name=as'. Anyway, the './xgcc -B./ -print-search-dirs' 
will tell where it tries to find things. To see more important GCC commands 
with egcs (the official GCC release now), just use './xgcc --help'...

 BTW, why on earth you selected the one-year-old gcc-2.8.1 as the base? Not the
up-to-date egcs-1.1.2 ?  For just learning things, building gcc-2.8.1 can be
ok, but to do any C++ related things with the toolset, using the current egcs 
release is more reasonable...

 If you copy the 'newlib' subdir from newlib-1.8.x-sources to the egcs-sources
(into '.../egcs-1.1.2/newlib') and configure with :

   --host=i686-linux-gnu --target=mips-any-elf (etc.)

all the necessary things should be built. No patches, no extra 
libstdc++-2.8.1.1 build...

> What I want to do is build the tools in a directory different than
> the source and install them in my own directory.  I tried putting
> a link for "as" in both the build directory as well as the $prefix/bin
> directory to itself ($prefix/bin/mips-any-elf-as) but it didn't
> help.  I also made sure that the $PATH had $prefix/bin first.

 The './xgcc -B./ -print-search-dirs' will tell where it should be...

 Cheers, Kai
_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.