public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* RE: Large executables
@ 2001-01-31  3:19 David Korn
  2001-04-01  0:00 ` David Korn
  0 siblings, 1 reply; 4+ messages in thread
From: David Korn @ 2001-01-31  3:19 UTC (permalink / raw)
  To: crossgcc

>-----Original Message-----
>From: Steve deRosier [ mailto:sderosier@vari-lite.com ]
>Sent: 30 January 2001 18:09

>I am having problems with using optimizations on my xgcc. Without using any
>optimizations, my final srec files are over twice as large as I used to get
>from the same code compiled with the MRI tools.

  For gcc, -O0 means *really* no optimisations, including some things that
other compilers do by default, such as constant folding...

>  The problem is, the instant
>I turn on any optimizations (at any level of -O, no mater -O1 
>through -O3,
>-Os also breaks), my code no longer runs properly.  Been playing with
>various options but I can't seem to come up with anything that works.

  Well, your code has bugs which are being exposed by the optimizer.  One
of the most common causes of bugs (I notice you work in embedded s/w) that
appear the moment the optimizer is turned on is not using 'volatile'
properly on things that need it.  Other problems that often don't make
themselves noticeable until the optimizer is turned on are use of 
uninitialized variables, and some buffer overflows.  Apart from that I 
can't offer any terribly specific advice; if this doesn't help, post back
to the list with a more detailed description of what target you're using
and precisely what problems appear when you switch on the optimizer.
  

    good luck, 
        DaveK
-- 
The Boulder Pledge: "Under no circumstances will I ever purchase anything 
offered to me as the result of an unsolicited email message. Nor will I 
forward chain letters, petitions, mass mailings, or virus warnings to large 
numbers of others. This is my contribution to the survival of the online
community."


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

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

* RE: Large executables
  2001-01-31  3:19 Large executables David Korn
@ 2001-04-01  0:00 ` David Korn
  0 siblings, 0 replies; 4+ messages in thread
From: David Korn @ 2001-04-01  0:00 UTC (permalink / raw)
  To: crossgcc

>-----Original Message-----
>From: Steve deRosier [ mailto:sderosier@vari-lite.com ]
>Sent: 30 January 2001 18:09

>I am having problems with using optimizations on my xgcc. Without using any
>optimizations, my final srec files are over twice as large as I used to get
>from the same code compiled with the MRI tools.

  For gcc, -O0 means *really* no optimisations, including some things that
other compilers do by default, such as constant folding...

>  The problem is, the instant
>I turn on any optimizations (at any level of -O, no mater -O1 
>through -O3,
>-Os also breaks), my code no longer runs properly.  Been playing with
>various options but I can't seem to come up with anything that works.

  Well, your code has bugs which are being exposed by the optimizer.  One
of the most common causes of bugs (I notice you work in embedded s/w) that
appear the moment the optimizer is turned on is not using 'volatile'
properly on things that need it.  Other problems that often don't make
themselves noticeable until the optimizer is turned on are use of 
uninitialized variables, and some buffer overflows.  Apart from that I 
can't offer any terribly specific advice; if this doesn't help, post back
to the list with a more detailed description of what target you're using
and precisely what problems appear when you switch on the optimizer.
  

    good luck, 
        DaveK
-- 
The Boulder Pledge: "Under no circumstances will I ever purchase anything 
offered to me as the result of an unsolicited email message. Nor will I 
forward chain letters, petitions, mass mailings, or virus warnings to large 
numbers of others. This is my contribution to the survival of the online
community."


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

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

* Large executables
  2001-01-30 10:06 Steve deRosier
@ 2001-04-01  0:00 ` Steve deRosier
  0 siblings, 0 replies; 4+ messages in thread
From: Steve deRosier @ 2001-04-01  0:00 UTC (permalink / raw)
  To: crossgcc

I am having problems with using optimizations on my xgcc.  Without using any
optimizations, my final srec files are over twice as large as I used to get
from the same code compiled with the MRI tools.  The problem is, the instant
I turn on any optimizations (at any level of -O, no mater -O1 through -O3,
-Os also breaks), my code no longer runs properly.  Been playing with
various options but I can't seem to come up with anything that works.

Has anyone else had such problems?  Any helping ideas would be welcome.

Thanks in advance,
- Steve

--
Steve deRosier
Embedded Software Engineer
Vari-Lite International, Inc.


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

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

* Large executables
@ 2001-01-30 10:06 Steve deRosier
  2001-04-01  0:00 ` Steve deRosier
  0 siblings, 1 reply; 4+ messages in thread
From: Steve deRosier @ 2001-01-30 10:06 UTC (permalink / raw)
  To: crossgcc

I am having problems with using optimizations on my xgcc.  Without using any
optimizations, my final srec files are over twice as large as I used to get
from the same code compiled with the MRI tools.  The problem is, the instant
I turn on any optimizations (at any level of -O, no mater -O1 through -O3,
-Os also breaks), my code no longer runs properly.  Been playing with
various options but I can't seem to come up with anything that works.

Has anyone else had such problems?  Any helping ideas would be welcome.

Thanks in advance,
- Steve

--
Steve deRosier
Embedded Software Engineer
Vari-Lite International, Inc.


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

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

end of thread, other threads:[~2001-04-01  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-31  3:19 Large executables David Korn
2001-04-01  0:00 ` David Korn
  -- strict thread matches above, loose matches on Subject: below --
2001-01-30 10:06 Steve deRosier
2001-04-01  0:00 ` Steve deRosier

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