2121
2222cc32-option = $(call try-run,\
2323 $(CC_COMPAT ) $(1 ) -c -x c /dev/null -o "$$TMP",$(1 ) ,$(2 ) )
24- cc32-disable-warning = $(call try-run,\
25- $(CC_COMPAT ) -W$(strip $(1 ) ) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1 ) ) )
2624
2725# We cannot use the global flags to compile the vDSO files, the main reason
2826# being that the 32-bit compiler may be older than the main (64-bit) compiler
@@ -63,6 +61,7 @@ VDSO_CFLAGS += -DENABLE_COMPAT_VDSO=1
6361# KBUILD_CFLAGS from top-level Makefile
6462VDSO_CFLAGS += -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
6563 -fno-strict-aliasing -fno-common \
64+ $(filter -Werror,$(KBUILD_CPPFLAGS ) ) \
6665 -Werror-implicit-function-declaration \
6766 -Wno-format-security \
6867 -std=gnu11
@@ -74,16 +73,6 @@ VDSO_CFLAGS += $(call cc32-option,-Werror=strict-prototypes)
7473VDSO_CFLAGS += -Werror=date-time
7574VDSO_CFLAGS += $(call cc32-option,-Werror=incompatible-pointer-types)
7675
77- # The 32-bit compiler does not provide 128-bit integers, which are used in
78- # some headers that are indirectly included from the vDSO code.
79- # This hack makes the compiler happy and should trigger a warning/error if
80- # variables of such type are referenced.
81- VDSO_CFLAGS += -D__uint128_t='void*'
82- # Silence some warnings coming from headers that operate on long's
83- # (on GCC 4.8 or older, there is unfortunately no way to silence this warning)
84- VDSO_CFLAGS += $(call cc32-disable-warning,shift-count-overflow)
85- VDSO_CFLAGS += -Wno-int-to-pointer-cast
86-
8776# Compile as THUMB2 or ARM. Unwinding via frame-pointers in THUMB2 is
8877# unreliable.
8978ifeq ($(CONFIG_THUMB2_COMPAT_VDSO ) , y)
0 commit comments