Skip to content

Commit a072e74

Browse files
Matthias Kaehlckepundiramit
authored andcommitted
CHROMIUM: arm64: Disable asm-operand-width warning for clang
clang raises 'asm-operand-widths' warnings in inline assembly code when the size of an operand is < 64 bits and the operand width is unspecified. Most warnings are raised in macros, i.e. the datatype of the operand may vary. Most of these warnings are fixed in upstream, however we consider it isn't worth the effort/risk to backport all the necessary changes. On future CrOS kernels >= v4.13 the warning should be re-enabled. Change-Id: Ia331bc83d44b8c1499450aefb45c576cd29ebf55 Signed-off-by: Matthias Kaehlcke <mka@chromium.org> Signed-off-by: Greg Hackmann <ghackmann@google.com>
1 parent 8d6114a commit a072e74

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

arch/arm64/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ else
6868
TEXT_OFFSET := 0x00080000
6969
endif
7070

71+
ifeq ($(cc-name),clang)
72+
KBUILD_CFLAGS += $(call cc-disable-warning, asm-operand-widths)
73+
endif
74+
7175
# KASAN_SHADOW_OFFSET = VA_START + (1 << (VA_BITS - 3)) - (1 << 61)
7276
# in 32-bit arithmetic
7377
KASAN_SHADOW_OFFSET := $(shell printf "0x%08x00000000\n" $$(( \

0 commit comments

Comments
 (0)