Re: v2.35.0 DEVELOPER=1 regression (was: [PATCH] config.mak.dev: specify -std=gnu99 for gcc/clang)
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- Jan 14, 2022, 01:38 UTC
- Message-ID
- <YeDUA6NhHuCUkqXf@camp.crustytoothpaste.net>
- In-Reply-To
- <220113.86tue7vr6d.gmgdl@evledraar.gmail.com>
On 2022-01-13 at 10:45:49, Ævar Arnfjörð Bjarmason wrote:
Show 20 quoted lines
> [I'm aware that Jeff probably won't read this in his sabbatical, just > replying to the relevant thread] > > Something neither of us considered at the time, but which is pretty > obvious in retrospect, is that this new -std=gnu99 dosen't only apply to > our own code, but any system and library includes that we need. > > Thus e.g. FreeBSD 13.0 which previously was happy to compile under > DEVELOPER=1 will now die because its core libraries use C11-specific > code: > > archive.c:337:35: error: '_Generic' is a C11 extension [-Werror,-Wc11-extensions] > strbuf_addstr(&path_in_archive, basename(path)); > ^ > /usr/include/libgen.h:61:21: note: expanded from macro 'basename' > #define basename(x) __generic(x, const char *, __old_basename, basename)(x) > ^ > /usr/include/sys/cdefs.h:325:2: note: expanded from macro '__generic' > _Generic(expr, t: yes, default: no) > ^
I think we had this discussion about FreeBSD before and that's why I specifically dropped that option from the main makefile. We can either drop that patch, or we can set it to -std=gnu11 and tell folks setting DEVELOPER to use a system released in the last five years. I think we can be a little stricter with what we require in the case of DEVELOPER than we might be otherwise.
-- brian m. carlson (he/him or they/them) Toronto, Ontario, CA