1 |
On 04/28/2017 10:10 PM, Ian Zimmerman wrote: |
2 |
> I'm trying to create an ebuild of a crufty old program that needs |
3 |
> -fgnu89-inline in compiler flags to have any chance of building. |
4 |
> |
5 |
> What's the way to do that in an ebuild? I could have something like |
6 |
> |
7 |
> src_configure() { |
8 |
> econf $(use_enable nls) CFLAGS=-fgnu89-inline |
9 |
> } |
10 |
> |
11 |
> but then, will this not _override_ (rather than add to, as desired) the |
12 |
> CFLAGS from make.conf? |
13 |
> |
14 |
|
15 |
If you want a particular flag to be added to CFLAGS/CXXFLAGS within an |
16 |
ebuild, you can inherit flag-o-matic, then call "append-flags |
17 |
-fgnu89-inline" in src_configure before the econf line. If you |
18 |
explicitly only want to set CFLAGS (and not CXXFLAGS), then call |
19 |
"append-cflags" (there is also a append-cppflags, append-cxxflags, |
20 |
append-ldflags, append-fflags). |
21 |
|
22 |
-- |
23 |
Jonathan Callen |