4cbf733691
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 <romain.naour@gmail.com> Cc: Max Filippov <jcmvbkbc@gmail.com> [yann.morin.1998@free.fr: - always require an overlay for custom configurations, not just for little endian ones ] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
42 lines
1.7 KiB
Plaintext
42 lines
1.7 KiB
Plaintext
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.
|
|
#
|
|
# ARCH_XTENSA_OVERLAY_FILE is the path to the overlay tarball; empty if not
|
|
# using any overlay
|
|
#
|
|
# Example:
|
|
# ifneq ($(ARCH_XTENSA_OVERLAY_FILE),)
|
|
# tar xf $(ARCH_XTENSA_OVERLAY_FILE) -C $(@D) --strip-components=1 gcc
|
|
# endif
|
|
################################################################################
|
|
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))
|
|
# Do not check that file, we can't know its hash
|
|
BR_NO_CHECK_HASH_FOR += $(notdir $(ARCH_XTENSA_OVERLAY_URL))
|
|
else
|
|
ARCH_XTENSA_OVERLAY_FILE = $(BR_ARCH_XTENSA_OVERLAY_FILE)
|
|
endif
|
|
|
|
################################################################################
|
|
# arch-xtensa-overlay-extract -- extract an extensa overlay
|
|
#
|
|
# argument 1 is the path in which to extract
|
|
# argument 2 is the component to extract, one of: gcc, binutils, gdb, linux,
|
|
# u-boot
|
|
#
|
|
# Example:
|
|
# $(call arch-xtensa-overlay-extract,/path/to/overlay.tar,$(@D),gcc)
|
|
################################################################################
|
|
define arch-xtensa-overlay-extract
|
|
$(call suitable-extractor,$(ARCH_XTENSA_OVERLAY_FILE)) \
|
|
$(ARCH_XTENSA_OVERLAY_FILE) | \
|
|
$(TAR) --strip-components=1 -C $(1) $(TAR_OPTIONS) - $(2)
|
|
endef
|