diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-03-22 09:47:09 +0000 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-03-22 09:47:09 +0000 |
commit | f501976babcc283c7d2ae4bea25e5feefc4b98c2 (patch) | |
tree | b01db0437dae72ebb5efd31f7e08149ca98f37b6 /elements/gnu-toolchain/stage2-gcc-fixed-headers.bst | |
parent | 24e2b51f2b81b6b48376a5b4facbcddb4caad177 (diff) | |
download | definitions-f501976babcc283c7d2ae4bea25e5feefc4b98c2.tar.gz |
Moved all elements under the elements directory
Diffstat (limited to 'elements/gnu-toolchain/stage2-gcc-fixed-headers.bst')
-rw-r--r-- | elements/gnu-toolchain/stage2-gcc-fixed-headers.bst | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/elements/gnu-toolchain/stage2-gcc-fixed-headers.bst b/elements/gnu-toolchain/stage2-gcc-fixed-headers.bst new file mode 100644 index 00000000..f3ed0e1e --- /dev/null +++ b/elements/gnu-toolchain/stage2-gcc-fixed-headers.bst @@ -0,0 +1,37 @@ +kind: manual + +sources: +- kind: git + url: upstream:gcc-tarball + track: baserock/gnu-toolchain + ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 + +depends: +- filename: gnu-toolchain/stage1.bst + type: build +- gnu-toolchain/stage2-linux-api-headers.bst +- gnu-toolchain/stage2-glibc.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + install-commands: + # Stage 1 GCC's fixincludes process created a limits.h before there was + # a real limits.h available for the target. This step (taken from Linux + # Linux From Scratch) creates a better one so that stage 2 GCC can compile. + # + # THIS IS A FRAGILE HACK! We need to replace the headers. The only way to + # overwrite files in a staging area is to install a new chunk. + # This is undesired behaviour in the long term, as we want to never + # have overlaps, so this functionality may go away. + - | + libgcc_dir=$(dirname $(%{target-stage1}-gcc -print-libgcc-file-name)) + sysroot="$(dirname $(dirname $(pwd)))" + target_libgcc_dir="${libgcc_dir#$sysroot}" + mkdir -p "%{install-root}/$target_libgcc_dir/include-fixed" + cat "gcc/limitx.h" "gcc/glimits.h" "gcc/limity.h" \ + >"%{install-root}/$target_libgcc_dir/include-fixed/limits.h" |