public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Moving from mcpu to march/mtune everywhere?
@ 2004-03-16  5:14 Nathanael Nerode
  2004-03-16 15:03 ` Kelley Cook
  0 siblings, 1 reply; 4+ messages in thread
From: Nathanael Nerode @ 2004-03-16  5:14 UTC (permalink / raw)
  To: gcc

Have we settled on doing this in general?

There seem to be a bizarre variety of different combinations of these,
meaning different things, in different architectures, and I think
standardizing would be a good thing (removing an awful lot of confusion).

But we should, of course, be certain that we're standardizing on the right
thing.  Thoughts?

-- 
Make sure your vote will count.
http://www.verifiedvoting.org/

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

* Re: Moving from mcpu to march/mtune everywhere?
  2004-03-16  5:14 Moving from mcpu to march/mtune everywhere? Nathanael Nerode
@ 2004-03-16 15:03 ` Kelley Cook
  2004-03-16 16:25   ` powerpc-*-elf versus powerpc-*-eabi Dave Murphy
  0 siblings, 1 reply; 4+ messages in thread
From: Kelley Cook @ 2004-03-16 15:03 UTC (permalink / raw)
  To: GCC Mailing List; +Cc: Nathanael Nerode

 > Have we settled on doing this in general?
 >
 > There seem to be a bizarre variety of different combinations of these,
 > meaning different things, in different architectures, and I think
 > standardizing would be a good thing (removing an awful lot of
 > confusion).

 > But we should, of course, be certain that we're standardizing on the
 > right thing.  Thoughts?

See http://gcc.gnu.org/ml/gcc-patches/2003-02/msg01914.html where RH 
OK'd it.

I never got around to doing the other targets since I hadn't yet signed 
a copyright assignment form and then stage 1 ended for GCC 3.4.

It probably still is a worthy goal now that we are again in a stage 1.

Kelley Cook

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

* powerpc-*-elf versus powerpc-*-eabi
  2004-03-16 15:03 ` Kelley Cook
@ 2004-03-16 16:25   ` Dave Murphy
  2004-03-18  7:59     ` Jim Wilson
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Murphy @ 2004-03-16 16:25 UTC (permalink / raw)
  To: GCC Mailing List


Is there any significant difference between the powerpc-*-elf &
powerpc-*-eabi targets?

Searching around I found this -
http://gcc.gnu.org/ml/gcc/2000-01/msg00784.html

Is there any major advantage to using the eabi target for an embedded
system? I could see relocatable code being useful but does anyone know what
the trade offs are?

That message also mentions the use of a __main function which is also
confusing me a little. Currently I'm using a crt0 which has calls to _init &
_fini around the call to main as I've seen in the crt0 source provided with
newlib. What exactly is the accepted way to perform global constructor
initialisation? Under what circumstances should a call to __main be inserted
in the main function? Is there something wrong with my build if this call is
not being inserted?


Dave


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

* Re: powerpc-*-elf versus powerpc-*-eabi
  2004-03-16 16:25   ` powerpc-*-elf versus powerpc-*-eabi Dave Murphy
@ 2004-03-18  7:59     ` Jim Wilson
  0 siblings, 0 replies; 4+ messages in thread
From: Jim Wilson @ 2004-03-18  7:59 UTC (permalink / raw)
  To: Dave Murphy; +Cc: gcc

Dave Murphy wrote:
> Is there any significant difference between the powerpc-*-elf &
> powerpc-*-eabi targets?

powerpc-eabi gets used a lot more than powerpc-elf I believe, and thus 
is probably a better choice.  powerpc-elf might be useful if you need 
compatibility with some other system, such as other processor elf 
targets, or linux.  There are various eabi targets for special cases, 
e.g. eabispe, eabialtivec, eabisim, etc.  These alternatives don't exist 
in the powerpc-elf case.

> That message also mentions the use of a __main function which is also
> confusing me a little. Currently I'm using a crt0 which has calls to _init &
> _fini around the call to main as I've seen in the crt0 source provided with
> newlib. What exactly is the accepted way to perform global constructor
> initialisation? Under what circumstances should a call to __main be inserted
> in the main function? Is there something wrong with my build if this call is
> not being inserted?

Different systems have different ways of running static constructors and 
destructors.  In old systems, that don't have .init/.fini, gcc would 
automatically insert a call to __main in the main routine.  Eabi works 
this way even though we have elf, but the __main function is called __eabi.

The generally accepted way for ELF targets is to use .init/.fini 
sections.  If you don't have a loader that support init/fini, then you 
call them from crt0.o.  This is what newlib crt0s usually do.

If a call to __main is needed, the compiler will automatically insert 
it.  On these systems, the crt0 does not call the init/fini sections.

If the __main call is missing, then no, there is nothing wrong.  It just 
means that your system doesn't use __main.  Most likely, it uses 
init/fini sections instead.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com

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

end of thread, other threads:[~2004-03-18  7:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-16  5:14 Moving from mcpu to march/mtune everywhere? Nathanael Nerode
2004-03-16 15:03 ` Kelley Cook
2004-03-16 16:25   ` powerpc-*-elf versus powerpc-*-eabi Dave Murphy
2004-03-18  7:59     ` Jim Wilson

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).