public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] For GCCv3: recommend -fno-builtin and remove -fvtable-gc
@ 2001-07-09 18:35 Richard Shih-Ping Chan
  2001-07-10  0:29 ` Andrew Lunn
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Shih-Ping Chan @ 2001-07-09 18:35 UTC (permalink / raw)
  To: ecos-discuss

Hi eCos team - I would like to make two suggestions for GCC3

[1] Make -fno-builtin a default command line option.

This is to prevent unwanted optimisations of builtin functions
at the default optimisation level of -g -O2. An example is
the optimisation of printf and the consequent introduction of
extra symbols like putchar and puts by GCCv3.
This doesn't always link as some installs supply printf but not
putchar/puts. An example is the target+template pc+redboot. 
At -O2 GCCv3 really seems to convert
some printf to putchar/puts statements.

This should have no untoward effect on GCC2.95.


[2] -fvtable-gc is no longer supported by GCCv3 but I'm not sure
what implications that has.

Cheers
Richard Chan <cshihpin@dso.org.sg>


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

* Re: [ECOS] For GCCv3: recommend -fno-builtin and remove -fvtable-gc
  2001-07-09 18:35 [ECOS] For GCCv3: recommend -fno-builtin and remove -fvtable-gc Richard Shih-Ping Chan
@ 2001-07-10  0:29 ` Andrew Lunn
  2001-07-10 10:43   ` Jonathan Larmour
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lunn @ 2001-07-10  0:29 UTC (permalink / raw)
  To: Richard Shih-Ping Chan; +Cc: ecos-discuss

On Tue, Jul 10, 2001 at 09:41:11AM -0800, Richard Shih-Ping Chan wrote:
> Hi eCos team - I would like to make two suggestions for GCC3
> 
> [1] Make -fno-builtin a default command line option.
> 
> This is to prevent unwanted optimisations of builtin functions
> at the default optimisation level of -g -O2. An example is
> the optimisation of printf and the consequent introduction of
> extra symbols like putchar and puts by GCCv3.

I don't think this is a good idea. Some of the build in functions are
optimized for the particular architecture, eg memcpy, memset,
etc. They will be faster than the equivelent in the eCos library.

Is there a -fno-builtin-printf command line option? Just turn off that
feature. The other option would be to rename printf in redboot, so the
optimizer does not recognise it.

        Andrew

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

* Re: [ECOS] For GCCv3: recommend -fno-builtin and remove -fvtable-gc
  2001-07-10  0:29 ` Andrew Lunn
@ 2001-07-10 10:43   ` Jonathan Larmour
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Larmour @ 2001-07-10 10:43 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: Richard Shih-Ping Chan, ecos-discuss

Andrew Lunn wrote:
> 
> On Tue, Jul 10, 2001 at 09:41:11AM -0800, Richard Shih-Ping Chan wrote:
> > Hi eCos team - I would like to make two suggestions for GCC3
> >
> > [1] Make -fno-builtin a default command line option.
> >
> > This is to prevent unwanted optimisations of builtin functions
> > at the default optimisation level of -g -O2. An example is
> > the optimisation of printf and the consequent introduction of
> > extra symbols like putchar and puts by GCCv3.
> 
> I don't think this is a good idea. Some of the build in functions are
> optimized for the particular architecture, eg memcpy, memset,
> etc. They will be faster than the equivelent in the eCos library.
> 
> Is there a -fno-builtin-printf command line option? Just turn off that
> feature. The other option would be to rename printf in redboot, so the
> optimizer does not recognise it.

Yes we have plans to rename Redboot's printf, but in Redboot's short
lifetime it has already become quite pervasive.

In any case, we recommend avoiding GCC v3 on all targets where 2.95 support
exists. GCC v3 is not very stable for most embedded targets.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions    http://www.redhat-techworld.com/

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

end of thread, other threads:[~2001-07-10 10:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-09 18:35 [ECOS] For GCCv3: recommend -fno-builtin and remove -fvtable-gc Richard Shih-Ping Chan
2001-07-10  0:29 ` Andrew Lunn
2001-07-10 10:43   ` Jonathan Larmour

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