Re: Cross compiling 4.7.2 for arm on x86_64

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

 



On 20.10.2014 23:27, Diederick Huijbers wrote:
Dear gcc people,

Last many hours, I've been reading up on how to create a cross
compiler for educational purposes and although I have a pretty clear
view on what parts are involved I haven't been able to get further
then building binutils and bootstrapping gcc.  I've read  many, many
articles online and all follow mostly the same steps, although some
use different options. I have read the linux from scratch how to, this
post from Jim Blandy:
http://www.eglibc.org/archives/patches/msg00078.html,  this post
http://how-to-build-for-arm.wikispaces.com/gcc-4_7_2 and many more but
I keep running into errors with glibc.  Therefore I was wondering if
someone got a build script that creates a cross compiler using glibc
2.17, gcc 4.7.2, binutils 2.32.1, kernel 3.6.11 for arm?

I have build the binutils and have a bootstrapped gcc (first step).
But no matter what options or approaches I take, I cannot get glibc to
compile (first step). Currently it seems that it cannot find stdio.h.
I'm not sure if this is the stdio.h from the glibc library itself (?)
and if so why can't it find it's own headers?  I have pasted my
config.log, configure and make log here
https://gist.github.com/roxlu/0aed9c86c74ce015f6f5


Forget eglibc. Use glibc.

Something like this might help:
binutils: configure --prefix=/opt/arm-cross --target=arm-linux-gnueabi --with-sysroot=/opt/arm-cross/sysroot gcc-stage1: configure --prefix=/opt/arm-cross --target-arm-linux-gnueabi --disable-shared --disable-threads --without-headers --disable-decimal-float --disable-multilib --enable-languages=c --with-glibc-version=2.20
make all-gcc all-target-libgcc ${MAKEOPTS} &&
make install-gcc install-target-libgcc

Linux headers:
make headers_install INSTALL_HDR_PATH=/opt/arm-cross/sysroot/usr  ARCH=arm

Glibc:

configure --prefix=/usr --with-headers=/opt/arm-cross/sysroot/usr/include --host=arm-linux-gnueabi
make
make install DESTDIR=/opt/arm-cross/sysroot

Gcc-Final:
configure --prefix=/opt/arm-cross --target=arm-linux-gnueabi --enable-languages=c,c++ --with-sysroot=/opt/arm-cross/sysroot

--
chs





[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