From 4cbf7336914f25478aea943456ba7dc3c892c21a Mon Sep 17 00:00:00 2001 From: Romain Naour Date: Sun, 4 Sep 2022 22:04:09 +0200 Subject: [PATCH] arch/xtensa: custom configuration requires an overlay Using a custom Xtensa configuration requires an overlay that provides that configuration; not providing an overlay is like using the default configuration, BR2_xtensa_fsf, so there would be no point in that case in requesting a custom configuraiton. Make providing an overlay mandatory for custom configurations. Fixes: http://autobuild.buildroot.org/results/f0b/f0ba47d2534aeb3cc2921124aa639ae3aa072b9b xtensa-buildroot-linux-uclibc/bin/ld: ldso/ldso/ld-uClibc_so.a(ldso.oS): compiled for a big endian system and target is little endian [1] https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=include/xtensa-config.h;hb=2ee5e4300186a92ad73f1a1a64cb918dc76c8d67#l28 Signed-off-by: Romain Naour Cc: Max Filippov [yann.morin.1998@free.fr: - always require an overlay for custom configurations, not just for little endian ones ] Signed-off-by: Yann E. MORIN --- arch/arch.mk.xtensa | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arch.mk.xtensa b/arch/arch.mk.xtensa index fd410f6bfa..7b6c59cecd 100644 --- a/arch/arch.mk.xtensa +++ b/arch/arch.mk.xtensa @@ -1,3 +1,9 @@ +BR_ARCH_XTENSA_OVERLAY_FILE = $(call qstrip,$(BR2_XTENSA_OVERLAY_FILE)) + +ifeq ($(BR_BUILDING)$(BR2_XTENSA_CUSTOM):$(BR_ARCH_XTENSA_OVERLAY_FILE),yy:) +$(error No xtensa overlay file provided. Check your BR2_XTENSA_OVERLAY_FILE setting) +endif + ################################################################################ # This variable can be used by packages that need to extract the overlay. # @@ -9,7 +15,6 @@ # tar xf $(ARCH_XTENSA_OVERLAY_FILE) -C $(@D) --strip-components=1 gcc # endif ################################################################################ -BR_ARCH_XTENSA_OVERLAY_FILE = $(call qstrip,$(BR2_XTENSA_OVERLAY_FILE)) ifneq ($(filter http://% https://% ftp://% scp://%,$(BR_ARCH_XTENSA_OVERLAY_FILE)),) ARCH_XTENSA_OVERLAY_URL = $(BR_ARCH_XTENSA_OVERLAY_FILE) ARCH_XTENSA_OVERLAY_FILE = $($(PKG)_DL_DIR)/$(notdir $(BR_ARCH_XTENSA_OVERLAY_FILE))