Reduce third-party kernel build warnings

This commit is contained in:
Christian Helmuth 2019-06-07 13:56:08 +02:00
parent 62232f9a35
commit 4d34f9f9f4
4 changed files with 16 additions and 6 deletions

View File

@ -20,8 +20,8 @@ $(FIASCO_BUILD_DIR):
$(FIASCO): $(FIASCO_BUILD_DIR)
$(VERBOSE_MK) set -o pipefail; \
MAKEFLAGS= CFLAGS="-std=gnu89" \
CXXFLAGS="-std=gnu++98 -fno-delete-null-pointer-checks" \
MAKEFLAGS= CFLAGS="-std=gnu89 $(CWARN)" \
CXXFLAGS="-std=gnu++98 -fno-delete-null-pointer-checks $(CXXWARN)" \
$(MAKE) SYSTEM_TARGET="$(CROSS_DEV_PREFIX)" \
$(VERBOSE_DIR) -C $(FIASCO_BUILD_DIR) \
$(KERNEL_BUILD_OUTPUT_FILTER)

View File

@ -48,6 +48,14 @@ endif
#
.NOTPARALLEL: $(PKG_TAGS)
WARN = -Wno-attributes -Wno-cast-function-type -Wno-format-truncation \
-Wno-frame-address -Wno-ignored-qualifiers -Wno-implicit-fallthrough \
-Wno-maybe-uninitialized -Wno-misleading-indentation \
-Wno-nonnull-compare -Wno-nonnull-compare -Wno-restrict \
-Wno-tautological-compare -Wno-unused-but-set-variable -Wno-unused-result
CWARN = $(WARN) -Wno-int-conversion -Wno-pointer-sign -Wno-pointer-to-int-cast
CXXWARN = $(WARN) -Wno-bool-compare -Wno-c++11-compat -Wno-class-memaccess
#
# The '_GNU_SOURCE' definition is needed to convince uClibc to define the
# 'off64_t' type, which is used by bootstrap.
@ -55,8 +63,8 @@ endif
%.tag:
$(VERBOSE_MK) set -o pipefail; \
MAKEFLAGS= CPPFLAGS="$(CC_MARCH)" \
CFLAGS="$(CC_MARCH) -std=gnu89" \
CXXFLAGS="$(CC_MARCH) -D_GNU_SOURCE -std=gnu++98" \
CFLAGS="$(CC_MARCH) -std=gnu89 $(CWARN)" \
CXXFLAGS="$(CC_MARCH) -D_GNU_SOURCE -std=gnu++98 $(CXXWARN)" \
ASFLAGS="$(CC_MARCH)" LDFLAGS="$(LD_MARCH)" \
$(MAKE) $(VERBOSE_DIR) O=$(L4_BUILD_DIR) $(L4_VERBOSE) \
-C $(L4_PKG_DIR)/$* \

View File

@ -44,7 +44,8 @@ CC_OPT += -DCONFIG_MAX_THREAD_BITS=10
CC_OPT_PIC =
CC_CXX_WARN := -Wall -Wno-unused-but-set-variable -Wno-uninitialized
CC_CXX_WARN := -Wall -Wno-unused-but-set-variable -Wno-uninitialized \
-Wno-register -Wno-unused-variable -Wno-tautological-compare
#
# Enforce building the kernel with -O3. Otherwise, the kernel build would fail

View File

@ -4,7 +4,8 @@ PISTACHIO_USER_SRC := $(PISTACHIO_CONTRIB_DIR)/user/lib/l4
LD_PREFIX := "-Wl,"
CC_WARN += -Wno-array-bounds -Wno-unused-but-set-variable \
-Wno-parentheses -Wno-format
-Wno-parentheses -Wno-format -Wno-builtin-declaration-mismatch \
-Wno-unused-function -Wno-pointer-compare
user_build.tag:
LIBGCCFLAGS="$(CC_MARCH)" \