From d85382e41efbe3f3f9012a08851f93bb4919de65 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Wed, 1 Feb 2017 20:37:29 +0900 Subject: Manual conversion of Baserock's build-essential stratum This huge commit is a manual conversion, notes on what was needed: o project.conf defines the arch specific stuff which was previously hardcoded into YBD, so the stage1 target and target etc are all defined by the build-essential project.conf o Direct and easy changes for git source representation o Added stage1.bst & stage2.bst "stacks", everything built in stage2 build-depends on stage1.bst, and the final build-essential products build-depend on stage2.bst (note build-depend means to depend _only_ for building, not propagated forward). o Instead of using host tools we build on the GNOME flatpak sdk/platform bundles o Some build-essential morph files use $(dirname $(pwd)) for a sysroot, which is weird, it means the morph files rely on building at one directory below the slash sysroot - in buildstream we build in /buildstream/build which is two - had to replace these with $(dirname $(dirname $(pwd))) instead o Remove the devices sections from the fhs-dirs elements, not allowed to create static device nodes in buildstream. --- build-essential/stage2-binutils.bst | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 build-essential/stage2-binutils.bst (limited to 'build-essential/stage2-binutils.bst') diff --git a/build-essential/stage2-binutils.bst b/build-essential/stage2-binutils.bst new file mode 100644 index 00000000..a515d5dd --- /dev/null +++ b/build-essential/stage2-binutils.bst @@ -0,0 +1,38 @@ +kind: autotools + +sources: +- kind: git + url: upstream:binutils-tarball + track: binutils-2.25 + ref: 5500a97a2ad1735db5b35bc51cfb825c1f4c38df + +depends: +- filename: build-essential/stage1.bst + type: build +- build-essential/stage2-linux-api-headers.bst +- build-essential/stage2-glibc.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + configure-commands: + - | + export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + export CXX="%{target-stage1}-g++ --sysroot=$STAGE2_SYSROOT" + # binutils has its own embedded libtool, which is old and strips out + # `--sysroot`. Work around by modifying the compiler command to + # include the sysroot flag + export CC="%{target-stage1}-gcc --sysroot=$STAGE2_SYSROOT" + ./configure --prefix="%{prefix}" --disable-nls --disable-werror \ + --build=$(sh config.guess) \ + --host=%{target-stage1} \ + --target=%{target-stage1} + + build-commands: + - | + export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + make -- cgit v1.2.1