public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user]  CFLAGS changes
@ 2008-02-21 13:53 James
  2008-02-21 14:09 ` Dale
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: James @ 2008-02-21 13:53 UTC (permalink / raw
  To: gentoo-user

Hello,


Current  CFLAGS="-O2 -march=i686 -pipe"


I want to add "-fomit-frame-pointer" to my
CFLAGS on an existing system that has been running
for months.


Is this safe or do I have to rebuild everything with
somelike "emerge -e" ?


Should it be avoided completely?

James




-- 
gentoo-user@lists.gentoo.org mailing list



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

* Re: [gentoo-user]  CFLAGS changes
  2008-02-21 13:53 [gentoo-user] CFLAGS changes James
@ 2008-02-21 14:09 ` Dale
  2008-02-21 14:43   ` Dale
  2008-02-21 14:16 ` Michal 'vorner' Vaner
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 8+ messages in thread
From: Dale @ 2008-02-21 14:09 UTC (permalink / raw
  To: gentoo-user

James wrote:
> Hello,
>
>
> Current  CFLAGS="-O2 -march=i686 -pipe"
>
>
> I want to add "-fomit-frame-pointer" to my
> CFLAGS on an existing system that has been running
> for months.
>
>
> Is this safe or do I have to rebuild everything with
> somelike "emerge -e" ?
>
>
> Should it be avoided completely?
>
> James
>
>   

Not sure if the flag is safe but I don't think portage will pick up on 
changes to CFLAGS.  You will have to do a emerge -e for all the packages 
to be compiled with the new setting.

You could also just change it and let the packages update over time as 
they get upgraded.  I don't think that will cause any problems.

You can also look here:   
http://www.gentoo.org/doc/en/gcc-optimization.xml  Also note, there is a 
page somewhere that gives the best CFLAGs but I can't find it.  Still 
looking tho.

Dale

:-)  :-)  :-) 
-- 
gentoo-user@lists.gentoo.org mailing list



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

