This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patching autoconf to support static binutils? - SOLVED


On 08/25/11 12:51, Bryan Ischo wrote:
On 08/24/11 10:13, Mike Frysinger wrote:
On Wednesday, August 24, 2011 12:33:28 Bryan Ischo wrote:
On 08/24/11 09:03, Mike Frysinger wrote:
Additionally, it is disappointing that you put more effort
into writing this paragraph than to your response below ...
that's what "free" gets you

./configure
make configure-host
make LDFLAGS=-all-static
If you'll read my original email you'll note that the above doesn't work
because LDFLAGS is passed to gcc by some of the binutils Makefiles and
gcc doesn't like the -all-static option.
i tested this sequence and it seemed to work just fine for me. gcc
generally shouldnt be invoked directly by the makefiles ... the compiles
should all be going through libtool. and they do on my system.
OK I will try again and take a harder look at why it is failing for me.
I apologize for any perceived impatience on my part in this exchange and
I appreciate your taking the time to test the scenario and report your
results.
np.  g'luck.
-mike

OK I tried again; with your instructions, there are no errors reported, but then again, the LDFLAGS argument is ignored and the result is not a static build of binutils as desired.

Sorry, the cause was my own mistake. In fact your instructions *do* produce a static binutils. I made the mistake of thinking that doing "export LDFLAGS=-all-static" was the same as passing LDFLAGS=-all-static to the make command, and apparently it is not. Make variables are not picked up from the environment unless explicitly requested in the Makefile, and I often forget that detail. The confusing thing is that the configure script talks about using LDFLAGS from the environment, which it does, but that doesn't mean that the subsequent make will pick the variable up from the environment, and I should have realized that.


Using your instructions verbatim did produce static binaries.

Sorry for the noise, and thanks again for your help.

Bryan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]