Re: Problem with ARM cross compiler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



19.12.2013 2:15, Maxim Kuvyrkov kirjoitti:
On 19/12/2013, at 7:59 am, Hendrik Greving<hendrik.greving.intel@xxxxxxxxx>  wrote:

I am compiling (trying to) ARM cross compiler (on x86):


...
conftest.c:15:19: fatal error: stdio.h: No such file or directory


Any help/hint appreciated,
You don't have cross-built C library installed.  Building a cross toolchain from scratch is an intricate process, it is not building just the compiler, you also need bintutils, C library headers and C library itself.

I have never fully understood why the "totally from scratch target" is the first many people are trying when there are existing targets for crosstoolchains. My own '$sysroot's for the 'arm*-linux-gnueabi'
targets in my laptop are :

host-arm-angstrom-linux-gnueabi:
host-arm-cs2009-linux-gnueabi:
host-arm-cs2011-linux-gnueabi:
host-arm-debian-linux-gnueabi:
host-armel-debian-linux-gnueabi:
host-arm-linux-gnueabi:
host-arm-tizen-linux-gnueabi:
host-armv5tel-redhat-linux-gnueabi:
host-armv7hl-redhat-linux-gnueabi:
host-armv7l-tizen-linux-gnueabi:

(there are many more for old MeeGo, Scratchbox etc distros in my desktop PC) Built just for a fun. For instance built to try newer GCC releases than the one in the current Tizen-2.2.1
SDK :

[root@HP-Pavilion bin]# ./arm-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=./arm-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/home/kai/Tizen-2.2.1/data/tools/arm-linux-gnueabi-gcc-4.5/bin/../libexec/gcc/arm-linux-gnueabi/4.5.4/lto-wrapper
Target: arm-linux-gnueabi
Configured with: ../configure -v --enable-languages=c,c++ --prefix=/build/build_server/rsa/jobs/1261/temp/install-arm-linux --enable-shared --enable-multiarch --with-multiarch-defaults=i386-linux-gnu --enable-linker-build-id --with-system-zlib --without-included-gettext --enable-threads=posix --enable-nls --disable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-gold --enable-ld=default --with-plugin-ld=ld.gold --disable-sjlj-exceptions --with-arch=armv7-a --with-tune=cortex-a8 --with-float=softfp --with-fpu=vfpv3-d16 --enable-checking=release --program-prefix=arm-linux-gnueabi- --target=arm-linux-gnueabi --with-sysroot=/build/build_server/rsa/jobs/1261/buildroot/platforms/tizen2.2/rootstraps/tizen-device-2.2.devel
Thread model: posix
gcc version 4.5.4 20120105 (prerelease) (Linaro GCC 4.5-2012.01)

Furthermore as an old Unix guy I have never liked the current bloat in names like here :

   --prefix=/build/build_server/rsa/jobs/1261/temp/install-arm-linux
and
--with-sysroot=/build/build_server/rsa/jobs/1261/buildroot/platforms/tizen2.2/rootstraps/tizen-device-2.2.devel

Prefering simpler and much shorter names like :

  --prefix=/opt/cross
and
  --with-sysroot=/opt/host-arm-tizen-linux-gnueabi

Nothing should disable one to try first crosstoolchains for some existing target like Tizen. for instance gcc-4.6.x, gcc-4.7.x, gcc-4.8.x, gcc-4.9.x for that. The previous Linaro-made toolchain could give some
hints for configuring the self-made GCCs... Like I shamelessly did :

[root@HP-Pavilion bin]# arm-tizen-linux-gnueabi-gcc-4.8 -v
Using built-in specs.
COLLECT_GCC=arm-tizen-linux-gnueabi-gcc-4.8
COLLECT_LTO_WRAPPER=/media/2c439158-ef3e-4dcf-a63b-03191c302829/opt/cross/bin/../lib/gcc/arm-tizen-linux-gnueabi/4.8.2/lto-wrapper
Target: arm-tizen-linux-gnueabi
Configured with: ../configure --build=i686-linux-gnu --host=i686-linux-gnu --target=arm-tizen-linux-gnueabi --prefix=/opt/cross --with-sysroot=/opt/host-arm-tizen-linux-gnueabi --libdir=/opt/cross/lib --libexecdir=/opt/cross/lib --enable-languages=c,c++ --disable-sjlj-exceptions --without-included-gettext --enable-shared --enable-threads=posix --disable-nls --disable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-checking=release --enable-version-specific-runtime-libs --with-arch=armv7-a --with-tune=cortex-a8 --with-float=softfp --with-fpu=vfpv3-d16 --with-gxx-include-dir=/opt/cross/include/c++/4.8.2 --program-prefix=arm-tizen-linux-gnueabi- --program-suffix=-4.8
Thread model: posix
gcc version 4.8.2 (by Kai Ruottu)





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux