Re: sysroot not supported in gcc-sh4-cross package
Hello,
2010/4/21 Jordan5103 <jordan.pan.yh@renesas.com>:
> Host machine: x86-64 Ubuntu 9.10
This is not Debian, so we might have some differencies in our systems.
> Target CPU: SH4
>
> Build steps:
> 1. export -n ARCH=sh4 # set and do not export to invoked commands
> 2. apt-get source binutils
You need latest binutils version, see
https://bugs.launchpad.net/ubuntu/+source/binutils/+bug/548451
> 3. download patch from
> http://debian-sh4.nigauri.org/cross-compiler/src/binutils_2.20.1-2+sh4.diff.gz
I am not sure you need this patch, what does it do?
> 4. cd {binutils dir}
> 5. export TARGET=$(dpkg-architecture -a$ARCH -qDEB_HOST_GNU_TYPE 2>
> /dev/null)
-ash4
> 6. BUILD_SYSROOT=/usr fakeroot debian/rules binary-cross > ../binutils.build
> 2>&1 || echo 'Build error'
Could you recheck if you need BUILD_SYSROOT or WITH_SYSROOT instead?
> 7. unset TARGET
> 8. cd ..
>
> The compilation result is failed. Error message as below ---
> ----------------
> checking for x86_64-linux-gnu-gcc... gcc
> checking for C compiler default output file name...
> configure: error: in
> `/home/renesas/projects/cross-toolchain/src/binutils-2.20/builddir-sh4-linux-gnu/opcodes':
> configure: error: C compiler cannot create executables
> See `config.log' for more details.
> make[2]: *** [configure-opcodes] Error 1
> make[2]: Leaving directory
> `/home/renesas/projects/cross-toolchain/src/binutils-2.20/builddir-sh4-linux-gnu'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory
> `/home/renesas/projects/cross-toolchain/src/binutils-2.20/builddir-sh4-linux-gnu'
> make: *** [build-sh4-linux-gnu-stamp] Error 2
> -------------
Yes, this issue is already fixed on later binutils, you need to
upgrade your host binutils too.
I tried sh4 a while back if I get some break, I'll try to reproduce a
cross build and include them into emdebian.org repository.
G'luck !
--
Héctor Orón
"Our Sun unleashes tremendous flares expelling hot gas into the Solar
System, which one day will disconnect us."
Reply to: