tech-pkg archive

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

C99 (was: Re: CVS commit: pkgsrc)



On Tue, Mar 04, 2025 at 09:37:40AM +0000, Nia Alarie wrote:
 > Log Message:
 > *: Assume that the user has a C99-capable compiler.
 > 
 > A compiler that supports -std=c99 is required for
 > bootstrap, so it doesn't make sense to specify a c99
 > compiler everywhere in package makefiles.
 > 
 > At any rate, I would bet my entire life's savings that
 > this is a small fraction of the total number of packages
 > requiring c99.
 > 
 > Note that compilers that default to c89 but support c99
 > are still supported...

Was this change discussed somewhere? If not, can you revert it until
we do?

It seems that USE_CC_FEATURES is only involved in choosing a compiler
version, not adding -std=c99 or -std=gnu99 to CFLAGS, so the change is
correct as far as it goes. (There is no compiler we are likely to care
about that doesn't support C99, and nobody in their right mind is
going to write a new one.)

However, there's at least two points I don't follow:

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?

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?

And I guess the other thing is, I know you've been prodding the
compiler stuff for a while and you probably know more about it than
anyone else at this point... but it's also long been deeply accursed.
For things like that it's good to propose changes explicitly where it
can be found in the archives later, even if the proposals don't end up
attracting any discussion.

(Plus we do have norms about proposing significant changes before
committing them, and we're currently in a state where people have
been leaving because they feel those norms are coming unstuck. So
it's better if everyone can be extra careful for a while.)


...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.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index