* Re: [gentoo-user]  CFLAGS changes
  2008-02-21 13:53 [gentoo-user] CFLAGS changes James
  2008-02-21 14:09 ` Dale
@ 2008-02-21 14:16 ` Michal 'vorner' Vaner
  2008-02-21 14:34 ` KH
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Michal 'vorner' Vaner @ 2008-02-21 14:16 UTC (permalink / raw
  To: gentoo-user

Hello

On Thu, Feb 21, 2008 at 01:53:56PM +0000, James wrote:
> Current  CFLAGS="-O2 -march=i686 -pipe"
> 
> 
> I want to add "-fomit-frame-pointer" to my
> CFLAGS on an existing system that has been running
> for months.

Vim syntax highlighting does not show it in red, so I guess it means it
is considered generally safe.

I seldom recompile the whole system (actually, I did it once only, for
split-debug & install-sources make effect) and never get much problems.
Usually revdep-rebuild solves them all.

However, the new flag will be used only in newly compiled packages, so
you might have a reason for the rebuild.

At the last note, I noticed a use flag for glibc about omit frame
pointer, so you might want to turn that on.

-- 
This email has been checked by an automatic damage possibility check system.
It can contain harmful instructions if read backwards.
Internal checker ID: lacol.cr/cte/ << tlah ohce

Michal 'vorner' Vaner
-- 
gentoo-user@lists.gentoo.org mailing list



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

* Re: [gentoo-user]  CFLAGS changes
  2008-02-21 13:53 [gentoo-user] CFLAGS changes James
  2008-02-21 14:09 ` Dale
  2008-02-21 14:16 ` Michal 'vorner' Vaner
@ 2008-02-21 14:34 ` KH
  2008-02-21 16:12   ` Volker Armin Hemmann
  2008-02-21 14:34 ` Uwe Thiem
  2008-02-21 14:41 ` justin
  4 siblings, 1 reply; 8+ messages in thread
From: KH @ 2008-02-21 14:34 UTC (permalink / raw
  To: gentoo-user

James wrote:
> Hello,
>
>
> Current  CFLAGS="-O2 -march=i686 -pipe"
>
>
> I want to add "-fomit-frame-pointer" to my
> CFLAGS on an existing system that has been running
> for months.
>
>
> Is this safe or do I have to rebuild everything with
> somelike "emerge -e" ?
>
>
> Should it be avoided completely?
>
> James
>
>
>
>
>   
Hi,

I am not too good in English but I alway understood that:

|-fomit-frame-pointer|
    Don't keep the frame pointer in a register for functions that don't
    need one. This avoids the instructions to save, set up and restore
    frame pointers; it also makes an extra register available in many
    functions. *It also makes debugging impossible on some machines.*

    On some machines, such as the VAX, this flag has no effect, because
    the standard calling sequence automatically handles the frame
    pointer and nothing is saved by pretending it doesn't exist. The
    machine-description macro |FRAME_POINTER_REQUIRED| controls whether
    a target machine supports this flag. See Register Usage
    <http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gccint/Registers.html#Registers>.


    Enabled at levels -O, -O2, -O3, -Os.


means, that fomit-frame-pointer is already active when -o ... is choose.

see 
http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Optimize-Options.html#Optimize-Options

-- 
gentoo-user@lists.gentoo.org mailing list



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

* Re: [gentoo-user]  CFLAGS changes
  2008-02-21 13:53 [gentoo-user] CFLAGS changes James
                   ` (2 preceding siblings ...)
  2008-02-21 14:34 ` KH
@ 2008-02-21 14:34 ` Uwe Thiem
  2008-02-21 14:41 ` justin
  4 siblings, 0 replies; 8+ messages in thread
From: Uwe Thiem @ 2008-02-21 14:34 UTC (permalink / raw
  To: gentoo-user

On Thursday 21 February 2008, James wrote:
> Hello,
>
>
> Current  CFLAGS="-O2 -march=i686 -pipe"
>
>
> I want to add "-fomit-frame-pointer" to my
> CFLAGS on an existing system that has been running
> for months.
>
>
> Is this safe or do I have to rebuild everything with
> somelike "emerge -e" ?

It's safe. Of course, it takes effect only on newly compiled packages. 
I think the build systems of most packes set it anyway.

Uwe

-- 
Informal Linux Group Namibia:
http://www.linux.org.na/
SysEx (Pty) Ltd.:
http://www.SysEx.com.na/
-- 
gentoo-user@lists.gentoo.org mailing list



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

* Re: [gentoo-user]  CFLAGS changes
  2008-02-21 13:53 [gentoo-user] CFLAGS changes James
                   ` (3 preceding siblings ...)
  2008-02-21 14:34 ` Uwe Thiem
@ 2008-02-21 14:41 ` justin
  4 siblings, 0 replies; 8+ messages in thread
From: justin @ 2008-02-21 14:41 UTC (permalink / raw
  To: gentoo-user



On Thu, 21 Feb 2008 13:53:56 +0000 (UTC), James <wireless@tampabay.rr.com>
wrote:
> Hello,
> 
> 
> Current  CFLAGS="-O2 -march=i686 -pipe"
> 
> 
> I want to add "-fomit-frame-pointer" to my
> CFLAGS on an existing system that has been running
> for months.
> 
> 
> Is this safe or do I have to rebuild everything with
> somelike "emerge -e" ?
> 
> 
> Should it be avoided completely?
> 
> James
> 
> 
> 
> 
> --
> gentoo-user@lists.gentoo.org mailing list

Compile glibc with USE="glibc-omitfp" to use -fomit-frame-pointer more
extensively. 

Question: Why are you using -march=i686 and some more optimized one? Which
processor (type and family) so you have?

-- 
gentoo-user@lists.gentoo.org mailing list



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

* Re: [gentoo-user]  CFLAGS changes
  2008-02-21 14:09 ` Dale
@ 2008-02-21 14:43   ` Dale
  0 siblings, 0 replies; 8+ messages in thread
From: Dale @ 2008-02-21 14:43 UTC (permalink / raw
  To: gentoo-user

Dale wrote:
> James wrote:
>> Hello,
>>
>>
>> Current  CFLAGS="-O2 -march=i686 -pipe"
>>
>>
>> I want to add "-fomit-frame-pointer" to my
>> CFLAGS on an existing system that has been running
>> for months.
>>
>>
>> Is this safe or do I have to rebuild everything with
>> somelike "emerge -e" ?
>>
>>
>> Should it be avoided completely?
>>
>> James
>>
>>   
>
> Not sure if the flag is safe but I don't think portage will pick up on 
> changes to CFLAGS.  You will have to do a emerge -e for all the 
> packages to be compiled with the new setting.
>
> You could also just change it and let the packages update over time as 
> they get upgraded.  I don't think that will cause any problems.
>
> You can also look here:   
> http://www.gentoo.org/doc/en/gcc-optimization.xml  Also note, there is 
> a page somewhere that gives the best CFLAGs but I can't find it.  
> Still looking tho.
>
> Dale
>
> :-)  :-)  :-) 

I found it.  This is not the "official" Gentoo site so use your own 
judgment or ask here before changing the settings.

http://gentoo-wiki.com/Safe_Cflags

Hope that helps.

Dale

:-)  :-)  :-)
-- 
gentoo-user@lists.gentoo.org mailing list



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

* Re: [gentoo-user]  CFLAGS changes
  2008-02-21 14:34 ` KH
@ 2008-02-21 16:12   ` Volker Armin Hemmann
  0 siblings, 0 replies; 8+ messages in thread
From: Volker Armin Hemmann @ 2008-02-21 16:12 UTC (permalink / raw
  To: gentoo-user

On Donnerstag, 21. Februar 2008, KH wrote:
> James wrote:
> > Hello,
> >
> >
> > Current  CFLAGS="-O2 -march=i686 -pipe"
> >
> >
> > I want to add "-fomit-frame-pointer" to my
> > CFLAGS on an existing system that has been running
> > for months.
> >
> >
> > Is this safe or do I have to rebuild everything with
> > somelike "emerge -e" ?
> >
> >
> > Should it be avoided completely?
> >
> > James
>
> Hi,
>
> I am not too good in English but I alway understood that:
> |-fomit-frame-pointer|
>
>     Don't keep the frame pointer in a register for functions that don't
>     need one. This avoids the instructions to save, set up and restore
>     frame pointers; it also makes an extra register available in many
>     functions. *It also makes debugging impossible on some machines.*
>
>     On some machines, such as the VAX, this flag has no effect, because
>     the standard calling sequence automatically handles the frame
>     pointer and nothing is saved by pretending it doesn't exist. The
>     machine-description macro |FRAME_POINTER_REQUIRED| controls whether
>     a target machine supports this flag. See Register Usage
>    
> <http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gccint/Registers.html#Registers>.
>
>
>     Enabled at levels -O, -O2, -O3, -Os.
>
>
> means, that fomit-frame-pointer is already active when -o ... is choose.
>
> see
> http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Optimize-Options.html#Optimize-
>Options

man gcc:
-O also turns on -fomit-frame-pointer on machines where doing so does not 
interfere with debugging.

It doesn't hurt to set it anyway. If it is enabled by OX, it will be ignored. 
-- 
gentoo-user@lists.gentoo.org mailing list



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

end of thread, other threads:[~2008-02-21 16:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-21 13:53 [gentoo-user] CFLAGS changes James
2008-02-21 14:09 ` Dale
2008-02-21 14:43   ` Dale
2008-02-21 14:16 ` Michal 'vorner' Vaner
2008-02-21 14:34 ` KH
2008-02-21 16:12   ` Volker Armin Hemmann
2008-02-21 14:34 ` Uwe Thiem
2008-02-21 14:41 ` justin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox