Forked from cfstras/-Build static versions of binutils, for example ld, gprof, nm, strip, objdump, ar, strings; with mingw or on *nix
Created
July 12, 2023 06:05
-
-
Save yakamoz423/2dd9312538799edb36ab58ba36d0afe7 to your computer and use it in GitHub Desktop.
Build static versions of binutils, for example ld, gprof, nm, strip, objdump, ar, strings; with mingw or on *nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VERSION=2.25 | |
wget http://ftp.gnu.org/gnu/binutils/binutils-$VERSION.tar.gz || exit 1 | |
tar xzf binutils-$VERSION.tar.gz || exit 1 | |
cd binutils-$VERSION || exit 1 | |
./configure --disable-nls --prefix=$(pwd)/bin || exit 1 | |
make configure-host || exit 1 | |
make LDFLAGS="-all-static" || exit 1 | |
make install || exit 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ezbob
Ezbob commented on Jun 23, 2020
I was surprised that this works, but I just tried this with binutils 2.34 and it work like a charm too! Thanks!
Ezbob
Ezbob commented on Jun 23, 2020
You can also use
make install-strip
to shrink the binary sizes when installingyakamoz423
yakamoz423 commented 2 hours ago •
Awesome! I build binutils-2.40 on MSYS2 (MinGW x86_64), by configuring with
--enable-targets=all
to obtain binutils-multiarch version, and it works too!