Preventing the build from adding options like '-pipe' et al

Valentin V. Bartenev vbart at nginx.com
Mon Oct 28 16:40:02 UTC 2019


On Monday 28 October 2019 17:18:19 Ralph Seichter wrote:
> Hello,
> 
> I maintain the Unit ebuild for Gentoo Linux, and I am currently trying
> to figure out how to prevent the configure/build process from extending
> compiler or linker flags. I use
> 
>   ./configure --cc-opt="${CFLAGS}" --ld-opt="${LDFLAGS}" [...]
> 
> to pass Gentoo's user-defined options along, but find that flags like
> '-pipe' or '-g' are being added without my say-so.
> 
> Gentoo QA is quite rigorous about not allowing builds to use options not
> provided by the user, so I am looking for the best way to enforce this
> restriction. Can any of you provide me with pointers? Thanks.
[..]

Hi Ralph,

Could you provide a link to the policy with this requirement?

I'm curious how it's solved with other ebuilds... e.g. nginx building
scripts work absolutely the same way, but I don't see anything special in
nginx ebuild to prevent additional flags.  It's quite normal for a build
system to add some additional flags, that developers see reasonable for
their software.

  wbr, Valentin V. Bartenev



More information about the unit mailing list