diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-02-01 20:37:29 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-02-03 19:48:45 +0900 |
commit | d85382e41efbe3f3f9012a08851f93bb4919de65 (patch) | |
tree | bdcdac1cd8463f6847b2b30a6b643e715144372d /build-essential/stage1-binutils.bst | |
parent | 7d6dc7242598361009ab492db2367e545fc53189 (diff) | |
download | definitions-d85382e41efbe3f3f9012a08851f93bb4919de65.tar.gz |
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.
Diffstat (limited to 'build-essential/stage1-binutils.bst')
-rw-r--r-- | build-essential/stage1-binutils.bst | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/build-essential/stage1-binutils.bst b/build-essential/stage1-binutils.bst new file mode 100644 index 00000000..8c89c7ce --- /dev/null +++ b/build-essential/stage1-binutils.bst @@ -0,0 +1,38 @@ +kind: autotools + +sources: +- kind: git + url: upstream:binutils-tarball + track: binutils-2.25 + ref: 5500a97a2ad1735db5b35bc51cfb825c1f4c38df + +depends: +- build-essential/gnome-platform.bst +- build-essential/gnome-sdk.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + configure-commands: + # We set the sysroot location dynamically at runtime by passing + # `--sysroot` to GCC, so we need to build a linker with sysroot support. + # We set it to a non-existent directory as a safety net to avoid looking + # at the host dirs in case we forget to set the sysroot. Setting the + # lib path is vital to avoid the tools we build linking to the libraries + # on the host system; the '=' makes the path we give relative to the + # sysroot, which we can then set at runtime by passing -Wl,--sysroot to + # GCC. Although nothing should be installed on /lib64, we configure the + # linker to look at that directory as well to make things more robust + # (currently GCC installs libraries to this directory at least on + # x86_64). + + - | + %{configure} --disable-nls --disable-werror \ + --build=$(sh config.guess) \ + --host=$(sh config.guess) \ + --target=%{target-stage1} \ + --with-sysroot=/nonexistentdir --with-lib-path="=%{prefix}/lib:=%{prefix}/lib64" |