Re: 4.8 cross compiler help needed

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

 



On 20.4.2013 2:46, Segher Boessenkool wrote:
Thanks for your reply, Ian. I have the binaries for the 4.6 ARM
cross-compiler on this machine. There is a arm-linux-gnueabi-as file in
/usr/bin. Can I not use that assembler? If so, how to tell configure?

GCC and the binutils are designed to work together, such that if you
configure both with the same --prefix option GCC will use the binutils
assembler. Unfortunately I do not know of a way to tell GCC to use a
arm-linux-gnueabi-as assembler.

--with-as=/usr/bin/arm-linux-gnueabi-as should do the trick. But yes,
just install a fresh new binutils in the same prefix as your GCC, life
is much simpler then.

Yes, the $prefix and $target values are expected to be the same for
binutils and GCC!  These belong to the same "(cross)toolchain". Just
as the target C library belongs to the same (cross)toolchain! And the
expectation is that both the target binutils and the target C library
are already there before starting to build the cross GCC! I mean in
all the "system target" cases where the default GCC type is the "native
GCC"! For the "embedded cases" which never have any "native GCC"s the
expectation is totally different and should not be mixed with the one
for a "system target"!

The previous facts are always tried to be disturbed by some people who
have attitudes about the target C library not being necessary during
the GCC build :-( And so they spread their propaganda in the net where
this prerequisite is never mentioned! But it is real still, the target
headers are required when compiling libgcc etc for the $target. And
during the earlier "fixincludes" phase the target headers are tried to
be fixed for the new GCC.

So copying the (expected to already exist) target C library into the
chosen $sysroot is the most easy solution. The attitude that there
shouldn't be any target C library required during the GCC build only
leads to big problems!

For your "Angstrom-Cloud9-" (my guess) Linux system the SD-card root
file system image includes the stuff required in the $sysroot :

- the base target C library, eglibc
- the X11 libraries
- the Gnome etc GUI libraries
- and so on...

So your task is basically very simple :

- to provide equivalents to the native 'as', 'ld' etc in the cross host
- to provide equivalent to the native GCC in the cross host

But not at all try :

- to provide (cross) equivalents to the (native) target libraries

but only copy them into the chosen $sysroot!

In binutils and GCC configures you must tell where where the target
libraries are using '--with-sysroot=$sysroot' !




[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