summaryrefslogtreecommitdiff
path: root/etc/imports/binutils.TARGETS
diff options
context:
space:
mode:
Diffstat (limited to 'etc/imports/binutils.TARGETS')
-rw-r--r--etc/imports/binutils.TARGETS23
1 files changed, 23 insertions, 0 deletions
diff --git a/etc/imports/binutils.TARGETS b/etc/imports/binutils.TARGETS
index 71f9bf8..0155388 100644
--- a/etc/imports/binutils.TARGETS
+++ b/etc/imports/binutils.TARGETS
@@ -4,6 +4,11 @@
, "target": "binutils binaries"
, "flexible_config": ["ARCH", "TARGET_ARCH", "TOOLCHAIN_CONFIG", "ENV"]
}
+, "multi-target strip":
+ { "type": "export"
+ , "target": "multi-target strip binary"
+ , "flexible_config": ["ARCH", "TARGET_ARCH", "TOOLCHAIN_CONFIG", "ENV"]
+ }
, "binutils binaries":
{ "type": ["@", "rules", "CC/foreign/shell", "data"]
, "project": ["files"]
@@ -23,4 +28,22 @@
]
, "out_dirs": ["."]
}
+, "multi-target strip binary":
+ { "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=/ --enable-targets=all --enable-deterministic-archives --disable-nls --disable-gprofng --disable-ld --disable-gdb --disable-werror >configure.log 2>&1 || (cat configure.log && exit 1)"
+ , "${MAKE} -j${NJOBS} MAKEINFO=true all-binutils >build.log 2>&1 || (cat configure.log build.log && exit 1)"
+ , "${MAKE} -j${NJOBS} MAKEINFO=true DESTDIR=${DESTDIR} install-strip-binutils >>build.log 2>&1 || (cat configure.log build.log && exit 1)"
+ ]
+ , "outs": ["bin/strip"]
+ }
}