summaryrefslogtreecommitdiff
path: root/etc/imports/binutils.TARGETS
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2023-10-20 16:07:58 +0200
committerOliver Reiche <oliver.reiche@huawei.com>2023-10-20 16:07:58 +0200
commit060a0cf338d6024eee37cc344c224fe3bcb78e81 (patch)
tree3fea7c654b69ecf3490fe9c6cbc542aba0d5bd8f /etc/imports/binutils.TARGETS
downloadbootstrappable-toolchain-060a0cf338d6024eee37cc344c224fe3bcb78e81.tar.gz
Initial commit
Diffstat (limited to 'etc/imports/binutils.TARGETS')
-rw-r--r--etc/imports/binutils.TARGETS26
1 files changed, 26 insertions, 0 deletions
diff --git a/etc/imports/binutils.TARGETS b/etc/imports/binutils.TARGETS
new file mode 100644
index 0000000..71f9bf8
--- /dev/null
+++ b/etc/imports/binutils.TARGETS
@@ -0,0 +1,26 @@
+{ "files": {"type": "install", "deps": [["TREE", null, "."]]}
+, "binutils":
+ { "type": "export"
+ , "target": "binutils binaries"
+ , "flexible_config": ["ARCH", "TARGET_ARCH", "TOOLCHAIN_CONFIG", "ENV"]
+ }
+, "binutils binaries":
+ { "type": ["@", "rules", "CC/foreign/shell", "data"]
+ , "project": ["files"]
+ , "cmds":
+ [ "export NJOBS=$(nproc --all 2>/dev/null || echo 1)"
+ , "unset LDFLAGS"
+ , "if [ -f /lib/ld-musl-$(uname -m).so.1 ]; then"
+ , " ln -s /lib/ld-musl-$(uname -m).so.1 ${TMPDIR}/ldd"
+ , " export PATH=$PATH:${TMPDIR}"
+ , "fi"
+ , "mkdir build"
+ , "cd build"
+ , "../configure --prefix=/ --disable-nls --enable-gprofng=no --disable-werror --enable-deterministic-archives >configure.log 2>&1 || (cat configure.log && exit 1)"
+ , "${MAKE} -j${NJOBS} MAKEINFO=true >build.log 2>&1 || (cat configure.log build.log && exit 1)"
+ , "${MAKE} -j${NJOBS} MAKEINFO=true DESTDIR=${DESTDIR} install-strip >>build.log 2>&1 || (cat configure.log build.log && exit 1)"
+ , "find ${DESTDIR} -type f -name '*.la' -exec sed -i 's|'$(pwd)'|/build|g' {} \\;"
+ ]
+ , "out_dirs": ["."]
+ }
+}