Re: cross compiler issues
On Wed, Aug 15, 2007 at 12:57:57PM +0200, Yegor Yefremov wrote:
> I'm searching for a good tool chain for Linux and Windows to distribute with
> the new product running Debian for ARM. I have found one binary distribution
> that is working for Windows and Linux. The problem is that the path to
> libc.so.6 is hard coded in the compiler. So one must "install" everything to
> the root location (for Windows it is for example C:\ and for Linux everything
> will be extracted to /usr/local). I'd like to have it in extra folder (for
> Windows for example c:\toolchain for Linux /opt). How can I bring the compiler
> to take the libc.so.6 from the arbitrary place?
Your compiler vendor has to go out of their way to make the toolchain
automatically relocate. It's a bit tricky :-) If you specify an
appropriate --with-sysroot and use a recent compiler and linker, most
things will work.
> http://www.codesourcery.com/ - I have successfully installed and compiled the
> test program but it doesn't want to run under my Debian for ARM host. This is
> the file output:
> test: ELF 32-bit LSB executable, ARM, version 1 (SYSV), for GNU/Linux 2.6.14,
> dynamically linked (uses shared libs), for GNU/Linux 2.6.14, stripped
> This is the output from emdebian toolchain that is functioning:
> debgcctest: ELF 32-bit LSB executable, ARM, version 1 (ARM), for GNU/Linux
> 2.4.1, dynamically linked (uses shared libs), for GNU/Linux 2.4.1, stripped
>
> What GNU/Linux 2.6.14 or 2.4.1 means? The kernel version it was linked under?
The minimum kernel it will run under. This is set when you compile glibc.
> And what is it about SYSV and ARM?
This is just a change in the binary format. File isn't telling you
about the real problem: all CodeSourcery ARM toolchains use the EABI.
If you want to run the output, you need an EABI-aware kernel and EABI
libraries. You should be able to use our toolchains with the Debian
"armel" port, but not with the ARM port from the archive - that's the
older APCS ABI.
--
Daniel Jacobowitz
CodeSourcery
Reply to: