* Re: [Fwd: sh4-cross-compiling-gcc-3.0.2 build fails during assembly]
[not found] ` <3C44BE9B.D8B3E2D1@luukku.com>
@ 2002-01-15 16:08 ` Steven Mueller
0 siblings, 0 replies; only message in thread
From: Steven Mueller @ 2002-01-15 16:08 UTC (permalink / raw)
To: Kai Ruottu; +Cc: Dan Kegel, GCC Help list, crossgcc
Ah! You win! As it turns out, sh4-linux should have been a symlink
to sh4el-hardhat-linux, which is where hardhat puts its crosscompiling
sh4 binutils. Normally our gcc script sets this symlink up, but in
this case I had recently built glibc without setting up the symlink,
which installed things into a new sh4-linux directory. I then failed
to properly wipe the hardhat directory prior to reinstalling, and the
anemic sh4-linux directory lived on. Live and learn; rm -rf can be
your friend.
Anyway, thank you for your insight into the gcc build process.
Steve
On Wed, Jan 16, 2002 at 01:43:23AM +0200, Kai Ruottu wrote:
> Dan Kegel wrote:
> > It looks like the build process for gcc is using 'as' without
> > a prefix, so it's getting the system 'as', which can't understand
> > the output of sh4 gcc (naturally).
>
> This is completely right, each cross-compiler has its 'ar', 'as', 'ld',
> 'nm', 'ranlib' etc. in its own '$prefix/$target/bin', but the '$prefix'
> is normally common for all the cross-tools and the '$prefix/bin' has the
> tools used by the human user with the names '$target-<tool>', for instance
> 'sh-elf-gcc' ...
>
> The rules say that binutils and GCC for a target must be configured to
> use the same $prefix and $target names. If not, 'make install' puts them
> to the wrong '$prefix/$target/bin' for GCC to find them... Just check
> this from your GCC-manual, the section "Installation / Cross-Compiler".
>
> When you used prebuilt binutils, libs and headers for the target, you
> should have preinstalled them under your chosen '$prefix/$target'.
>
> > xgcc was searching the path for 'as'.
>
> If the 'as' for the target is not in the needed '$prefix/$target/bin',
> (or in any directory given by './xgcc -print-search-dirs') the 'as' in
> the system PATH will be used...
>
> > > -B/opt/hardhat/devkit/sh/sh4_le/sh4-linux/bin/ <---- !
> > > -B/opt/hardhat/devkit/sh/sh4_le/sh4-linux/lib/ <---- !
> > > -isystem /opt/hardhat/devkit/sh/sh4_le/sh4-linux/include <---- !
>
> The last three rows show where the binaries, libraries and headers for
> the 'sh4-linux' target are sought. So your chosen $prefix for GCC is the:
>
> /opt/hardhat/devkit/sh/sh4_le
>
> and the chosen $target is the:
>
> sh4-linux
>
> So your binutils for the 'sh4-linux' target should be in the shown
> '/opt/hardhat/devkit/sh/sh4_le/sh4-linux/bin/' with their base names.
> If they aren't there, that is the big problem...
Indeed they weren't, and indeed it was. :)
> Cheers, Kai
--
Steven Mueller
diffusor@ugcs.caltech.edu
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-01-16 0:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <3C44854D.BACF4BE4@kegel.com>
[not found] ` <3C44BE9B.D8B3E2D1@luukku.com>
2002-01-15 16:08 ` [Fwd: sh4-cross-compiling-gcc-3.0.2 build fails during assembly] Steven Mueller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).