summaryrefslogtreecommitdiff
path: root/elements/gnu-toolchain/gcc.bst
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2017-11-03 12:46:07 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2017-12-04 16:44:27 +0000
commite230e8172a80cfde96f780af5f6be901b55bfbd0 (patch)
treefc6ef454ca057afa50c3a773520bc123e2bba866 /elements/gnu-toolchain/gcc.bst
parentb07c7e832a3079d22fa1a5ef53d8ccfd75756343 (diff)
downloaddefinitions-e230e8172a80cfde96f780af5f6be901b55bfbd0.tar.gz
gnu-toolchain: Split rule improvementssam/split-rules
This includes many fixes that result in us being able to produce a minimal OS image or initramfs of a reasonable size. I have built an initramfs of 16MB uncompressed with this change: still a bit bigger than necessary, but much better than the comical ~700MB thing complete with kernel source code and C++ compiler that I got before these changes. Note that the gnu-toolchain stack now puts all the toolchain binaries into the 'devel' artifact. The 'runtime' artifact just contains libraries needed to run programs that are built with that toolchain. We should split this up further in future so that C programs don't depend on libstdc++. Special care is taken for GCC and GLIBC to handle the lib/ and lib64/ split that they do on some 64-bit platforms. We also globally put /usr/src into the devel artifact, which is only useful for the linux.bsp element at present but makes sense as a global rule.
Diffstat (limited to 'elements/gnu-toolchain/gcc.bst')
-rw-r--r--elements/gnu-toolchain/gcc.bst38
1 files changed, 38 insertions, 0 deletions
diff --git a/elements/gnu-toolchain/gcc.bst b/elements/gnu-toolchain/gcc.bst
index bf6eca66..37f7a5b6 100644
--- a/elements/gnu-toolchain/gcc.bst
+++ b/elements/gnu-toolchain/gcc.bst
@@ -35,6 +35,9 @@ variables:
--with-fpu=vfpv3-d16
--with-float=hard
+ - arch in ["armv8b64", "armv8l64", "ppc64b", "ppc64l", "x86_64"]:
+ lib: lib64
+
environment:
PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin
@@ -93,3 +96,38 @@ config:
(<):
- sed -i "s/--host=none/--host=armv7a/" o/Makefile
- sed -i "s/--target=none/--target=armv7a/" o/Makefile
+
+public:
+ bst:
+ split-rules:
+ runtime:
+ - |
+ %{prefix}/%{lib}/lib*.so*
+
+ devel:
+ (>):
+ - |
+ %{bindir}/*
+ - |
+ %{prefix}/%{lib}/lib*.a
+ - |
+ %{prefix}/%{lib}/lib*.las
+ - |
+ %{prefix}/lib/gcc
+ - |
+ %{prefix}/lib/gcc/**
+ - |
+ %{libexecdir}/gcc
+ - |
+ %{libexecdir}/gcc/**
+ - |
+ %{prefix}/%{target}
+ - |
+ %{prefix}/%{target}/*
+
+ debug:
+ (>):
+ - |
+ %{datadir}/gcc-*/
+ - |
+ %{datadir}/gcc-*/**