Re: /usr/share/mk/sys.mk for main [so: 15]: .if defined(%POSIX) and CC ?= c89 and CFLAGS ?= -O [still appropriate?]

Warner Losh <[email protected]>
Newsgroups gmane.os.freebsd.devel.standards
Message-ID <CANCZdfpFoCt8rKRk4377JhCyEYtrZM3DHzBDegqCcLOf-SXtQw@mail.gmail.com>
On Thu, Nov 28, 2024, 1:58 PM Mark Millard <[email protected]> wrote:

> With the recent POSIX 2024 activity I'm wondering if sys.mk having:
>
> .if defined(%POSIX)
> CC              ?=      c89
> CFLAGS          ?=      -O
> .else
>
> may be outdated for main [so: 15 as stands] and may have
> been so for some time.
>
>
> https://pubs.opengroup.org/onlinepubs/9799919799/ (Issue 8)
> reports a base document set including:
>
> ISO/IEC 9899:2018, Programming Languages — C (C17)
>
> Also: c17 — compile standard C programs
> (FreeBSD does not have c17 as a command yet.)
>
>
> https://pubs.opengroup.org/onlinepubs/9699919799.orig/ (Issue 7)
> reports a base document set including:
>
> ISO/IEC 9899:1999, Programming Languages - C
> ISO/IEC 9899:1999/Cor.1:2001(E)
> ISO/IEC 9899:1999/Cor.2:2004(E)
> ISO/IEC 9899:1999/Cor.3
>
> also: c99 - compile standard C programs
>
> (FreeBSD has c99 .)
>

What does the section on make specify? I suspect that issue 7 says c99
here. We are no where close to adding all or even most of the issue 8
features, though.

Warner

===
> Mark Millard
> marklmi at yahoo.com
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.