summaryrefslogtreecommitdiff
path: root/baserock/strata/build-essential/stage1-binutils.morph
diff options
context:
space:
mode:
authorPaul Sherwood <paul.sherwood@codethink.co.uk>2015-09-25 08:47:49 +0000
committerPaul Sherwood <paul.sherwood@codethink.co.uk>2015-09-26 08:27:41 +0100
commit3a2f641e4e70e76ffa77629c6208970c1a7af667 (patch)
treee6635788976c616017c05b5ea93432f9b2dc769e /baserock/strata/build-essential/stage1-binutils.morph
parentc844667a718e8640d9ae2b7640a3b0dc0fb53b0e (diff)
downloaddefinitions-3a2f641e4e70e76ffa77629c6208970c1a7af667.tar.gz
Proposed re-org of definitions repobaserock/ps/reorganise-definitions
Diffstat (limited to 'baserock/strata/build-essential/stage1-binutils.morph')
-rw-r--r--baserock/strata/build-essential/stage1-binutils.morph23
1 files changed, 23 insertions, 0 deletions
diff --git a/baserock/strata/build-essential/stage1-binutils.morph b/baserock/strata/build-essential/stage1-binutils.morph
new file mode 100644
index 00000000..69a79d14
--- /dev/null
+++ b/baserock/strata/build-essential/stage1-binutils.morph
@@ -0,0 +1,23 @@
+name: stage1-binutils
+kind: chunk
+build-system: autotools
+
+configure-commands:
+# 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=/nonexistentdir --with-lib-path="=$PREFIX/lib:=$PREFIX/lib64"