arm64: Silence gcc warnings about arch ABI drift
authorDave Martin <Dave.Martin@arm.com>
Thu, 6 Jun 2019 10:33:43 +0000 (11:33 +0100)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 1 Dec 2020 04:47:41 +0000 (13:47 +0900)
Since GCC 9, the compiler warns about evolution of the
platform-specific ABI, in particular relating for the marshaling of
certain structures involving bitfields.

The kernel is a standalone binary, and of course nobody would be
so stupid as to expose structs containing bitfields as function
arguments in ABI.  (Passing a pointer to such a struct, however
inadvisable, should be unaffected by this change.  perf and various
drivers rely on that.)

So these warnings do more harm than good: turn them off.

We may miss warnings about future ABI drift, but that's too bad.
Future ABI breaks of this class will have to be debugged and fixed
the traditional way unless the compiler evolves finer-grained
diagnostics.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
[sw0312.kim: backport mainline commit ebcc5928c5d9 for gcc 9 build]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
arch/arm64/Makefile

index 2cefbf3bae3ca28a455ad88753892dcd2ff6b6c1..95fe780e13ca1df60cbb70914b050e772323fa85 100644 (file)
@@ -61,6 +61,7 @@ KBUILD_CFLAGS += $(lseinstr)
 KBUILD_CFLAGS  += -fno-asynchronous-unwind-tables
 KBUILD_CFLAGS  += $(call cc-option, -mpc-relative-literal-loads)
 KBUILD_CFLAGS  += -fno-pic
+KBUILD_CFLAGS  += -Wno-psabi
 KBUILD_AFLAGS  += $(lseinstr)
 
 ifeq ($(CONFIG_CPU_BIG_ENDIAN), y)