From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-dev+bounces-42182-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1Oitnw-0002MB-Nw
	for garchives@archives.gentoo.org; Tue, 10 Aug 2010 18:44:04 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 092F0E0B13;
	Tue, 10 Aug 2010 18:44:03 +0000 (UTC)
Received: from mail-qw0-f53.google.com (mail-qw0-f53.google.com [209.85.216.53])
	by pigeon.gentoo.org (Postfix) with ESMTP id B3F27E0AF0
	for <gentoo-dev@lists.gentoo.org>; Tue, 10 Aug 2010 18:42:59 +0000 (UTC)
Received: by qwj8 with SMTP id 8so55255qwj.40
        for <gentoo-dev@lists.gentoo.org>; Tue, 10 Aug 2010 11:42:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:mime-version:received:received:in-reply-to
         :references:date:message-id:subject:from:to:content-type;
        bh=Ima0yVY5l0R8VAvsQD4G7EVxF+bX+igSjmK1UolY+B8=;
        b=r4Ic6eGy7UIMZBd4jTupdthS5xTwZkTnEhTtBMbRaIn6SPDObrR4acQcZgYNbj/07X
         IrqbyF7wHlO/jFv87cf5LFdKfew02qZDC4cDwpv1veIkeK1Bs8Bzz5s2exakcTssBza1
         BFZFiHVdLRKjv5Pl//3jrsVJBqwq6o3wPe0As=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type;
        b=kOgFfdaOthFP84MdtFbpmoIK8irdqmC4UL8HGcXw06MDuWJonnzVyvF0mXeIiXKqLs
         wIBq+VPsNuf3xCmk5+v4TUhZFwxyYQVDltrh0kV4D397B3FJSK5jTe3VxJt1fw3c8xHQ
         Z+kcTWli3ggoy7M1Ny5rPQoC/KXj/k9LoM2Yc=
Precedence: bulk
List-Post: <mailto:gentoo-dev@lists.gentoo.org>
List-Help: <mailto:gentoo-dev+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-dev+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-dev+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org>
X-BeenThere: gentoo-dev@lists.gentoo.org
Reply-to: gentoo-dev@lists.gentoo.org
MIME-Version: 1.0
Received: by 10.229.88.10 with SMTP id y10mr1935887qcl.144.1281465648709; Tue, 
	10 Aug 2010 11:40:48 -0700 (PDT)
Received: by 10.229.6.6 with HTTP; Tue, 10 Aug 2010 11:40:48 -0700 (PDT)
In-Reply-To: <20100810084548.GG30937@hrair>
References: <20100807163230.GA31575@Mystical>
	<201008071732.43567.vapier@gentoo.org>
	<20100808001142.GA7077@Mystical>
	<201008072216.25549.vapier@gentoo.org>
	<20100809230323.GA21233@Mystical>
	<AANLkTi=GPSOpoX4H0fmP-fO=zWXaQ7-JXC0i+oT8CuzT@mail.gmail.com>
	<20100810084548.GG30937@hrair>
Date: Tue, 10 Aug 2010 20:40:48 +0200
Message-ID: <AANLkTi=0PuYm1Xr2RW=Hu1Zhe61cipQ1o9vdwEEx4dSh@mail.gmail.com>
Subject: Re: [gentoo-dev] Re: Add --hash-style=gnu to LDFLAGS
From: Francesco R <vivo75@gmail.com>
To: gentoo-dev@lists.gentoo.org
Content-Type: multipart/alternative; boundary=0016367fa1bac8811a048d7c788e
X-Archives-Salt: d307527b-eeaf-4548-8e8f-b7f888d23154
X-Archives-Hash: 92c2bf442e3b8a8367a44951b4a02b32

--0016367fa1bac8811a048d7c788e
Content-Type: text/plain; charset=ISO-8859-1

2010/8/10 Brian Harring <ferringb@gmail.com>

