diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2013-02-08 16:20:20 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2013-03-11 13:24:28 +0000 |
commit | ef372669c61ee9b7e94efb289838b1fff60fb489 (patch) | |
tree | 5cae87451bb7885c5a6ee3f5c59a5e78d9f0fea9 | |
parent | e9079a69779b363e0bf8b4773e8eee72dd10a863 (diff) | |
download | binutils-redhat-ef372669c61ee9b7e94efb289838b1fff60fb489.tar.gz |
Add morphs for build-essential bootstrap
JSON versions are generated from .yaml versions using the edit-morph
script in the Morph source tree:
'scripts/edit-morph to-json *.morph.yaml'
The .morph files themselves should be converted to YAML after the next
Baserock release.
-rw-r--r-- | binutils.morph | 1 | ||||
-rw-r--r-- | binutils.morph.yaml | 6 | ||||
-rw-r--r-- | stage1-binutils.morph | 8 | ||||
-rw-r--r-- | stage1-binutils.morph.yaml | 15 | ||||
-rw-r--r-- | stage2-binutils.morph | 12 | ||||
-rw-r--r-- | stage2-binutils.morph.yaml | 24 |
6 files changed, 65 insertions, 1 deletions
diff --git a/binutils.morph b/binutils.morph index 548cc8b906..5ccfb574d4 100644 --- a/binutils.morph +++ b/binutils.morph @@ -6,4 +6,3 @@ "./configure --prefix=\"$PREFIX\" --disable-nls --disable-werror" ] } - diff --git a/binutils.morph.yaml b/binutils.morph.yaml new file mode 100644 index 0000000000..4549700e60 --- /dev/null +++ b/binutils.morph.yaml @@ -0,0 +1,6 @@ +name: binutils +kind: chunk +build-system: autotools + +configure-commands: + - ./configure --prefix="$PREFIX" --disable-nls --disable-werror diff --git a/stage1-binutils.morph b/stage1-binutils.morph new file mode 100644 index 0000000000..eab857f81b --- /dev/null +++ b/stage1-binutils.morph @@ -0,0 +1,8 @@ +{ + "name": "stage1-binutils", + "kind": "chunk", + "build-system": "autotools", + "configure-commands": [ + "./configure --prefix=\"$PREFIX\" --disable-nls --disable-werror \\\n --build=$BUILD --host=$BUILD --target=$TARGET_STAGE1 \\\n --with-sysroot=\"/\" --with-lib-path=\"=$PREFIX/lib\"\n" + ] +} diff --git a/stage1-binutils.morph.yaml b/stage1-binutils.morph.yaml new file mode 100644 index 0000000000..78d604d737 --- /dev/null +++ b/stage1-binutils.morph.yaml @@ -0,0 +1,15 @@ +name: stage1-binutils +kind: chunk +build-system: autotools + +configure-commands: + # We set the sysroot location dynamically at runtime by passing -B to GCC, + # so we configure with 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. + + - | + ./configure --prefix="$PREFIX" --disable-nls --disable-werror \ + --build=$BUILD --host=$BUILD --target=$TARGET_STAGE1 \ + --with-sysroot="/" --with-lib-path="=$PREFIX/lib" diff --git a/stage2-binutils.morph b/stage2-binutils.morph new file mode 100644 index 0000000000..5267f48245 --- /dev/null +++ b/stage2-binutils.morph @@ -0,0 +1,12 @@ +{ + "name": "stage2-binutils", + "kind": "chunk", + "build-system": "autotools", + "configure-commands": [ + "stage2-eglibc-fix-specs", + "export STAGE2_SYSROOT=\"$(dirname $(pwd))\"\nexport CPPFLAGS=\"-B$STAGE2_SYSROOT/tools --sysroot=$STAGE2_SYSROOT\"\nexport LDFLAGS=\"-Wl,--sysroot=$STAGE2_SYSROOT\"\n./configure --prefix=\"$PREFIX\" --disable-nls --disable-werror \\\n --build=$BUILD --host=$TARGET_STAGE1 --target=$TARGET_STAGE1 \\\n --with-lib-path=\"$PREFIX/lib\"\n" + ], + "build-commands": [ + "export STAGE2_SYSROOT=\"$(dirname $(pwd))\"\nexport CPPFLAGS=\"-B$STAGE2_SYSROOT/tools --sysroot=$STAGE2_SYSROOT\"\nexport LDFLAGS=\"-Wl,--sysroot=$STAGE2_SYSROOT\"\nmake\n" + ] +} diff --git a/stage2-binutils.morph.yaml b/stage2-binutils.morph.yaml new file mode 100644 index 0000000000..c714a600df --- /dev/null +++ b/stage2-binutils.morph.yaml @@ -0,0 +1,24 @@ +name: stage2-binutils +kind: chunk +build-system: autotools + +configure-commands: + - stage2-eglibc-fix-specs + + - | + export STAGE2_SYSROOT="$(dirname $(pwd))" + export CPPFLAGS="-B$STAGE2_SYSROOT/tools --sysroot=$STAGE2_SYSROOT" + export LDFLAGS="-Wl,--sysroot=$STAGE2_SYSROOT" + ./configure --prefix="$PREFIX" --disable-nls --disable-werror \ + --build=$BUILD --host=$TARGET_STAGE1 --target=$TARGET_STAGE1 \ + --with-lib-path="$PREFIX/lib" + +build-commands: + # Nested configure scripts require that we set CPPFLAGS here as well + # (I don't think we should have to .. . at least in GCC, I think + # TARGET_CPPFLAGS may be the answer) + - | + export STAGE2_SYSROOT="$(dirname $(pwd))" + export CPPFLAGS="-B$STAGE2_SYSROOT/tools --sysroot=$STAGE2_SYSROOT" + export LDFLAGS="-Wl,--sysroot=$STAGE2_SYSROOT" + make |