* [gentoo-dev] Using -frecord-gcc-switches
@ 2009-03-03 6:33 Donnie Berkholz
2009-03-03 8:20 ` Rémi Cardona
0 siblings, 1 reply; 2+ messages in thread
From: Donnie Berkholz @ 2009-03-03 6:33 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1468 bytes --]
-frecord-gcc-switches is a really cool gcc option to save the CFLAGS a
binary was built with in the binary itself. This could help with our bug
reporting or with various QA checks. Imagine if `emerge --info cat/pkg`
showed the CFLAGS that the binaries were actually built with, instead of
some global setting or the CFLAGS environment variable that may well not
be respected.
Here's a couple examples of it:
comet $ eu-readelf -p /usr/lib/libxdl_view.so | grep -v -e distcc -e ccache
String section [25] '.GCC.command.line' contains 1870 bytes at offset 0x69760:
[ 27] -march=core2
[ 34] -msse4.1
[ 64] -g
[ 67] -O2
[ 6b] -w
[ 6e] -ftree-vectorize
[ 7f] -frecord-gcc-switches
[ 95] -fPIC
comet $ eu-readelf -p /bin/ls | grep -v -e distcc -e ccache
String section [26] '.GCC.command.line' contains 4558 bytes at offset 0x1b4d0:
[ 34] -march=core2
[ 41] -msse4.1
[ 80] -g
[ 83] -O2
[ 87] -w
[ 8a] -std=gnu99
[ 95] -ftree-vectorize
[ a6] -frecord-gcc-switches
[ 107e] -I.
[ 1082] -MD isnanl.d
[ 108f] -MF .deps/isnanl.Tpo
[ 10a4] -MP
[ 10a8] -MT isnanl.o
[ 10b5] isnanl.c
[ 10be] -D_FORTIFY_SOURCE=2
[ 10d2] -auxbase-strip isnanl.o
Thoughts? Could we do something useful with this?
--
Thanks,
Donnie
Donnie Berkholz
Developer, Gentoo Linux
Blog: http://dberkholz.wordpress.com
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [gentoo-dev] Using -frecord-gcc-switches
2009-03-03 6:33 [gentoo-dev] Using -frecord-gcc-switches Donnie Berkholz
@ 2009-03-03 8:20 ` Rémi Cardona
0 siblings, 0 replies; 2+ messages in thread
From: Rémi Cardona @ 2009-03-03 8:20 UTC (permalink / raw
To: gentoo-dev
Le 03/03/2009 07:33, Donnie Berkholz a écrit :
> Thoughts? Could we do something useful with this?
What about the various objects that make up the final lib/binary? How is
this handled?
Looks like a promising idea though
Cheers,
Rémi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-03 8:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-03 6:33 [gentoo-dev] Using -frecord-gcc-switches Donnie Berkholz
2009-03-03 8:20 ` Rémi Cardona
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox