From: Simon Kuenzer Date: Mon, 17 Feb 2020 19:06:24 +0000 (+0100) Subject: Makefile.uk: -Wno-char-subscripts as global flag X-Git-Tag: RELEASE-0.4^0 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=ddc1a4308f9ec8ce742d80e6203a4e76ae5bf802;p=unikraft%2Flibs%2Fnewlib.git Makefile.uk: -Wno-char-subscripts as global flag Exposes the GCC suppress flag `-Wno-char-subscripts` globally. The header is causing the warning to appear when the macros islower, isupper, tolower, toupper are used. Signed-off-by: Simon Kuenzer Reviewed-by: Felipe Huici --- diff --git a/Makefile.uk b/Makefile.uk index 66c3b88..b59c428 100644 --- a/Makefile.uk +++ b/Makefile.uk @@ -94,13 +94,13 @@ LIBNEWLIB_GLOBAL_FLAGS-y += -D_LDBL_EQ_DBL LIBNEWLIB_GLOBAL_FLAGS-y += -D_HAVE_LONG_DOUBLE endif -CFLAGS-y += $(LIBNEWLIB_GLOBAL_FLAGS-y) -CXXFLAGS-y += $(LIBNEWLIB_GLOBAL_FLAGS-y) +CFLAGS-$(CONFIG_LIBNEWLIBC) += $(LIBNEWLIB_GLOBAL_FLAGS-y) +CXXFLAGS-$(CONFIG_LIBNEWLIBC) += $(LIBNEWLIB_GLOBAL_FLAGS-y) # Suppress some warnings to make the build process look neater LIBNEWLIB_SUPPRESS_FLAGS-y += \ -Wno-unused-parameter -Wno-unused-variable -Wno-nonnull \ --Wno-unused-but-set-variable -Wno-unused-label -Wno-char-subscripts \ +-Wno-unused-but-set-variable -Wno-unused-label \ -Wno-unused-function -Wno-missing-field-initializers -Wno-uninitialized \ -Wno-array-bounds -Wno-maybe-uninitialized -Wno-pointer-sign -Wno-unused-value \ -Wno-unused-macros -Wno-parentheses -Wno-implicit-function-declaration \ @@ -121,6 +121,10 @@ LIBNEWLIBGLUE_SUPPRESS_FLAGS-y += -Wno-unused-parameter LIBNEWLIBGLUE_CFLAGS-y += $(LIBNEWLIBGLUE_SUPPRESS_FLAGS-y) LIBNEWLIBGLUE_CXXFLAGS-y += $(LIBNEWLIBGLUE_SUPPRESS_FLAGS-y) +LIBNEWLIB_GLOBAL_SUPPRESS_FLAGS-y += -Wno-char-subscripts +CFLAGS-$(CONFIG_LIBNEWLIBC) += $(LIBNEWLIB_GLOBAL_SUPPRESS_FLAGS-y) +CXXFLAGS-$(CONFIG_LIBNEWLIBC) += $(LIBNEWLIB_GLOBAL_SUPPRESS_FLAGS-y) + ################################################################################ # OS dependencies code - Glue between Unicore and newlib ################################################################################