diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2023-04-14 19:14:21 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-04-17 08:54:35 +0200 |
commit | 14b296d2a7e6088c8be9095a2d3a14ce0b4b4172 (patch) | |
tree | d1cd94a57e397831833ae1ad5eee37538a2f654d /arch | |
parent | 49d8227c6581d497fa3809c385abb1a791d4ec28 (diff) | |
download | barebox-14b296d2a7e6088c8be9095a2d3a14ce0b4b4172.tar.gz |
arm: error out if __LINUX_ARM_ARCH__ is undefined
With recent multiarch (really, multiplatform) rework, oldconfig will
reask users what platforms they want to build for. The default is N,
so holding return (or an olddefconfig) will just disable all boards and
with it all CPUs leading to a cryptic torrent of:
arch/arm/include/asm/swab.h:31:28: warning: "__LINUX_ARM_ARCH__" is not defined, evaluates to 0 [-Wundef]
31 | #if defined(__KERNEL__) && __LINUX_ARM_ARCH__ >= 6
| ^~~~~~~~~~~~~~~~~~
Make user experience a bit better by printing an error message instead.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230414171421.1745965-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/include/asm/arch-check.h | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 9bd7db6ba9..a506f1e3a3 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -42,6 +42,7 @@ endif # Note that GCC does not numerically define an architecture version # macro, but instead defines a whole series of macros which makes # testing for a specific architecture or later rather impossible. +arch-y := -include asm/arch-check.h arch-$(CONFIG_CPU_64v8) := -D__LINUX_ARM_ARCH__=8 $(call cc-option,-march=armv8-a) arch-$(CONFIG_CPU_32v7) :=-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7-a,-march=armv5t -Wa$(comma)-march=armv7-a) arch-$(CONFIG_CPU_32v6) :=-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6) diff --git a/arch/arm/include/asm/arch-check.h b/arch/arm/include/asm/arch-check.h new file mode 100644 index 0000000000..2cf1b624a4 --- /dev/null +++ b/arch/arm/include/asm/arch-check.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __ARM_ASM_ARCH_CHECK_H__ +#define __ARM_ASM_ARCH_CHECK_H__ + +#ifndef __LINUX_ARM_ARCH__ +#error No boards/CPUs selected in Kconfig +#endif + +#endif |