]> xenbits.xensource.com Git - unikraft/libs/newlib.git/commitdiff
Makefile.uk: -Wno-char-subscripts as global flag RELEASE-0.4
authorSimon Kuenzer <simon.kuenzer@neclab.eu>
Mon, 17 Feb 2020 19:06:24 +0000 (20:06 +0100)
committerSimon Kuenzer <simon.kuenzer@neclab.eu>
Mon, 17 Feb 2020 19:34:21 +0000 (20:34 +0100)
Exposes the GCC suppress flag `-Wno-char-subscripts` globally. The
header <ctype.h> is causing the warning to appear when the
macros islower, isupper, tolower, toupper are used.

Signed-off-by: Simon Kuenzer <simon.kuenzer@neclab.eu>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
Makefile.uk

index 66c3b88cdd4aeb5e6116735b12e8692644ec2d4e..b59c4284dd8a85b94fcc5e50067ee5100348f031 100644 (file)
@@ -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
 ################################################################################