ts-7000
[Top] [All Lists]

[ts-7000] Re: are TS crosstool toolchains really non-relocatable?

To:
Subject: [ts-7000] Re: are TS crosstool toolchains really non-relocatable?
From: "naturalwatt" <>
Date: Tue, 27 Jul 2010 15:57:56 -0000

--- In  "Robert P. J. Day" <> wrote:
>
> 
>   i'm about to download one of TS's "official" ARM cross-compile
> toolchains for my TS-7260 running 2.4.26-ts9 (soon ts11) and, from
> memory, if i pop over here:
> 
> ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7260-linux/cross-toolchains/
> 
> it would seem i'd be fine with this selection:
> 
> crosstool-linux-gcc-4.0.1-glibc-2.3.5.tar.bz2
> 
> yes?
> 
>   but i'm curious about this part of the README in that directory:
> 
> "If you wish to utilize the pre-built crosstools, then unpack the
> tarballs (as user root) at the root of your file-system. GCC and its
> ilk have hard-coded directory paths to search for when looking for the
> asm, linker, libraries, etc."
> 
>   that seems to suggest that i *must* untar the toolchain under the
> root directory, and that would be true if the toolchain was
> non-relocatable.  but i really dislike installing stuff like that
> in system directories as root, so i just untarred the tarball under my
> regular home directory (where it dumped itself under the ~/opt
> directory).
> 
>   after i do something like that, all i do is append to PATH the
> directory of the corresponding toolchain "bin" directory, then write
> the canonical "hello, world" program and try to cross-compile it:
> 
> $ arm-unknown-linux-gnu-gcc hi.c
> $ file a.out
> a.out: ELF 32-bit LSB executable, ARM, version 1, dynamically linked
> (uses shared libs), for GNU/Linux 2.4.3, not stripped
> $
> 
>   certainly *seems* to work based on that trivial test.  so why is the
> README implying that install location *must* be under /opt?  is that
> just a typo?  anyone else happily using that toolchain installed
> elsewhere?  thanks.
> 
> rday
> 
> -- 
> 
> ===

I think the paths used by gcc for include directories and library search paths 
are hardcoded into gcc. 

For example:

gcc -v:


Reading specs from 
/opt/crosstool/gcc-3.3.4-glibc-2.3.2/arm-unknown-linux-gnu/lib/gcc-lib/arm-unknown-linux-gnu/3.3.4/specs
Configured with: 
/Users/martin/linux/crosstool-0.42/build/arm-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.2/gcc-3.3.4/configure
 --target=arm-unknown-linux-gnu --host=powerpc-host_apple-darwin9.0.0 
--prefix=/opt/crosstool/gcc-3.3.4-glibc-2.3.2/arm-unknown-linux-gnu 
--with-headers=/opt/crosstool/gcc-3.3.4-glibc-2.3.2/arm-unknown-linux-gnu/arm-unknown-linux-gnu/include
 
--with-local-prefix=/opt/crosstool/gcc-3.3.4-glibc-2.3.2/arm-unknown-linux-gnu/arm-unknown-linux-gnu
 --disable-nls --enable-threads=posix --enable-symvers=gnu 
--enable-__cxa_atexit --enable-languages=c,c++ --enable-shared --enable-c99 
--enable-long-long
Thread model: posix
gcc version 3.3.4


So that's what you'll break if you relocate things.

Martin




------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU