diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2017-08-24 12:56:15 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2017-08-24 12:56:15 +0000 |
commit | 6632adf452a9f514545a1f8be8adcd922a0ccbc5 (patch) | |
tree | dd0f4774ed3d9f67950d51a95da409597db48610 /elements/gnu-toolchain/stage2-libstdcxx.bst | |
parent | 54e447a9f1a9e94d68e6f5f616617ce49682192a (diff) | |
parent | 879a306c8c6285e9ef8dcbbba96bb84e62a9654c (diff) | |
download | definitions-6632adf452a9f514545a1f8be8adcd922a0ccbc5.tar.gz |
Merge remote-tracking branch 'buildstream-tests/gnu-toolchain' into sam/buildstream-autoconvert
This branch contains a manual conversion of the Baserock bootstrap
process to BuildStream. The original branch can be found here:
https://gitlab.com/BuildStream/buildstream-tests/tree/gnu-toolchain
It's not possible to automatically convert the existing Baserock
bootstrap due to differences in how BuildStream works.
Diffstat (limited to 'elements/gnu-toolchain/stage2-libstdcxx.bst')
-rw-r--r-- | elements/gnu-toolchain/stage2-libstdcxx.bst | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/elements/gnu-toolchain/stage2-libstdcxx.bst b/elements/gnu-toolchain/stage2-libstdcxx.bst new file mode 100644 index 00000000..12ea73fa --- /dev/null +++ b/elements/gnu-toolchain/stage2-libstdcxx.bst @@ -0,0 +1,55 @@ +kind: manual + +sources: +- kind: git + url: upstream:gcc-tarball + track: baserock/gcc-7.1.0 + ref: 3b0dbcfa2e5d12bd80cab1b35f08653d61fe7838 + +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: + configure-commands: + - mkdir o + + # Configure flag notes: + # 1. The thread C++ library cannot be built, as the thread C library + # was not build in stage1-gcc. + # 2. Prevents the installation of precompiled include files, which are + # not needed at this stage. + # 3. From LFS: the header location of C++ needs to be explicitly given + # as we are running the configure script from the top-level + # directory. + - | + export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + # -fPIC must be given, otherwise it will not be possible to create + # shared libraries linked to libstdc++ + export CPPFLAGS="--sysroot=$STAGE2_SYSROOT -fPIC" + export LDFLAGS="--sysroot=$STAGE2_SYSROOT" + cd o && ../libstdc++-v3/configure \ + --build=$(sh ../config.guess) \ + --host="%{target-stage1}" \ + --target="%{target-stage1}" \ + --prefix="%{prefix}" \ + --disable-nls \ + --disable-shared \ + --disable-multilib \ + `# [1]` --disable-libstdcxx-threads \ + `# [2]` --disable-libstdcxx-pch \ + `# [3]` --with-gxx-include-dir=/tools/%{target-stage1}/include/c++/7.1.0 + + build-commands: + - cd o && make + + install-commands: + - cd o && make DESTDIR="%{install-root}" install |