On 04/28/2017 10:10 PM, Ian Zimmerman wrote: > I'm trying to create an ebuild of a crufty old program that needs > -fgnu89-inline in compiler flags to have any chance of building. > > What's the way to do that in an ebuild? I could have something like > > src_configure() { > econf $(use_enable nls) CFLAGS=-fgnu89-inline > } > > but then, will this not _override_ (rather than add to, as desired) the > CFLAGS from make.conf? >
If you want a particular flag to be added to CFLAGS/CXXFLAGS within an ebuild, you can inherit flag-o-matic, then call "append-flags -fgnu89-inline" in src_configure before the econf line. If you explicitly only want to set CFLAGS (and not CXXFLAGS), then call "append-cflags" (there is also a append-cppflags, append-cxxflags, append-ldflags, append-fflags). -- Jonathan Callen
signature.asc
Description: OpenPGP digital signature