public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: Andrew D Kirch <trelane@trelane.net>
Subject: Re: [gentoo-dev] http://bugs.gentoo.org/show_bug.cgi?id=232084
Date: Tue, 24 Feb 2009 02:27:46 -0500	[thread overview]
Message-ID: <200902240227.47612.vapier@gentoo.org> (raw)
In-Reply-To: <49A38C45.5080301@trelane.net>

[-- Attachment #1: Type: text/plain, Size: 1191 bytes --]

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 issue 
because it's on by default.  however, this flag should not go in any dhcdbd 
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 
correct" ...

-eq is for numeric values, not strings.  so you'd want:
[[ $(gcc-fullversion) == "4.3.3" ]] && append-cppflags -U_FORTIFY_SOURCE
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2009-02-24  7:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-24  5:57 [gentoo-dev] http://bugs.gentoo.org/show_bug.cgi?id=232084 Andrew D Kirch
2009-02-24  7:27 ` Mike Frysinger [this message]
2009-02-26  7:04 ` Caleb Cushing

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200902240227.47612.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=trelane@trelane.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox