summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2013-03-14 16:56:46 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2013-03-14 16:58:56 +0000
commit6dfe09b06f981eacbfe3c647a602453fe1d4adfd (patch)
tree6f098deef9c5a31694436e823c9327617275910a
parent89bf6cbc637149d7e0ee16d1ebea215fef65c077 (diff)
downloadbinutils-redhat-6dfe09b06f981eacbfe3c647a602453fe1d4adfd.tar.gz
Use MORPH_ARCH field to set target-specific flags
Also, use config.guess when we need to know BUILD, because Morph no longer sets this variable.
-rw-r--r--stage1-binutils.morph2
-rw-r--r--stage1-binutils.morph.yaml4
-rw-r--r--stage2-binutils.morph2
-rw-r--r--stage2-binutils.morph.yaml4
4 files changed, 8 insertions, 4 deletions
diff --git a/stage1-binutils.morph b/stage1-binutils.morph
index eab857f81b..49c469fbdc 100644
--- a/stage1-binutils.morph
+++ b/stage1-binutils.morph
@@ -3,6 +3,6 @@
"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"
+ "./configure --prefix=\"$PREFIX\" --disable-nls --disable-werror \\\n --build=$(sh config.guess) \\\n --host=$(sh config.guess) \\\n --target=$TARGET_STAGE1 \\\n --with-sysroot=\"/\" --with-lib-path=\"=$PREFIX/lib\"\n"
]
}
diff --git a/stage1-binutils.morph.yaml b/stage1-binutils.morph.yaml
index 78d604d737..1274243542 100644
--- a/stage1-binutils.morph.yaml
+++ b/stage1-binutils.morph.yaml
@@ -11,5 +11,7 @@ configure-commands:
- |
./configure --prefix="$PREFIX" --disable-nls --disable-werror \
- --build=$BUILD --host=$BUILD --target=$TARGET_STAGE1 \
+ --build=$(sh config.guess) \
+ --host=$(sh config.guess) \
+ --target=$TARGET_STAGE1 \
--with-sysroot="/" --with-lib-path="=$PREFIX/lib"
diff --git a/stage2-binutils.morph b/stage2-binutils.morph
index 42532c21c2..60b11223c6 100644
--- a/stage2-binutils.morph
+++ b/stage2-binutils.morph
@@ -4,7 +4,7 @@
"build-system": "autotools",
"configure-commands": [
"stage2-eglibc-fix-specs",
- "export STAGE2_SYSROOT=\"$(dirname $(pwd))\"\nexport CPPFLAGS=\"--sysroot=$STAGE2_SYSROOT\"\nexport CXX=false\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 --with-system-zlib\"\n"
+ "export STAGE2_SYSROOT=\"$(dirname $(pwd))\"\nexport CPPFLAGS=\"--sysroot=$STAGE2_SYSROOT\"\nexport CXX=false\nexport LDFLAGS=\"-Wl,--sysroot=$STAGE2_SYSROOT\"\n./configure --prefix=\"$PREFIX\" --disable-nls --disable-werror \\\n --build=$(sh config.guess) \\\n --host=$TARGET_STAGE1 \\\n --target=$TARGET_STAGE1 \\\n --with-lib-path=\"$PREFIX/lib --with-system-zlib\"\n"
],
"build-commands": [
"export STAGE2_SYSROOT=\"$(dirname $(pwd))\"\nexport CPPFLAGS=\"--sysroot=$STAGE2_SYSROOT\"\nexport LDFLAGS=\"-Wl,--sysroot=$STAGE2_SYSROOT\"\nmake\n"
diff --git a/stage2-binutils.morph.yaml b/stage2-binutils.morph.yaml
index 588a487b78..85efd878a1 100644
--- a/stage2-binutils.morph.yaml
+++ b/stage2-binutils.morph.yaml
@@ -11,7 +11,9 @@ configure-commands:
export CXX=false
export LDFLAGS="-Wl,--sysroot=$STAGE2_SYSROOT"
./configure --prefix="$PREFIX" --disable-nls --disable-werror \
- --build=$BUILD --host=$TARGET_STAGE1 --target=$TARGET_STAGE1 \
+ --build=$(sh config.guess) \
+ --host=$TARGET_STAGE1 \
+ --target=$TARGET_STAGE1 \
--with-lib-path="$PREFIX/lib --with-system-zlib"
build-commands: