FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 03-03-2009, 05:33 AM
Donnie Berkholz
 
Default Using -frecord-gcc-switches

-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
 
Old 03-03-2009, 07:20 AM
Rémi Cardona
 
Default Using -frecord-gcc-switches

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
 

Thread Tools




All times are GMT. The time now is 09:30 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org