From e230e8172a80cfde96f780af5f6be901b55bfbd0 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Fri, 3 Nov 2017 12:46:07 +0000 Subject: gnu-toolchain: Split rule improvements 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. --- elements/gnu-toolchain/gawk.bst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'elements/gnu-toolchain/gawk.bst') diff --git a/elements/gnu-toolchain/gawk.bst b/elements/gnu-toolchain/gawk.bst index d00bd6d8..d97255eb 100644 --- a/elements/gnu-toolchain/gawk.bst +++ b/elements/gnu-toolchain/gawk.bst @@ -22,3 +22,20 @@ config: strip-commands: - | %{stage3-strip-binaries} + +public: + bst: + split-rules: + runtime: + (=): [] + + devel: + (>): + - | + %{bindir}/* + - | + %{libdir}/gawk/*.so + - | + %{libexecdir}/awk/* + - | + %{datadir}/awk/* -- cgit v1.2.1