Thanks, that did it!

# grep confdir catalyst-netboot2.spec
portage_confdir: /etc/portage

# find /etc/portage/env -type f -exec cat {} \; -print
CFLAGS="-mtune=core2 -march=core2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
/etc/portage/env/net-ftp/tftp-hpa

My tftp client no longer segs :) 


-----Original Message-----
From: Matt Turner [mailto:[email protected]] 
Sent: Tuesday, October 18, 2011 2:58 PM
To: [email protected]
Subject: Re: [gentoo-catalyst] Setting cflags for a single package in
spec file

On Tue, Oct 18, 2011 at 2:15 PM, Garrity, Christopher
<[email protected]> wrote:
>
> Is there a way to set cflags for just a single package inside the spec
file?
> I don't need/want to override cflags for all packages, just one.
> net-ftp/tftp-hpa-5.1 is causing my netboot2 target to fail because of 
> a bug related to -O2 and gcc-4.5.3 :(

Not in the spec file directly.

What I would do is set portage_confdir in the spec file, ie
portage_confdir: /directory/containing/etc/portage

And inside your confdir, set CFLAG exceptions as described here:
http://www.gentoo-wiki.info/CflagsExceptions

Let us know if that works for you.

Matt


Reply via email to