Gentoo Archives: gentoo-user

From: Fernando Rodriguez <cyklonite@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Is "-fomit-frame-pointer" a gcc default?
Date: Tue, 12 Jul 2016 20:54:07
Message-Id: 9ff4c413-1ad5-b983-c27b-c21660d08791@gmail.com
In Reply to: Re: [gentoo-user] Is "-fomit-frame-pointer" a gcc default? by "J."
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA256
3
4 On 07/11/2016 04:51 PM, J. García wrote:
5 > El lun, 11-07-2016 a las 16:27 -0400, waltdnes@××××××××.org escribió:
6 >> I put it into CFLAGS/CCFLAGS years ago, and left it there. During
7 >> a
8 >> discussion on the Pale Moon forum about build options, the opinion
9 >> seems
10 >> to be that "-fomit-frame-pointer" is now the default. Is that
11 >> correct?
12 >> I'd like to simplify my CFLAGS/CCFLAGS both in Gentoo and the Pale
13 >> Moon
14 >> build process.
15 >>
16 > I think it is, at least here it is a default, you can find out by
17 > running:
18 > gcc -c -Q --help=optimizers
19 >
20 > It gets activated with -O, and -O2 is the default in Gentoo, so it
21 > should be.
22
23 No. At least for me it is -O0. I tested by compiling a small program with different
24 options and diffing the binaries. You can get a definitive answer for any gcc option
25 defaults like that. As long as your test program is complex enough to use those features.
26 You can also diff the output of the -f and -fno flags and if they don't differ then
27 either the test program is not complex enough or the feature has not effect on your arch
28 or platform.
29
30 > From the gcc manual:
31 > "-O also turns on -fomit-frame-pointer on machines where doing so does
32 > not interfere with debugging."
33 >
34
35 -----BEGIN PGP SIGNATURE-----
36 Version: GnuPG v2
37
38 iQIcBAEBCAAGBQJXhVkRAAoJEPbOFX/5Ulwcpi4P/2btg0u+HquLcpHQnw7Ja/KT
39 8Y0rOPeU38aL0vbI3Qfc/9cLjlZbdsK7G53GYhdOVMhbO5h8OxZiKQraIErTJmhC
40 BFR4tZosCft636jsEDD1H5XlmjpeBmvt+YnwnUSXOJe6mjqzpaV1Cyj2ikjQIm3p
41 etoZQ2odXOCHS4zYA9td1HA6/W3C/frCYXr18w3Nx5qO8BbCzFZx6vxC8ts9krym
42 xkg3EZhShPnyOIfSkZNq3yotnRoiN1JFZjr1hzfEaMnNlMfn5T6a1hHHUs3/khsP
43 aQMlLZAbnxpjNQTslLvEsLPhCwqPylJXa28iHD4SvbGrz9PvCWkOsbIB1XN6J0f2
44 ZYnHBZ0ZGF8CMdLsIF6SEbseIeq41Wxy3iKH5LpP6TWMRL3RGFAHG8VZAJoxH/fI
45 l2WsVLotAHfdg6Zm2cx/ZxQQyjtQl1lohfhY+NtWHhLymrWpZl5aiiTsty7DBjKa
46 M3y9kX0q9CcixK868jRgB11wtWGXp0jMzBs052Y0zpB6IPWx/h9Xc5eTqVjKd18Z
47 teioIIAGUUkIobNuC6Yo9RVSHS7vjVBYSLPD1uiOnxkTFL9zzWvc+gtYRY2NCzhj
48 ZRg1OPFGgXQW9SoKlpMw6G0nrtx/zO7aQzRWD15JzafdCa9PckegAidpoEJg11cg
49 VewJz+zagKPgGAl1euw1
50 =1mBf
51 -----END PGP SIGNATURE-----