Merge pull request #75 from ehawkvu/static-binutils

binutils: build some binaries statically
This commit is contained in:
Owen Rafferty 2022-07-12 21:16:20 -05:00 committed by GitHub
commit 4814193f5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,4 +30,12 @@ make configure-host
make tooldir=/usr
make tooldir=/usr install
# These programs are safe to build statically.
cd binutils
make clean-binPROGRAMS
make LDFLAGS="$LDFLAGS -all-static"
for f in *; do
[ -e "$1/usr/bin/$f" ] && mv -f "$f" "$1/usr/bin/$f"
done
ln -sf ld.bfd "$1/usr/bin/ld"