The GCC build failed with "error: ignoring '#pragma clang diagnostic'" building libcbor.
Details
Details
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
I used this patch locally since we have a builtin for this warning in bsd.sys.mk:
commit e4c30eacb0a0c8116102e215527ac63e0f0e3b2d (nvmf_gcc) Author: John Baldwin <jhb@FreeBSD.org> Date: Mon May 6 13:06:21 2024 -0700 libcbor: Ignore errors for unknown #pragmas libcbor embeds clang-specific #pragmas that GCC then warns about. diff --git a/lib/libcbor/Makefile b/lib/libcbor/Makefile index 5ae2c34a5963..c9d86c0b95ad 100644 --- a/lib/libcbor/Makefile +++ b/lib/libcbor/Makefile @@ -30,6 +30,7 @@ SRCS+= cbor/internal/unicode.c CFLAGS+= -I${DIST}/src -I${.CURDIR} WARNS?= 2 +IGNORE_PRAGMA= MAN= .include <bsd.lib.mk>
Comment Actions
libcbor is contrib'd code, right? Otherwise I'd just put an #ifdef __clang__ around it :)
Comment Actions
It is indeed. I don't have a problem with a trivial change in the contrib src, but a Makefile hack seems easiest.
Comment Actions
Yeah, if it wasn't contrib'd code I'd hack it directly as well. On IRC yesterday there was some discussion about just removing it as unnecessary, and upstream should probably clean this up, but I think a Makefile hack is cleanest for us. I can push my version with Ed's stamp.