From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1LeOCB-0004ix-As for garchives@archives.gentoo.org; Tue, 03 Mar 2009 06:33:39 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A36F2E0398; Tue, 3 Mar 2009 06:33:37 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 84989E0398 for ; Tue, 3 Mar 2009 06:33:37 +0000 (UTC) Received: from gentoo.org (c-98-246-79-112.hsd1.or.comcast.net [98.246.79.112]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id F17B1642E9 for ; Tue, 3 Mar 2009 06:33:36 +0000 (UTC) Date: Mon, 2 Mar 2009 22:33:36 -0800 From: Donnie Berkholz To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] Using -frecord-gcc-switches Message-ID: <20090303063336.GB3811@comet> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ADZbWkCsHQ7r3kzd" Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Archives-Salt: 208e5628-7c11-4b6e-86db-7489fe767c14 X-Archives-Hash: ae1fe089a331e93187a397d57618924b --ADZbWkCsHQ7r3kzd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable -frecord-gcc-switches is a really cool gcc option to save the CFLAGS a=20 binary was built with in the binary itself. This could help with our bug=20 reporting or with various QA checks. Imagine if `emerge --info cat/pkg`=20 showed the CFLAGS that the binaries were actually built with, instead of=20 some global setting or the CFLAGS environment variable that may well not=20 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 0x697= 60: [ 27] -march=3Dcore2 [ 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 0x1b4= d0: [ 34] -march=3Dcore2 [ 41] -msse4.1 [ 80] -g [ 83] -O2 [ 87] -w [ 8a] -std=3Dgnu99 [ 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=3D2 [ 10d2] -auxbase-strip isnanl.o Thoughts? Could we do something useful with this? --=20 Thanks, Donnie Donnie Berkholz Developer, Gentoo Linux Blog: http://dberkholz.wordpress.com --ADZbWkCsHQ7r3kzd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (GNU/Linux) iEYEABECAAYFAkmsz0AACgkQXVaO67S1rtsDMgCglYUkYM302ZsiRM7NwGcBNFQ5 eHgAoIVF31TxS12zwGzspUbMlPKA+Crf =rVF/ -----END PGP SIGNATURE----- --ADZbWkCsHQ7r3kzd--