public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Cross compiling 4.7.2 for arm on x86_64
@ 2014-10-20 21:27 Diederick Huijbers
  2014-10-22 10:57 ` Christer Solskogen
  0 siblings, 1 reply; 2+ messages in thread
From: Diederick Huijbers @ 2014-10-20 21:27 UTC (permalink / raw)
  To: gcc-help

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

Any advise or insights are welcome,
Thanks
D

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Cross compiling 4.7.2 for arm on x86_64
  2014-10-20 21:27 Cross compiling 4.7.2 for arm on x86_64 Diederick Huijbers
@ 2014-10-22 10:57 ` Christer Solskogen
  0 siblings, 0 replies; 2+ messages in thread
From: Christer Solskogen @ 2014-10-22 10:57 UTC (permalink / raw)
  To: gcc-help

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-10-22 10:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-20 21:27 Cross compiling 4.7.2 for arm on x86_64 Diederick Huijbers
2014-10-22 10:57 ` Christer Solskogen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).