On Mon, Dec 27, 2021 at 09:50:04PM -0500, Kurt Mosiejczuk wrote:
> I find myself adding the following to many ports files nowadays
> 
> .include <bsd.port.arch.mk>
> .if !${PROPERTIES:Mclang}
> CFLAGS +=     -std=gnu99
> .endif
> 
> Rather than continue this, I'd like to propose adding BASE_C99 to bsd.port.mk
> 
> When BASE_C99= Yes, if on a non-base-clang arch, it will add the same to
> CFLAGS, but without including bsd.port.arch.mk by hand.
> 
> Included are patches to add this to bsd.port.mk and a diff for bsd.port.mk(5)
> to include it in the man page.
> 
> Once this is in, I'll sweep the tree for the boilerplate and replace it all
> with this.
> 
> ok?
> 
> --Kurt

What does this imply for clang-based ports ? are they gnu99 by default ?
I'm not okay with the name, which is misleading. There is a C99 standard, 
and there is C99 + gnu extensions.

You'll have to explain why gnu99 and not std99 for starters. And if that's
justified, the name should be something else, and preferably a more generic 
option.

Also, such shennanigans are properly handled within the compiler.port.mk
framework and not directly related to properties: you will always 
include compiler.port.mk, so in the end, you know what the chosen compiler 
is, and whether that option has any sense for it.

Reply via email to