Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] ebuild: package specific CFLAGS
Date: Sat, 29 Apr 2017 06:12:57
Message-Id: 20170429071230.0cfed7c0@digimed.co.uk
In Reply to: [gentoo-user] ebuild: package specific CFLAGS by Ian Zimmerman
1 On Fri, 28 Apr 2017 19:10:42 -0700, Ian Zimmerman wrote:
2
3 > I'm trying to create an ebuild of a crufty old program that needs
4 > -fgnu89-inline in compiler flags to have any chance of building.
5 >
6 > What's the way to do that in an ebuild? I could have something like
7 >
8 > src_configure() {
9 > econf $(use_enable nls) CFLAGS=-fgnu89-inline
10 > }
11 >
12 > but then, will this not _override_ (rather than add to, as desired) the
13 > CFLAGS from make.conf?
14
15 Use the flag-o-matic eclass, specifically the append-cflags function.
16
17
18 --
19 Neil Bothwick
20
21 Half of being smart is knowing what you're dumb at.