Re: How can I build gcc for arm on a x86_64 machine?

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

 



Kai Ruottu wrote:
> Vladimir Simonov wrote:
> 
>> YueGuang wrote:
>>> 在 2008-10-29三的 10:06 +0000,Andrew Haley写道:
>>> hi,
>>>> Hmm, you're not building with an ARM sysroot.  It's not just the
>>>> headers
>>>> you need but the entire tree of the installed target OS.
>>
>> Have you tried http://kegel.com/crosstool/?
>> Build cross tool chain from scratch (with glibc/kernel rebuild)
>> is quite tricky and crosstool provides most of the tricks.
> 
> If one has this "absolutely from scratch" attitude then :(  Otherwise
> the "easy as a pie" method (which Andrew suggested) is to start with
> an existing target system like Debian/ARM, to use its prebuilt glibc and
> build the first GCC with it. After that one can produce one's own
> "custom" glibc and maybe one's own "custom" GCC with the self-made
> custom glibc - YueGuang's first GCC configure command really didn't
> include many "customize" options which Andrew's configure command then
> had...
> 
> Ok, I thought to try this "easy as a pie" method myself... The current
> Debian glibc-2.7 for 'arm-linux' told in its 'libc-2.7.so' (seen with
> 'strings libc-2.7.so | less' in the '$sysroot/lib' and searching for
> "GNU C Library") :
> 
> ----------------- clip --------------------
> GNU C Library stable release version 2.7, by Roland McGrath et al.
> Copyright (C) 2007 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
> PARTICULAR PURPOSE.
> Compiled by GNU CC version 4.3.2.
> Compiled on a Linux >>2.6.18-6-iop32x<< system on 2008-10-13.
> Available extensions:
>         crypt add-on version 2.1 by Michael Glad and others
>         GNU Libidn by Simon Josefsson
>         Native POSIX Threads Library by Ulrich Drepper et al
>         Support for some architectures added on, not maintained in
> glibc core.
>         BIND-8.2.3-T5B
> ----------------- clip --------------------
> 
> I would assume that "iop32x" being some ARM platform, so the glibc
> was built natively on October 13...
> 
> After installing the current Linux binutils-2.19.50.0.1 (ftp.kernel.org)
> for 'arm-debian-linux' target and installing the prebuilt Debian
> glibc-2.7-15, the gcc-4.3.2 build for 'arm-debian-linux' really was that
> "easy as a pie" process. No problems anywhere...  I too trusted the
> defaults for the target to work so my GCC configure had only the minimal
> options like '--enable-languages=c,c++' for creating only the C and C++
> things. Maybe with some custom GCC options that 'generic ARM' (expected)
> Debian glibc could have caused some problems - mixing 'hard-float'
> binaries with 'soft-float' in ARM arch has been a problem for
> instance...

You might need --disable-sjlj-exceptions when compiling with armel-*-linux.
I certainly did last time I tried, but this might now be fixed.

Andrew.

[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