Gentoo Archives: gentoo-catalyst

From: "Garrity
To: gentoo-catalyst@l.g.o
Subject: RE: [gentoo-catalyst] Setting cflags for a single package in spec file
Date: Tue, 18 Oct 2011 20:04:11
Message-Id: F47C0C7786BB2640AE1624869EE4FA3205B06E4E@NSIVA-EXCHANGE1.CORPIT.NSI.NET
In Reply to: Re: [gentoo-catalyst] Setting cflags for a single package in spec file by Matt Turner
1 Thanks, that did it!
2
3 # grep confdir catalyst-netboot2.spec
4 portage_confdir: /etc/portage
5
6 # find /etc/portage/env -type f -exec cat {} \; -print
7 CFLAGS="-mtune=core2 -march=core2 -pipe -fomit-frame-pointer"
8 CHOST="x86_64-pc-linux-gnu"
9 CXXFLAGS="${CFLAGS}"
10 /etc/portage/env/net-ftp/tftp-hpa
11
12 My tftp client no longer segs :)
13
14
15 -----Original Message-----
16 From: Matt Turner [mailto:mattst88@g.o]
17 Sent: Tuesday, October 18, 2011 2:58 PM
18 To: gentoo-catalyst@l.g.o
19 Subject: Re: [gentoo-catalyst] Setting cflags for a single package in
20 spec file
21
22 On Tue, Oct 18, 2011 at 2:15 PM, Garrity, Christopher
23 <Christopher.Garrity@××××××××××××××××.com> wrote:
24 >
25 > Is there a way to set cflags for just a single package inside the spec
26 file?
27 > I don't need/want to override cflags for all packages, just one.
28 > net-ftp/tftp-hpa-5.1 is causing my netboot2 target to fail because of
29 > a bug related to -O2 and gcc-4.5.3 :(
30
31 Not in the spec file directly.
32
33 What I would do is set portage_confdir in the spec file, ie
34 portage_confdir: /directory/containing/etc/portage
35
36 And inside your confdir, set CFLAG exceptions as described here:
37 http://www.gentoo-wiki.info/CflagsExceptions
38
39 Let us know if that works for you.
40
41 Matt

Replies