> On Mon, Aug 09, 2010 at 07:05:11PM -0400, Mike Frysinger wrote:
> > On Mon, Aug 9, 2010 at 7:03 PM, Markos Chandras wrote:
> > > On Sat, Aug 07, 2010 at 10:16:24PM -0400, Mike Frysinger wrote:
> > >> obviously you only mean linux x86/amd64 dev profiles.  i dont have a
> strong
> > >> opinion on that small subset in either direction.
> > >
> > > So do you agree to make this linker option default to linux x86/amd64
> dev/
> > > profiles?
> >
> > add them or dont add them, "i dont have a [...] opinion [...] in
> > either direction".  if put to a vote, i'd abstain.
>
> Possibly a stupid question, but any reason we've not looked at
> injecting something that has lower actual affect but can still be used
> for a canary?  I'm thinking of --build-id specifically...
>
> ~brian
>

I don't know how --hash-style=gnu is used to check for LDFLAGS, so this may
be OT.

On my personal and _breakable_ desktop I do use
LDFLAGS="${LDFLAGS} -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
-Wl,--sort-common -Wl,--build-id"
in make.conf.

Would this two liners tell me which package who install binaries in /usr/bin
does not respect ldflags?

# for i in /usr/bin/* ; do eu-unstrip -n -e  $i ; done &> build-id.txt
# qfile $(grep '0x[0-9]*+0x[0-9]* - ' build-id.txt | awk '{ print $3 }')

On a side note, I've noticed that build-id change at every re-compilation of
the package, even if nothing changed in the system, since it's supposed to
be a "160-bit SHA1 hash on the normative parts of the output contents"
should it be the same if the package is compiled on the same system with no
changes?

Output of the two liners for this system:

sys-apps/turbotail (/usr/bin/turbotail)
app-arch/rzip (/usr/bin/runzip)
app-arch/rzip (/usr/bin/rzip)
dev-lang/go (/usr/bin/6a)
dev-lang/go (/usr/bin/6cov)
dev-lang/go (/usr/bin/6l)
dev-lang/go (/usr/bin/6nm)
dev-lang/xharbour (/usr/bin/pprun)
dev-lang/xharbour (/usr/bin/hbmake)
dev-lang/xharbour (/usr/bin/hbdict)
dev-lang/xharbour (/usr/bin/xbscript)
dev-lang/perl (/usr/bin/perl)
dev-lang/perl (/usr/bin/perl5.12.1)
dev-lang/R (/usr/bin/Rscript)
x11-misc/xcb (/usr/bin/xcb)
dev-libs/dietlibc (/usr/bin/dnsd)
dev-libs/dietlibc (/usr/bin/elftrunc)
app-text/o3read (/usr/bin/utf8tolatin1)
app-accessibility/festival (/usr/bin/audsp)
app-accessibility/espeak (/usr/bin/espeak)
sys-devel/gcc (/usr/bin/x86_64-pc-linux-gnu-gcjh-4.4.4)
sys-devel/gcc (/usr/bin/gcjh-4.4.4)
sys-devel/llvm-gcc (/usr/bin/llvm-gcov)
sys-devel/qconf (/usr/bin/qconf)
www-plugins/lightspark (/usr/bin/lightspark)

--0016367fa1bac8811a048d7c788e
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br><br><div class=3D"gmail_quote">2010/8/10 Brian Harring <span dir=3D"ltr=
">&lt;<a href=3D"mailto:ferringb@gmail.com">ferringb@gmail.com</a>&gt;</spa=
n><br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-l=
eft:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class=3D"h5">On Mon, Aug 09, 2010 at 07:05:11PM -0400,=
 Mike Frysinger wrote:<br>
