public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Multiple GCC's, keeping them straight
@ 2003-11-23 17:59 Chuck McManis
  2003-11-23 18:15 ` Gary Thomas
  0 siblings, 1 reply; 3+ messages in thread
From: Chuck McManis @ 2003-11-23 17:59 UTC (permalink / raw)
  To: ECOS Discussion Group

I'm being challenged by having multiple GCC tool chains around. It occurred 
to me that some readers might do this because they have multiple 
architectures to support and could thus offer some advice.

What I'm trying to do is to have gcc 3.3.2 both 'native' and 'target' mode 
in my path. The goal is actually to have gcj (both 'native' and 'target') 
in my path so that I can compile Java code into my ECOS application.

It hasn't been working particularly well, and I seem to get hung up in the 
binutils (either ld or perhaps gas) picking up the native one when I want 
the target one. Do folks run multiple chains in the same directory 
(differentiated by "gcc" vs "i386-elf-gcc" for example) or do they run with 
multiple paths and set those paths in Makefiles or something?

--Chuck


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ECOS] Multiple GCC's, keeping them straight
  2003-11-23 17:59 [ECOS] Multiple GCC's, keeping them straight Chuck McManis
@ 2003-11-23 18:15 ` Gary Thomas
  2003-11-24 10:11   ` Nick Garnett
  0 siblings, 1 reply; 3+ messages in thread
From: Gary Thomas @ 2003-11-23 18:15 UTC (permalink / raw)
  To: Chuck McManis; +Cc: ECOS Discussion Group

On Sun, 2003-11-23 at 10:59, Chuck McManis wrote:
> I'm being challenged by having multiple GCC tool chains around. It occurred 
> to me that some readers might do this because they have multiple 
> architectures to support and could thus offer some advice.
> 
> What I'm trying to do is to have gcc 3.3.2 both 'native' and 'target' mode 
> in my path. The goal is actually to have gcj (both 'native' and 'target') 
> in my path so that I can compile Java code into my ECOS application.
> 
> It hasn't been working particularly well, and I seem to get hung up in the 
> binutils (either ld or perhaps gas) picking up the native one when I want 
> the target one. Do folks run multiple chains in the same directory 
> (differentiated by "gcc" vs "i386-elf-gcc" for example) or do they run with 
> multiple paths and set those paths in Makefiles or something?

The most common case (and certainly how I manage it) is to use prefixed
compilers, e.g. i386-elf-gcc, etc.  Trying to differentiate via paths is
bound to only cause you grief.

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ECOS] Multiple GCC's, keeping them straight
  2003-11-23 18:15 ` Gary Thomas
@ 2003-11-24 10:11   ` Nick Garnett
  0 siblings, 0 replies; 3+ messages in thread
From: Nick Garnett @ 2003-11-24 10:11 UTC (permalink / raw)
  To: Gary Thomas; +Cc: Chuck McManis, ECOS Discussion Group

Gary Thomas <gary@mlbassoc.com> writes:

> On Sun, 2003-11-23 at 10:59, Chuck McManis wrote:
> > I'm being challenged by having multiple GCC tool chains around. It occurred 
> > to me that some readers might do this because they have multiple 
> > architectures to support and could thus offer some advice.
> > 
> > What I'm trying to do is to have gcc 3.3.2 both 'native' and 'target' mode 
> > in my path. The goal is actually to have gcj (both 'native' and 'target') 
> > in my path so that I can compile Java code into my ECOS application.
> > 
> > It hasn't been working particularly well, and I seem to get hung up in the 
> > binutils (either ld or perhaps gas) picking up the native one when I want 
> > the target one. Do folks run multiple chains in the same directory 
> > (differentiated by "gcc" vs "i386-elf-gcc" for example) or do they run with 
> > multiple paths and set those paths in Makefiles or something?
> 
> The most common case (and certainly how I manage it) is to use prefixed
> compilers, e.g. i386-elf-gcc, etc.  Trying to differentiate via paths is
> bound to only cause you grief.

The way I do it, and the way that the eCosCentric-built toolchains are
intended to work, is to have each toolchain installed in its own
directory. For example:

[nickg@balti:nickg]$ ls /opt/ecos/gnutools/
arm-elf/    h8300-elf-old/  m68k-elf/       mn10300-elf/   sh-elf/
h8300-elf/  i386-elf/       mipsisa32-elf/  powerpc-eabi/  v850-elf/
[nickg@balti:nickg]$ 

I then add these directories to my PATH:

[nickg@balti:nickg]$ echo $PATH
/opt/ecos/gnutools/m68k-elf/bin:/opt/ecos/gnutools/h8300-elf/bin:/opt/ecos/gnutools/mipsisa32-elf/bin:/opt/ecos/gnutools/sh-elf/bin:/opt/ecos/gnutools/powerpc-eabi/bin:/opt/ecos/gnutools/arm-elf/bin:/opt/ecos/gnutools/i386-elf/bin:/local/tools/sid/bin:/home/nickg/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/enlightenment/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome2/bin:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/jre/bin:/opt/gnome/bin:.
[nickg@balti:nickg]$

Usually I only add the toolchains I am currently using.

The binaries are all named i386-elf-gcc, mipsisa32-elf-gdb etc. and
are able to pick up the correct linker or whatever from their own
directory.

The important thing to do is to give each toolchain a separate
--prefix when configuring. Don't try to install them all in the same
place. 


-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com      The eCos and RedBoot experts


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-11-24 10:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-23 17:59 [ECOS] Multiple GCC's, keeping them straight Chuck McManis
2003-11-23 18:15 ` Gary Thomas
2003-11-24 10:11   ` Nick Garnett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).