Patching autoconf to support static binutils?

Bryan Ischo bryan@ischo.com
Fri Aug 26 09:41:00 GMT 2011


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.

Can you please check whether your test build actually produced 
statically linked binaries?

As far as I can tell, forcing the static build requires setting 
LIBTOOLFLAGS to -all-static, but this causes the errors that I mentioned 
in my previous email, because LIBTOOLFLAGS is passed to libtool for all 
invocations regardless of the mode, and libtool with -mode=compile does 
not accept -all-static.

With no other feedback on my proposal, I guess I'll have to do what I 
think is best and hope that the binutil maintainers agree with my idea.  
I will split LIBTOOLFLAGS into separate LIBTOOLFLAGS for each libtool 
mode (i.e. LIBTOOLFLAGS_COMPILE, LIBTOOLFLAGS_LINK, etc), passing the 
appropriate one for each invocation of libtool, and also making each one 
include a reference to LIBTOOLFLAGS so that the change is backwards 
compatible.

Thanks,
Bryan



More information about the Binutils mailing list