From d46b477e2c9f8e2197d6c3d0ef763524c8eba23b Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Thu, 17 Jun 2021 13:33:27 +0900 Subject: [PATCH] argtable3: Workaroud a clang warning cf. https://github.com/argtable/argtable3/commit/7704006f3cbb556e11da80a5b97469075a32892e --- system/argtable3/Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/system/argtable3/Makefile b/system/argtable3/Makefile index 28a5ac3ac..cf4902133 100644 --- a/system/argtable3/Makefile +++ b/system/argtable3/Makefile @@ -31,6 +31,17 @@ VPATH += :$(ARGTABLE3_SRCDIR) CFLAGS += ${shell $(DEFINE) "$(CC)" ARG_REPLACE_GETOPT=0} CSRCS := $(notdir $(wildcard $(ARGTABLE3_SRCDIR)$(DELIM)*.c)) +# workaround for clang. +# +# argtable3/src/arg_rex.c:100:104: error: unknown attribute 'optimize' ignored [-Werror,-Wunknown-attributes] +# TREX_API TRex* trex_compile(const TRexChar* pattern, const TRexChar** error, int flags) __attribute__((optimize(0))); +# +# the upstream fix: +# https://github.com/argtable/argtable3/commit/7704006f3cbb556e11da80a5b97469075a32892e +ifneq "$(shell $(CC) --version | grep clang)" "" + CFLAGS += -Wno-unknown-attributes +endif + $(ARGTABLE3_TARBALL): $(Q) echo "Downloading argtable3-$(ARGTABLE3_VERSION)" $(Q) echo "$(ARGTABLE3_SRCDIR)"