&gt; On Mon, Aug 9, 2010 at 7:03 PM, Markos Chandras wrote:<br>
&gt; &gt; On Sat, Aug 07, 2010 at 10:16:24PM -0400, Mike Frysinger wrote:<b=
r>
&gt; &gt;&gt; obviously you only mean linux x86/amd64 dev profiles. =A0i do=
nt have a strong<br>
&gt; &gt;&gt; opinion on that small subset in either direction.<br>
&gt; &gt;<br>
&gt; &gt; So do you agree to make this linker option default to linux x86/a=
md64 dev/<br>
&gt; &gt; profiles?<br>
&gt;<br>
&gt; add them or dont add them, &quot;i dont have a [...] opinion [...] in<=
br>
&gt; either direction&quot;. =A0if put to a vote, i&#39;d abstain.<br>
<br>
</div></div>Possibly a stupid question, but any reason we&#39;ve not looked=
 at<br>
injecting something that has lower actual affect but can still be used<br>
for a canary? =A0I&#39;m thinking of --build-id specifically...<br>
<font color=3D"#888888"><br>
~brian<br></font></blockquote><div><br></div><div>I don&#39;t know how=A0--=
hash-style=3Dgnu is used to check for LDFLAGS, so this may be OT.</div><div=
><br></div><div>On my personal and _breakable_ desktop I do use</div><div>
LDFLAGS=3D&quot;${LDFLAGS} -Wl,-O1 -Wl,--hash-style=3Dgnu -Wl,--as-needed -=
Wl,--sort-common -Wl,--build-id&quot;</div><div>in make.conf.</div><div><br=
></div><div>Would this two liners tell me which package who install binarie=
s in /usr/bin does not respect ldflags?</div>
<div><br></div><div># for i in /usr/bin/* ; do eu-unstrip -n -e =A0$i ; don=
e &amp;&gt; build-id.txt</div><div># qfile $(grep &#39;0x[0-9]*+0x[0-9]* - =
&#39; build-id.txt | awk &#39;{ print $3 }&#39;)</div><div><br></div><div>
On a side note, I&#39;ve noticed that build-id change at every re-compilati=
on of the package, even if nothing changed in the system, since it&#39;s su=
pposed to be a &quot;160-bit SHA1 hash on the normative parts of the output=
 contents&quot; should it be the same if the package is compiled on the sam=
e system with no changes?</div>
<div><br></div><div>Output of the two liners for this system:</div><div><br=
></div><div>sys-apps/turbotail (/usr/bin/turbotail)</div><div>app-arch/rzip=
 (/usr/bin/runzip)</div><div>app-arch/rzip (/usr/bin/rzip)</div><div>dev-la=
ng/go (/usr/bin/6a)</div>
<div>dev-lang/go (/usr/bin/6cov)</div><div>dev-lang/go (/usr/bin/6l)</div><=
div>dev-lang/go (/usr/bin/6nm)</div><div>dev-lang/xharbour (/usr/bin/pprun)=
</div><div>dev-lang/xharbour (/usr/bin/hbmake)</div><div>dev-lang/xharbour =
(/usr/bin/hbdict)</div>
<div>dev-lang/xharbour (/usr/bin/xbscript)</div><div>dev-lang/perl (/usr/bi=
n/perl)</div><div>dev-lang/perl (/usr/bin/perl5.12.1)</div><div>dev-lang/R =
(/usr/bin/Rscript)</div><div>x11-misc/xcb (/usr/bin/xcb)</div><div>dev-libs=
/dietlibc (/usr/bin/dnsd)</div>
<div>dev-libs/dietlibc (/usr/bin/elftrunc)</div><div>app-text/o3read (/usr/=
bin/utf8tolatin1)</div><div>app-accessibility/festival (/usr/bin/audsp)</di=
v><div>app-accessibility/espeak (/usr/bin/espeak)</div><div>sys-devel/gcc (=
/usr/bin/x86_64-pc-linux-gnu-gcjh-4.4.4)</div>
<div>sys-devel/gcc (/usr/bin/gcjh-4.4.4)</div><div>sys-devel/llvm-gcc (/usr=
/bin/llvm-gcov)</div><div>sys-devel/qconf (/usr/bin/qconf)</div><div>www-pl=
ugins/lightspark (/usr/bin/lightspark)</div><div>=A0</div></div><br>

--0016367fa1bac8811a048d7c788e--