package/gcc: use generic extract commands
authorYann E. MORIN <yann.morin.1998@free.fr>
Sat, 24 Oct 2015 12:48:55 +0000 (14:48 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 3 Nov 2015 21:22:51 +0000 (22:22 +0100)
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Reviewed-by: Romain Naour <romain.naour@openwide.fr>
Reviewed-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Tested-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/gcc/gcc-final/gcc-final.mk
package/gcc/gcc-initial/gcc-initial.mk
package/gcc/gcc.mk

index 5a0f5b5b8e2491076c9f7dc5d3584881329f0f6d..8ac296877b7efa3e296d97a549b99ce9969b0e99 100644 (file)
@@ -12,7 +12,8 @@ HOST_GCC_FINAL_DEPENDENCIES = \
        $(HOST_GCC_COMMON_DEPENDENCIES) \
        $(BR_LIBC)
 
-HOST_GCC_FINAL_EXTRACT_CMDS = $(HOST_GCC_EXTRACT_CMDS)
+HOST_GCC_FINAL_TAR_EXCLUDES = $(HOST_GCC_TAR_EXCLUDES)
+HOST_GCC_FINAL_POST_EXTRACT_HOOKS += HOST_GCC_FAKE_TESTSUITE
 
 ifneq ($(call qstrip, $(BR2_XTENSA_CORE_NAME)),)
 HOST_GCC_FINAL_POST_EXTRACT_HOOKS += HOST_GCC_XTENSA_OVERLAY_EXTRACT
index c0b5eaff5e90f8de26eb92997cd6b72c436a04c4..3ab47b9da00639d2716d0f40ea86ca239d4fbd44 100644 (file)
@@ -10,7 +10,8 @@ GCC_INITIAL_SOURCE = $(GCC_SOURCE)
 
 HOST_GCC_INITIAL_DEPENDENCIES = $(HOST_GCC_COMMON_DEPENDENCIES)
 
-HOST_GCC_INITIAL_EXTRACT_CMDS = $(HOST_GCC_EXTRACT_CMDS)
+HOST_GCC_INITIAL_TAR_EXCLUDES = $(HOST_GCC_TAR_EXCLUDES)
+HOST_GCC_INITIAL_POST_EXTRACT_HOOKS += HOST_GCC_FAKE_TESTSUITE
 
 ifneq ($(call qstrip, $(BR2_XTENSA_CORE_NAME)),)
 HOST_GCC_INITIAL_POST_EXTRACT_HOOKS += HOST_GCC_XTENSA_OVERLAY_EXTRACT
index d6213ccf80a945c7102df8dfebee3240043075db..28eb75e0a88f6ca4634edbecf55e9f3f8c8187c9 100644 (file)
@@ -48,18 +48,11 @@ define HOST_GCC_APPLY_PATCHES
        $(HOST_GCC_APPLY_POWERPC_PATCH)
 endef
 
-#
-# Custom extract command to save disk space
-#
+HOST_GCC_TAR_EXCLUDES = \
+       libjava/* libgo/* \
+       gcc/testsuite/* libstdc++-v3/testsuite/*
 
-define HOST_GCC_EXTRACT_CMDS
-       $(call suitable-extractor,$(GCC_SOURCE)) $(DL_DIR)/$(GCC_SOURCE) | \
-               $(TAR) --strip-components=1 -C $(@D) \
-               --exclude='libjava/*' \
-               --exclude='libgo/*' \
-               --exclude='gcc/testsuite/*' \
-               --exclude='libstdc++-v3/testsuite/*' \
-               $(TAR_OPTIONS) -
+define HOST_GCC_FAKE_TESTSUITE
        mkdir -p $(@D)/libstdc++-v3/testsuite/
        echo "all:" > $(@D)/libstdc++-v3/testsuite/Makefile.in
        echo "install:" >> $(@D)/libstdc++-v3/testsuite/Makefile.in