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 1Lbrho-00086D-E8 for garchives@archives.gentoo.org; Tue, 24 Feb 2009 07:27:52 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 52964E043B; Tue, 24 Feb 2009 07:27:49 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 31657E043B for ; Tue, 24 Feb 2009 07:27:49 +0000 (UTC) Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id ACF74B7039; Tue, 24 Feb 2009 07:27:48 +0000 (UTC) From: Mike Frysinger Organization: wh0rd.org To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] http://bugs.gentoo.org/show_bug.cgi?id=232084 Date: Tue, 24 Feb 2009 02:27:46 -0500 User-Agent: KMail/1.11.0 (Linux/2.6.28; KDE/4.2.0; x86_64; ; ) Cc: Andrew D Kirch References: <49A38C45.5080301@trelane.net> In-Reply-To: <49A38C45.5080301@trelane.net> 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; boundary="nextPart2418370.cgPxGvpmJx"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200902240227.47612.vapier@gentoo.org> X-Archives-Salt: aa84286e-036d-4776-b05a-8c1f1b17cdce X-Archives-Hash: a88063b8af9e1246987d2c72acf02a3e --nextPart2418370.cgPxGvpmJx Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tuesday 24 February 2009 00:57:25 Andrew D Kirch wrote: > I was looking to do a workaround on a per compiler basis. > I'm looking at toolchain-funcs.eclass, and specifically > ${gcc-fullversion}. I've got a broken ebuild (dhcdbd) which requires > -U_FORTIFY_SOURCE to compile correctly with GCC 4.3.3. it's broken whenever fortify source is used, but gcc-4.3.3 is more of an is= sue=20 because it's on by default. however, this flag should not go in any dhcdbd= =20 ebuild considering the fix posted by Magnus to that bug is clearly correct. > But reading > tells me that I should not use this eclass to set compiler settings > directly. Will this work, and other than the merit of the fix is there > a more desirable structure for such a solution? > > inherit flag-o-matic toolchain-funcs > > if [ "${gcc-fullversion}" -eq "4.3.3" ] #(or whatever the 4.3.3 > $gcc-fullversion} outputs) > then > append-flags -U_FORTIFY_SOURCE > fi i'll just address style/usage issues here rather than "is this change even= =20 correct" ... =2Deq is for numeric values, not strings. so you'd want: [[ $(gcc-fullversion) =3D=3D "4.3.3" ]] && append-cppflags -U_FORTIFY_SOURCE =2Dmike --nextPart2418370.cgPxGvpmJx Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (GNU/Linux) iQIcBAABAgAGBQJJo6FzAAoJEEFjO5/oN/WBvl4P/AupBRDKBF+cDVnzEL/StkS/ JUFmX00mvp8Po+hJRN6NrNcmpOb48mup3ZlkUsoztuXxBSqe+OBL6a0KrvWP08Th I4D3RWMV5xYvovFaF/6B4F5d8TPkLHAJO+L/eQCxNltvbu7Ll570+d2zTx3FPrvE ejO/CjPAz4xHEFCrSOoJznULQRdTmdbvWzG9sUYUUxgDCKOdL/xRInovoJyxPojO lw2YSYZorX1pBGVYdN0hqpYe68jAxCD034yUt5Fb9GnqZAwNwDtJkdQuQmOWOmEY XgEh7GvfIAi3/R/ROWxwG3DUVCo5+XCvcZOBOSCldbrPFaNoXdtohYWCImPdf36L PkBP6TH5MpIrWsKwnWUVnpmZY5GsVjHQD3cipgK1RugE5el4BjJJDJ0gw6xqOD0t Uu8qvAQcuQCDxknPJMpODa5B3S8859Wil8QnFDtGPF3ny2uQyjdu7LPxTzvKzbHM A8c1+DJCN1jUp+DTCp1GEYE4vN+E3Nv1MfRXQFvwJK5gP75JXtalv3xlS50K0TsA VNtH6EMf7rEIZvavD+lga/4/ZfrO6i6EVVtEuEneW6MFI4xineNJbT26OjFDS8el KeXevQIXR7moVGRRo1Y9s1PT9T02ceXWPvEDzA3wpWNsvkhg71rwBPsIPu43CnR9 7vJEjR41UxlPqXpagahD =9igK -----END PGP SIGNATURE----- --nextPart2418370.cgPxGvpmJx--