Gentoo Archives: gentoo-user

From: Kai Krakow <hurikhan77@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: ebuild: package specific CFLAGS
Date: Sun, 30 Apr 2017 06:35:21
Message-Id: 20170430083324.6d2f8944@jupiter.sol.kaishome.de
In Reply to: Re: [gentoo-user] ebuild: package specific CFLAGS by John Covici
1 Am Sat, 29 Apr 2017 00:14:10 -0400
2 schrieb John Covici <covici@××××××××××.com>:
3
4 > On Fri, 28 Apr 2017 22:10:42 -0400,
5 > Ian Zimmerman wrote:
6 > >
7 > > I'm trying to create an ebuild of a crufty old program that needs
8 > > -fgnu89-inline in compiler flags to have any chance of building.
9 > >
10 > > What's the way to do that in an ebuild? I could have something like
11 > >
12 > > src_configure() {
13 > > econf $(use_enable nls) CFLAGS=-fgnu89-inline
14 > > }
15 > >
16 > > but then, will this not _override_ (rather than add to, as desired)
17 > > the CFLAGS from make.conf?
18 >
19 > Maybe you'd be better off setting an environment variable outside the
20 > ebuild in a shell script in /etc/portage/env where you can put the
21 > whole CCFLAGS .
22
23 You should also say that you need to reference that
24 in /etc/portage/packages.env, similar to how packages.use works. Just
25 that instead of use flags, you give filenames from /etc/portage/env.
26
27 --
28 Regards,
29 Kai
30
31 Replies to list-only preferred.