Re: [gentoo-user] Is "-fomit-frame-pointer" a gcc default?

2016-07-12 Thread Fernando Rodriguez
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 07/11/2016 04:51 PM, J. García wrote:
> El lun, 11-07-2016 a las 16:27 -0400, waltd...@waltdnes.org escribió:
>>   I put it into CFLAGS/CCFLAGS years ago, and left it there.  During
>> a
>> discussion on the Pale Moon forum about build options, the opinion
>> seems
>> to be that "-fomit-frame-pointer" is now the default.  Is that
>> correct?
>> I'd like to simplify my CFLAGS/CCFLAGS both in Gentoo and the Pale
>> Moon
>> build process.
>>
> I think it is, at least here it is a default, you can find out by
> running:
> gcc -c -Q --help=optimizers
> 
> It gets activated with -O, and -O2 is the default in Gentoo, so it
> should be.

No. At least for me it is -O0. I tested by compiling a small program with 
different
options and diffing the binaries. You can get a definitive answer for any gcc 
option
defaults like that. As long as your test program is complex enough to use those 
features.
You can also diff the output of the -f and -fno flags and if they don't differ 
then
either the test program is not complex enough or the feature has not effect on 
your arch
or platform.

> From the gcc manual:
> "-O also turns on -fomit-frame-pointer on machines where doing so does
> not interfere with debugging."
> 

-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJXhVkRAAoJEPbOFX/5Ulwcpi4P/2btg0u+HquLcpHQnw7Ja/KT
8Y0rOPeU38aL0vbI3Qfc/9cLjlZbdsK7G53GYhdOVMhbO5h8OxZiKQraIErTJmhC
BFR4tZosCft636jsEDD1H5XlmjpeBmvt+YnwnUSXOJe6mjqzpaV1Cyj2ikjQIm3p
etoZQ2odXOCHS4zYA9td1HA6/W3C/frCYXr18w3Nx5qO8BbCzFZx6vxC8ts9krym
xkg3EZhShPnyOIfSkZNq3yotnRoiN1JFZjr1hzfEaMnNlMfn5T6a1hHHUs3/khsP
aQMlLZAbnxpjNQTslLvEsLPhCwqPylJXa28iHD4SvbGrz9PvCWkOsbIB1XN6J0f2
ZYnHBZ0ZGF8CMdLsIF6SEbseIeq41Wxy3iKH5LpP6TWMRL3RGFAHG8VZAJoxH/fI
l2WsVLotAHfdg6Zm2cx/ZxQQyjtQl1lohfhY+NtWHhLymrWpZl5aiiTsty7DBjKa
M3y9kX0q9CcixK868jRgB11wtWGXp0jMzBs052Y0zpB6IPWx/h9Xc5eTqVjKd18Z
teioIIAGUUkIobNuC6Yo9RVSHS7vjVBYSLPD1uiOnxkTFL9zzWvc+gtYRY2NCzhj
ZRg1OPFGgXQW9SoKlpMw6G0nrtx/zO7aQzRWD15JzafdCa9PckegAidpoEJg11cg
VewJz+zagKPgGAl1euw1
=1mBf
-END PGP SIGNATURE-



Re: [gentoo-user] Is "-fomit-frame-pointer" a gcc default?

2016-07-12 Thread R0b0t1
Pale Moon is routinely behind Firefox on security fixes (actual fixes,
not wanking-in-a-corner fixes).



Re: [gentoo-user] Is "-fomit-frame-pointer" a gcc default?

2016-07-12 Thread konsolebox
On Tue, Jul 12, 2016 at 6:07 PM, Andrew Savchenko  wrote:
> Hi,
>
> On Mon, 11 Jul 2016 16:27:42 -0400 waltd...@waltdnes.org wrote:
>>   I put it into CFLAGS/CCFLAGS years ago, and left it there.  During a
>> discussion on the Pale Moon forum about build options, the opinion seems
>> to be that "-fomit-frame-pointer" is now the default.  Is that o?
>> I'd like to simplify my CFLAGS/CCFLAGS both in Gentoo and the Pale Moon
>> build process.
>
> gcc-5.3.0 manual says:
>   The default setting (when not optimizing for size) for 32-bit
>   GNU/Linux x86 and 32-bit Darwin x86 targets is
>   -fomit-frame-pointer. You can configure GCC with the
>   --enable-frame-pointer configure option to change the default.

And this was first mentioned in 4.6.0's changelog, but I don't see
anything about x86_64.

-- 
konsolebox



Re: [gentoo-user] Is "-fomit-frame-pointer" a gcc default?

2016-07-12 Thread Andrew Savchenko
Hi,

On Mon, 11 Jul 2016 16:27:42 -0400 waltd...@waltdnes.org wrote:
>   I put it into CFLAGS/CCFLAGS years ago, and left it there.  During a
> discussion on the Pale Moon forum about build options, the opinion seems
> to be that "-fomit-frame-pointer" is now the default.  Is that o?
> I'd like to simplify my CFLAGS/CCFLAGS both in Gentoo and the Pale Moon
> build process.

gcc-5.3.0 manual says:
  The default setting (when not optimizing for size) for 32-bit
  GNU/Linux x86 and 32-bit Darwin x86 targets is
  -fomit-frame-pointer. You can configure GCC with the
  --enable-frame-pointer configure option to change the default.

So it depends not only on the arch, but also on how gcc was
compiled. Strange, but here Gentoo x86 I have -fomit-frame-pointer
disabled by default, so either gcc manpage is wrong or Gentoo
disables frame pointer during gcc configuration (I can't confirm the
latter after digging into toolchain eclass).

This flag is yummy on amd64 and very important on x86, since x86
has only 8 "general purpose" CPU registers, 4 of which have special
use, so only 4 are available for general computations and 1 of them
is wasted on frame-pointer, not nice. The cost of extra register is
that profiling is no longer possible and debugging may be mangled a
bit.

Looks like -fpic disables -fomit-frame-pointer at least for some
pieces of the code: hand-written 4-registers assembly makes -fpic
fail in some cases on x86 (e.g. ffmpeg).

Best regards,
Andrew Savchenko


pgpR2ZOUwzOdB.pgp
Description: PGP signature


Re: [gentoo-user] Is "-fomit-frame-pointer" a gcc default?

2016-07-11 Thread J.
El lun, 11-07-2016 a las 20:47 -0400, waltd...@waltdnes.org escribió:
> On Tue, Jul 12, 2016 at 01:48:37AM +0200, Volker Armin Hemmann wrote
> 
> > so it is not turned on on x86. Not sure about amd64. IIRC it is
> > default
> > on amd64, but I am not sure and too lazy to google. Just like the
> > thread
> > starter.
> 
>   Actually, I did Google.  So did another particpant in the Pale Moon
> forum.  We got different answers, and various other people chimed in.
> That's why I posted here.  BTW, "gcc -O2 -Q --help=optimizers"
> returns
> 
>   -fomit-frame-pointer  [disabled]
> 
> ...in both my real 64-bit Gentoo install and my 32-bit VM Gentoo.
> 
I made a mistake, I didn't ran the 'gcc -Q .." command correctly, a
typo, so I didn't really checked just got the list of optimizers, but
checking again I also have it disabled by default:

$ gcc -c   -march=core2 -O2 -Q --help=optimizers  |\
grep fomit-frame-pointer
  -fomit-frame-pointer  [disabled]



Re: [gentoo-user] Is "-fomit-frame-pointer" a gcc default?

2016-07-11 Thread waltdnes
On Tue, Jul 12, 2016 at 01:48:37AM +0200, Volker Armin Hemmann wrote

> so it is not turned on on x86. Not sure about amd64. IIRC it is default
> on amd64, but I am not sure and too lazy to google. Just like the thread
> starter.

  Actually, I did Google.  So did another particpant in the Pale Moon
forum.  We got different answers, and various other people chimed in.
That's why I posted here.  BTW, "gcc -O2 -Q --help=optimizers" returns

  -fomit-frame-pointer  [disabled]

...in both my real 64-bit Gentoo install and my 32-bit VM Gentoo.

-- 
Walter Dnes 
I don't run "desktop environments"; I run useful applications



Re: [gentoo-user] Is "-fomit-frame-pointer" a gcc default?

2016-07-11 Thread Volker Armin Hemmann
Am 11.07.2016 um 22:51 schrieb J. García:
> El lun, 11-07-2016 a las 16:27 -0400, waltd...@waltdnes.org escribió:
>>   I put it into CFLAGS/CCFLAGS years ago, and left it there.  During
>> a
>> discussion on the Pale Moon forum about build options, the opinion
>> seems
>> to be that "-fomit-frame-pointer" is now the default.  Is that
>> correct?
>> I'd like to simplify my CFLAGS/CCFLAGS both in Gentoo and the Pale
>> Moon
>> build process.
>>
> I think it is, at least here it is a default, you can find out by
> running:
> gcc -c -Q --help=optimizers
>
> It gets activated with -O, and -O2 is the default in Gentoo, so it
> should be.
> >From the gcc manual:
> "-O also turns on -fomit-frame-pointer on machines where doing so does
> not interfere with debugging."
>
>
so it is not turned on on x86. Not sure about amd64. IIRC it is default
on amd64, but I am not sure and too lazy to google. Just like the thread
starter.



Re: [gentoo-user] Is "-fomit-frame-pointer" a gcc default?

2016-07-11 Thread J.
El lun, 11-07-2016 a las 16:27 -0400, waltd...@waltdnes.org escribió:
>   I put it into CFLAGS/CCFLAGS years ago, and left it there.  During
> a
> discussion on the Pale Moon forum about build options, the opinion
> seems
> to be that "-fomit-frame-pointer" is now the default.  Is that
> correct?
> I'd like to simplify my CFLAGS/CCFLAGS both in Gentoo and the Pale
> Moon
> build process.
> 
I think it is, at least here it is a default, you can find out by
running:
gcc -c -Q --help=optimizers

It gets activated with -O, and -O2 is the default in Gentoo, so it
should be.
>From the gcc manual:
"-O also turns on -fomit-frame-pointer on machines where doing so does
not interfere with debugging."



Re: [gentoo-user] Is "-fomit-frame-pointer" a gcc default?

2016-07-11 Thread Michael Cook

On 07/11/2016 04:27 PM, waltd...@waltdnes.org wrote:

  I put it into CFLAGS/CCFLAGS years ago, and left it there.  During a
discussion on the Pale Moon forum about build options, the opinion seems
to be that "-fomit-frame-pointer" is now the default.  Is that correct?
I'd like to simplify my CFLAGS/CCFLAGS both in Gentoo and the Pale Moon
build process.


It depends on the CPU. Most modern (x86 at least) stuff most likely are.



[gentoo-user] Is "-fomit-frame-pointer" a gcc default?

2016-07-11 Thread waltdnes
  I put it into CFLAGS/CCFLAGS years ago, and left it there.  During a
discussion on the Pale Moon forum about build options, the opinion seems
to be that "-fomit-frame-pointer" is now the default.  Is that correct?
I'd like to simplify my CFLAGS/CCFLAGS both in Gentoo and the Pale Moon
build process.

-- 
Walter Dnes 
I don't run "desktop environments"; I run useful applications