summaryrefslogtreecommitdiff
path: root/strata/build-essential/stage1-binutils.morph
diff options
context:
space:
mode:
authorTiago Gomes <tiago.gomes@codethink.co.uk>2015-01-26 16:22:47 +0000
committerTiago Gomes <tiago.gomes@codethink.co.uk>2015-01-26 16:22:47 +0000
commit40cff71921b8e20e6fdefd41560e89067ba21483 (patch)
treee27a743c39a22b9ef0e76824c4a2c008d25c33d1 /strata/build-essential/stage1-binutils.morph
parenteaf31937a6c16adac30e5c8ba71d457336b5df0d (diff)
parent941c6a9653c784962aab1579ff066d7a274e8d84 (diff)
downloaddefinitions-40cff71921b8e20e6fdefd41560e89067ba21483.tar.gz
Merge branch 'baserock/tiagogomes/update-toolchain-v2'
Reviewed by: * Sam Thursfield * Paul Sherwood * Josh Malkinson
Diffstat (limited to 'strata/build-essential/stage1-binutils.morph')
-rw-r--r--strata/build-essential/stage1-binutils.morph18
1 files changed, 12 insertions, 6 deletions
diff --git a/strata/build-essential/stage1-binutils.morph b/strata/build-essential/stage1-binutils.morph
index b6670d5c..69a79d14 100644
--- a/strata/build-essential/stage1-binutils.morph
+++ b/strata/build-essential/stage1-binutils.morph
@@ -3,15 +3,21 @@ 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.
+# We set the sysroot location dynamically at runtime by passing
+# `--sysroot` to GCC, so we need to build a linker with sysroot support.
+# We set it to a non-existent directory as a safety net to avoid looking
+# at the host dirs in case we forget to set the 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. Although nothing should be installed on /lib64, we configure the
+# linker to look at that directory as well to make things more robust
+# (currently GCC installs libraries to this directory at least on
+# x86_64).
- |
./configure --prefix="$PREFIX" --disable-nls --disable-werror \
--build=$(sh config.guess) \
--host=$(sh config.guess) \
--target=$TARGET_STAGE1 \
- --with-sysroot="/" --with-lib-path="=$PREFIX/lib"
+ --with-sysroot=/nonexistentdir --with-lib-path="=$PREFIX/lib:=$PREFIX/lib64"