diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-09-26 12:07:06 +0100 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-09-26 13:18:24 +0100 |
commit | e9dbfdc623101442370d51525e8cdbe3867eab02 (patch) | |
tree | e3212f19e99a2043bfc8f519a70ff8a857c68126 /strata/build-essential/stage2-gcc.morph | |
parent | f8eb5d55ef5edc933442f489ae806a5a70d2a0cc (diff) | |
download | definitions-e9dbfdc623101442370d51525e8cdbe3867eab02.tar.gz |
Add back missing comments to build-essential chunk morphs
These will have been lost in the automated chunks-in-definitions
transition.
Diffstat (limited to 'strata/build-essential/stage2-gcc.morph')
-rw-r--r-- | strata/build-essential/stage2-gcc.morph | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/strata/build-essential/stage2-gcc.morph b/strata/build-essential/stage2-gcc.morph index e342d648..bf6378c1 100644 --- a/strata/build-essential/stage2-gcc.morph +++ b/strata/build-essential/stage2-gcc.morph @@ -1,7 +1,25 @@ name: stage2-gcc kind: chunk + configure-commands: - mkdir o + +# In other projects we specify the sysroot location using CPPFLAGS. Here, +# that breaks because GCC compiles stuff for the *build* machine, too ... +# and this requires using the host's compiler, which cannot use the same +# set of CPPFLAGS as the target. If we specify the sysroot using CC instead +# then we don't interfere, because we are only specifying the *host* C +# compiler. +# +# Configure flag notes: +# 1. It's vital that this compiler targets the bootstrap machine +# (TARGET_STAGE1) so that the stage 1 GCC is used instead of the +# compiler of the build machine. +# 2. Disable searching /usr/local/include for headers +# 3. This flag causes the correct --sysroot flag to be passed when calling +# stage 1 GCC. +# 4. C++ is built in stage 3. +# 5. Standard flags. See gcc.morph. - | export STAGE2_SYSROOT="$(dirname $(pwd))" export CC="$TARGET_STAGE1-gcc --sysroot=$STAGE2_SYSROOT" @@ -22,12 +40,22 @@ configure-commands: --without-cloog --without-ppl \ --with-mpfr-include="$(pwd)/../mpfr/src" \ --with-mpfr-lib="$(pwd)/mpfr/src/.libs" + build-commands: - | export STAGE2_SYSROOT="$(dirname $(pwd))" cd o && make + install-commands: - cd o && make DESTDIR="$DESTDIR" install + +# Stage 3 builds need to link against this file in the location that +# it will be in the final system, so we make a temporary link now. +# +# On x86_64 GCC resolutely installs its libraries into lib64. To fix this +# would require hobbling the MULTILIB_OSDIRNAMES field in +# gcc/config/i386/t-linux64 and this might break things, so for now we +# tolerate the inconsistency. - | if [ "$(echo $TARGET | cut -c -6)" = "x86_64" ]; then libdir=lib64 |