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 02-24-2009, 04:57 AM
Andrew D Kirch
 
Default http://bugs.gentoo.org/show_bug.cgi?id=232084

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. 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

Thanks for the help.
 
Old 02-24-2009, 06:27 AM
Mike Frysinger
 
Default http://bugs.gentoo.org/show_bug.cgi?id=232084

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
 
Old 02-26-2009, 06:04 AM
Caleb Cushing
 
Default http://bugs.gentoo.org/show_bug.cgi?id=232084

fyi my email client doesn't recognize urls in the subject line, don't
know about anyone elses... but it'd be nice to click the link to the
bug, and you know have some clue what this is about without reading
the bug (e.g. a useful subject line). </endrant> sorry I can't be of
any further help here.

On Tue, Feb 24, 2009 at 12:57 AM, Andrew D Kirch <trelane@trelane.net> wrote:
> Thanks for the help.



--
Caleb Cushing

http://xenoterracide.blogspot.com
 

Thread Tools




All times are GMT. The time now is 05:43 AM.

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