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/stage2-reset-specs.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/stage2-reset-specs.bst')
-rw-r--r-- | build-essential/stage2-reset-specs.bst | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/build-essential/stage2-reset-specs.bst b/build-essential/stage2-reset-specs.bst new file mode 100644 index 00000000..4b3b6f91 --- /dev/null +++ b/build-essential/stage2-reset-specs.bst @@ -0,0 +1,33 @@ +kind: manual + +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: + # Nasty hack to get around being unable to reliably add configuration to gcc, + # hence the gcc specs are modified, combined with Baserock's rootfs protection + # preventing specs being modified before builds. + # The limitation is overcome by installing files as part of a chunk, which + # overwrites previous files. + # New specs were added for the bootstrap builds, but after stage2 we start + # having chrooted builds, so the old specs need to be replaced. + # Unfortunately we can't just replace the specs with the ones gcc produces, + # since gcc behaves differently without specs to with specs it produces! + # So we use a **NASTY HACK** to replace the specs symlink with one that + # points to a file that doesn't exist. + install-commands: + - | + STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + specs_dir="$(dirname $(%{target-stage1}-gcc -print-libgcc-file-name))" + target_specs_dir="%{install-root}/${specs_dir#$STAGE2_SYSROOT}" + mkdir -p "$target_specs_dir" + ln -s "temporary specs removed by baserock bootstrap" "$target_specs_dir/specs" |