[TriLUG] OT: cross compiling
Ed Hill
ed at eh3.com
Tue May 9 11:06:03 EDT 2006
On Tue, 2006-05-09 at 07:04 -0700, Joseph Mack NA3T wrote:
> This is my first attempt at cross compiling and I'm a little
> unclear as to how it works. I'm following the recipe at
> slacy.com, cross compiling on Linux for the target cpu =
> Atmel AVR (the real target is IBM AIX).
>
> The first step is to produce the binutils. To prevent
> namespace collisions, the output binaries are given the
> prefix "avr-", so I get avr-ar, avr-nm etc in /usr/bin after
> make install on my linux box.
Hi Joe,
What you've done above is a start but you left out a critical step.
What you really need to use is a program name prefix and/or suffix
***PLUS*** a different --prefix=${SOME_PATH} so that ${SOME_PATH} does
not equal /usr. If you aren't absolutely certain that you know what
you're doing, then its a very bad idea to try and put a lot of
self-compiled and experimental junk into the system using the default
--prefix which is typically "/usr". By specifying a separate install
prefix, you can keep your experimental things safely separated from the
main versions which you do not want to overwrite.
For testing purposes, I typically use something like:
./gcc-4.1.0/configure --prefix=/opt/gcc-4.1.0 \
--enable-languages=c,c++,f95 --program-suffix=-4.1.0
and you will want a similar syntax for binutils, etc...
hth,
Ed
--
Edward H. Hill III, PhD
office: MIT Dept. of EAPS 54-1424; 77 Massachusetts Ave.
Cambridge, MA 02139-4307
emails: eh3 at mit.edu ed at eh3.com
URLs: http://web.mit.edu/eh3/ http://eh3.com/
phone: 617-253-0098
fax: 617-253-4464
More information about the TriLUG
mailing list