Re: sysroot not supported in gcc-sh4-cross package
> you forgot command fowllowing
>
> GCC_TARGET=sh4 DEB_CROSS=yes fakeroot debian/rules control
>
> Maybe ...
>
> cd gcc-4.4-*
> GCC_TARGET=sh4 DEB_CROSS=yes fakeroot debian/rules control
> DEB_CROSS_NO_BIARCH=yes GCC_TARGET=sh4 DEB_CROSS=yes
> BUILD_SYSROOT=/usr dpkg-buildpackage -us -uc -rfakeroot
>
>or
>
>$ GCC_TARGET=${ARCH} DEB_CROSS=yes fakeroot debian/rules control
>$ DEB_CROSS_NO_BIARCH=yes BUILD_SYSROOT=/usr \
> GCC_TARGET=${ARCH} DEB_CROSS=yes dpkg-buildpackage -us -uc
> -rfakeroot
After adding the suggestin key word, buildroot still response no support for
--sysroot. Cannot use.
Any other suggestion? Or anybody know how to build a correct debian cross
toolchain and success build up the buildroot for rootfs creation?
Any help is appreciate
Jordan http://old.nabble.com/file/p28287965/crosstool.sh crosstool.sh
Jordan Pan wrote:
>
> Dear sir,
>
> I collect the web information and write down the memo to cross compile the
> SH4 toolchain. But still I can not build for the gcc compiler. Below is my
> memo. Could anybody help me to check what's wrong for gcc build portion.
> Thanks.
> --------------------------
> #Build a cross-compilation toolchain
> #Create a working directory
> mkdir -p ~/src/cross-toolchain
> cd ~/src/cross-toolchain
>
> #Some useful variables
> #These will be used in the commands in this document. Replace "arm" with
> the architecture for which you are building a cross-compiler.
> export -n ARCH=sh4 # set and do not export to invoked commands
>
> #Get the source for binutils and GCC
> apt-get source binutils gcc-4.4
>
> #Install Build-Depends
> sudo apt-get build-dep binutils gcc
>
> #Install fakeroot
> #fakeroot allows you to build packages without being root.
> sudo apt-get install fakeroot
>
> #Install dpkg-cross
> #dpkg-cross adds cross-compilation support to some of the basic Debian
> package tools. dpkg-cross can also convert packages designed for the
> target architecture into packages usable for cross-compilation to that
> architecture.
> sudo apt-get install dpkg-cross
>
> #Build and install binutils
> cd binutils-VERSION
> gzip -cd binutils-XXX-diff.gz | patch -p0
> TARGET=sh4-linux-gnu BUILD_SYSROOT=/usr fakeroot debian/rules binary-cross
> cd ..
> sudo dpkg -i binutils-sh4-linux-gnu_VERSION_HOSTARCH.deb
>
> #Convert library packages
> #You will need cross-compilation packages for various libraries;
> dpkg-cross can convert native packages for the target architecture into
> packages usable for cross-compilation. Note that the mirror
> ftp.us.debian.org only has amd64 and i386 packages, so to build a
> cross-compilation toolchain for another architecture (e.g. arm), you will
> have to use a mirror other than ftp.us.debian.org.
> wget
> http://ftp.debian-ports.org/debian/pool-sh4/main/l/linux-2.6/linux-libc-dev_XXX_sh4.deb
> wget
> http://ftp.debian-ports.org/debian/pool-sh4/main/e/eglibc/libc6_XXX_sh4.deb
> wget
> http://ftp.debian-ports.org/debian/pool-sh4/main/e/eglibc/libc-dev-bin_XXX_sh4.deb
>
> dpkg-cross -a sh4 -b l*.deb
> sudo dpkg -i l*sh4-cross*.deb
>
> #Build and install GCC
> #Now that you have all the necessary prerequisites, you can build a
> cross-compiling GCC.
> cd gcc-VERSION
> gzip -cd gcc-XXX-diff.gz | patch -p0
> GCC_TARGET=sh4-linux-gnu BUILD_SYSROOT=/usr fakeroot debian/rules binary
> cd ..
> sudo dpkg -i *-VERSION-sh4-linux-gnu*.deb *-sh4-cross_VERSION*.deb
> ------------------------------
>
> ERROR logs
> ================
> $ GCC_TARGET=sh4-linux-gnu BUILD_SYSROOT=/usr fakeroot debian/rules binary
> mkdir -p stamps
> /usr/bin/make -f debian/rules.conf control
> make[1]: Entering directory `/home/jordan
> http://old.nabble.com/file/p28287684/crosstool.txt crosstool.txt
> /src/cross-toolchain/gcc-4.4-4.4.3'
> debian/rules.conf:160: *** Recursive variable `LIBC_DEP' references itself
> (eventually). Stop.
> ================
>
> Please help.
> Jordan
>
>
> Jordan Pan wrote:
>>
>> Dear sir,
>> I am trying to build the rootfs by the gcc-sh4-cross
>> (http://debian-sh4.nigauri.org/cross-compiler/) package. But
>> unfortunately, the cross compiler doesn't support the --sysroot option.
>> Does anybody know how to work around this issue? Or if I should do the
>> cross compiler by myself, please share the build procedure for reference
>> (I have try to use reference guidance from
>> http://www.emdebian.org/tools/crossdev.html and
>> http://wiki.debian.org/SH4/CrossToolchain, but it doesn't work for me) .
>> -----------------
>> Checking external toolchain settings
>> External toolchain doesn't support --sysroot. Cannot use.
>> -----------------
>>
>> Regards
>> Jordan
>>
>
>
--
View this message in context: http://old.nabble.com/sysroot-not-supported-in-gcc-sh4-cross-package-tp28280677p28287965.html
Sent from the debian-superh mailing list archive at Nabble.com.
Reply to: