I'm trying to build binutils-2.19.1 statically. I tried with ../binutils-2.19.1/configure LDFLAGS="-static" && make but I get: ldd binutils/ar linux-vdso.so.1 => (0x00007fffaf9ff000) libz.so.1 => /lib/libz.so.1 (0x00007fe1a223d000) libc.so.6 => /lib/libc.so.6 (0x00007fe1a1ee2000) /lib64/ld-linux-x86-64.so.2 (0x00007fe1a2453000) This procedure works for all other packages I'm trying to compile (gcc, bash, ...) but it seems not to work for binutils. Why? Is there perhaps another way to accomplish this? I also tried reading ./configure --help, README and binutils/README but there is no useful information.
Subject: Re: New: cannot build binutils statically Hi, > I'm trying to build binutils-2.19.1 statically. I tried with > ../binutils-2.19.1/configure LDFLAGS="-static" && make but I get: Try adding a second dash. ie: ../binutils-2.19.1/configure LDFLAGS="--static" && make Cheers Nick
It seems to work, thanks. But why do I need --static while all other packages (gmp, mpfr, bash, ...) work with -static? Also, I think there should be a document either in binutils sources or on the binutils homepage that explains how to build binutils statically.
binutils uses libtool, and libtool uses -all-static instead.
Works with LDFLAGS="--static".
Created attachment 4051 [details] Document use of LDFLAGS="--static"
Hi, I take your point about documenting the use of LDFLAGS="--static", so I am going to apply the uploaded patch to the sources. Cheers Nick
Subject: Bug 10380 CVSROOT: /cvs/src Module name: src Changes by: nickc@sourceware.org 2009-07-14 07:43:19 Modified files: binutils : ChangeLog README Log message: PR 10380 * README: Document use of LDFLAGS="--static". Patches: http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/binutils/ChangeLog.diff?cvsroot=src&r1=1.1495&r2=1.1496 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/binutils/README.diff?cvsroot=src&r1=1.8&r2=1.9