From f501976babcc283c7d2ae4bea25e5feefc4b98c2 Mon Sep 17 00:00:00 2001
From: Tristan Van Berkom <tristan.vanberkom@codethink.co.uk>
Date: Wed, 22 Mar 2017 09:47:09 +0000
Subject: Moved all elements under the elements directory

---
 elements/gnu-toolchain/stage2-binutils.bst | 40 ++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 elements/gnu-toolchain/stage2-binutils.bst

(limited to 'elements/gnu-toolchain/stage2-binutils.bst')

diff --git a/elements/gnu-toolchain/stage2-binutils.bst b/elements/gnu-toolchain/stage2-binutils.bst
new file mode 100644
index 00000000..e3ef2eaa
--- /dev/null
+++ b/elements/gnu-toolchain/stage2-binutils.bst
@@ -0,0 +1,40 @@
+kind: autotools
+
+sources:
+- kind: git
+  url: upstream:binutils-tarball
+  track: binutils-2.25
+  ref: 5500a97a2ad1735db5b35bc51cfb825c1f4c38df
+
+depends:
+- filename: gnu-toolchain/stage1.bst
+  type: build
+- filename: gnu-toolchain/stage2-fhs-dirs.bst
+  type: runtime
+- gnu-toolchain/stage2-linux-api-headers.bst
+- gnu-toolchain/stage2-glibc.bst
+
+variables:
+  prefix: /tools
+
+environment:
+  PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin
+
+config:
+  configure-commands:
+  - |
+    export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))"
+    export CXX="%{target-stage1}-g++ --sysroot=$STAGE2_SYSROOT"
+    # binutils has its own embedded libtool, which is old and strips out
+    # `--sysroot`.  Work around by modifying the compiler command to
+    # include the sysroot flag
+    export CC="%{target-stage1}-gcc --sysroot=$STAGE2_SYSROOT"
+    ./configure --prefix="%{prefix}" --disable-nls --disable-werror \
+      --build=$(sh config.guess) \
+      --host=%{target-stage1} \
+      --target=%{target-stage1}
+
+  build-commands:
+  - |
+    export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))"
+    make
-- 
cgit v1.2.1

