[Fwd: sh4-cross-compiling-gcc-3.0.2 build fails during assembly]
Steven Mueller
diffusor@ugcs.caltech.edu
Mon Apr 1 00:00:00 GMT 2002
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
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
More information about the crossgcc
mailing list