summaryrefslogtreecommitdiffstats
path: root/arch/arch.mk.xtensa
blob: ecb9c1086a703dbe252256662dc38c98577fb026 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
################################################################################
# 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
################################################################################
ARCH_XTENSA_OVERLAY_FILE = $(call qstrip,$(BR2_XTENSA_OVERLAY_FILE))

################################################################################
# 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
#
# 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
OpenPOWER on IntegriCloud