tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: C99 (was: Re: CVS commit: pkgsrc)



On Tue, Mar 04, 2025 at 05:22:52PM +0000, David Holland wrote:
> 1. If USE_CC_FEATURES is only for choosing a compiler version, and we
> judge that C99 isn't a meaningful criterion, then shouldn't the case
> for it in gcc.mk be removed as well?

Yes, that's correct.

> 2. In the case of a compiler that supports C99 but defaults to C89,
> what sets -std=c99 (or its equivalent)? I would think that declaring
> C99 would trigger this, but apparently it doesn't. Is that what
> FORCE_C_STD is for? If so, is there some reason we need to have two
> different version declarations?

FORCE_C_STD is a brute force hammer that overrides any
flags the package sets itself. It's for working around bad
build systems, mainly. It can't be used on packages that mix
multiple language versions, etc. So it should only be set
in cases where the build would be broken otherwise.

> ...also, if you have a long-term plan for the compiler stuff, can you
> write it up? If nothing else it would help me and probably a bunch of
> other people understand better.

I'm leaving most of this work to jperkin, but it's unlikely
it'll make it back to the main pkgsrc branch. Likely this
is my last "infrastrucutre" change specific to compilers
for a while - it's just meant to improve maintainability.


Home | Main Index | Thread Index | Old Index