diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2023-12-05 14:18:27 +0100 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2023-12-21 12:23:10 +0100 |
commit | ee44c27d7161976ccccf893ba3f889b533080347 (patch) | |
tree | 2e0c48b18fabbc0893d0b84db8d1b1eae0b8e81e /etc/imports/binutils.TARGETS | |
parent | e747124efaca4e92f3c6beb504a15e4152f5bf8f (diff) | |
download | bootstrappable-toolchain-ee44c27d7161976ccccf893ba3f889b533080347.tar.gz |
Add strip binary with multi-target support
Diffstat (limited to 'etc/imports/binutils.TARGETS')
-rw-r--r-- | etc/imports/binutils.TARGETS | 23 |
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"] + } } |