aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2017-04-11 12:32:30 -0400
committerCatalin Marinas <catalin.marinas@arm.com>2017-04-12 04:48:03 -0400
commitd91750f12c79101028cb93dc35eed6989fae4405 (patch)
tree1fa3b6da12b32db73fc304f1ac82e126ce9d69a7
parenta5a3237e508e51fb63373ceafa0b45651cacbc55 (diff)
arm64: Silence spurious kbuild warning on menuconfig
Since bbb56c27228d ("arm64: Add detection code for broken .inst support in binutils"), running any make target that doesn't involve the cross compiler results in a spurious warning: $ make ARCH=arm64 menuconfig arch/arm64/Makefile:43: Detected assembler with broken .inst; disassembly will be unreliable while $ make ARCH=arm64 CROSS_COMPILE=aarch64-arm-linux- menuconfig is silent (assuming your compiler is not affected). That's because the code that tests for the workaround is always run, irrespective of the current configuration being available or not. An easy fix is to make the detection conditional on CONFIG_ARM64 being defined, which is only the case when actually building something. Fixes: bbb56c27228d ("arm64: Add detection code for broken .inst support in binutils") Reviewed-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
-rw-r--r--arch/arm64/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index b9a4a934ca05..7dedf2d8494e 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -37,10 +37,12 @@ $(warning LSE atomics not supported by binutils)
37 endif 37 endif
38endif 38endif
39 39
40ifeq ($(CONFIG_ARM64), y)
40brokengasinst := $(call as-instr,1:\n.inst 0\n.rept . - 1b\n\nnop\n.endr\n,,-DCONFIG_BROKEN_GAS_INST=1) 41brokengasinst := $(call as-instr,1:\n.inst 0\n.rept . - 1b\n\nnop\n.endr\n,,-DCONFIG_BROKEN_GAS_INST=1)
41 42
42ifneq ($(brokengasinst),) 43 ifneq ($(brokengasinst),)
43$(warning Detected assembler with broken .inst; disassembly will be unreliable) 44$(warning Detected assembler with broken .inst; disassembly will be unreliable)
45 endif
44endif 46endif
45 47
46KBUILD_CFLAGS += -mgeneral-regs-only $(lseinstr) $(brokengasinst) 48KBUILD_CFLAGS += -mgeneral-regs-only $(lseinstr) $(brokengasinst)