summaryrefslogtreecommitdiffstats
path: root/package/gcc/gcc.mk
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2013-06-30 21:29:04 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2013-07-03 23:37:23 +0200
commit00e9b1e4f78633d5667b187332f36972a94b9f8b (patch)
treed915ffc889c44c31e46a3120834e947ee47f75eb /package/gcc/gcc.mk
parente236fe481e5f8c4cd4984f39dc37dbf19c8d8eda (diff)
downloadbuildroot-novena-00e9b1e4f78633d5667b187332f36972a94b9f8b.tar.gz
buildroot-novena-00e9b1e4f78633d5667b187332f36972a94b9f8b.zip
gcc-initial, gcc-intermediate, gcc-final: optimize extraction
Several sub-directories of the gcc code base are in fact not needed for the Buildroot build: libjava/, libgo/ and gcc/testsuite/ being the biggest ones. Avoiding their extraction saves quite a bit of disk space, and compensates a bit the fact that we now extract three times the gcc source code. This requires changing the 100-uclibc-conf.patch to no longer patch files from the libjava/ directory, since this directory is no longer extracted. [Peter: add comment about why this is done] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/gcc/gcc.mk')
-rw-r--r--package/gcc/gcc.mk17
1 files changed, 17 insertions, 0 deletions
diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index 3b61ffd45..790762da7 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -43,6 +43,23 @@ define HOST_GCC_APPLY_PATCHES
endef
#
+# Custom extract command to save disk space
+#
+
+define HOST_GCC_EXTRACT_CMDS
+ $(BZCAT) $(DL_DIR)/$(GCC_SOURCE) | \
+ $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D) \
+ --exclude='libjava/*' \
+ --exclude='libgo/*' \
+ --exclude='gcc/testsuite/*' \
+ --exclude='libstdc++-v3/testsuite/*' \
+ $(TAR_OPTIONS) -
+ mkdir -p $(@D)/libstdc++-v3/testsuite/
+ echo "all:" > $(@D)/libstdc++-v3/testsuite/Makefile.in
+ echo "install:" >> $(@D)/libstdc++-v3/testsuite/Makefile.in
+endef
+
+#
# Create 'build' directory and configure symlink
#