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

See crosstool-NG for lots more information.


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: [PATCH] Fixup the static toolchain build problem


Hi Yann,

On 08.07.2014 22:09, Yann E. MORIN wrote:
> Brock, All,
>
> On 2014-07-08 20:29 +0800, brock.zheng spake thusly:
>>     When build binutils, libtool tried to translate -lfl to /usr/lib/libfl.so
>>     But when change to "LDFLAGS=-all-static -static", libtool works fine.
>>     -lfl will be translated to /usr/lib/libfl.a
> Here are a few comments on your patch.
>
> First you forgot to add your Signed-oof-by to the patch, so we can't use
> it. See:
>      http://crosstool-ng.org/git/crosstool-ng/tree/docs/7%20-%20Contributing%20to%20crosstool-NG.txt
>
> Second, in a previous mail, you said:
>
>      I have checked the libtool script, and found that the following option
>            -all-static
>            -static
>            -static-libtool-libs
>      is processed in a strange way. If any one of those three option appears
>      firstly in the cmdline, all others
>      will be neglected. Our LDFLAGS is ".... -static -all-static -o", so the
>      -static option takes the real effect,
>      and the -all-static has no useage actually! that is the cause of the
>      failure.
>
> So, if only the first option is in effect, why do we still cary the
> -static ?
>
> Otherwise, I'm not opposed to the idea. ;-)
>
> Regards,
> Yann E. MORIN.
>
>> ---
>>   scripts/build/binutils/binutils.sh | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/scripts/build/binutils/binutils.sh b/scripts/build/binutils/binutils.sh
>> index b6207be..cc57b5a 100644
>> --- a/scripts/build/binutils/binutils.sh
>> +++ b/scripts/build/binutils/binutils.sh
>> @@ -220,7 +220,7 @@ do_binutils_backend() {
>>           "${CT_BINUTILS_EXTRA_CONFIG_ARRAY[@]}"
>>   
>>       if [ "${static_build}" = "y" ]; then
>> -        extra_make_flags+=("LDFLAGS=-static -all-static")
>> +        extra_make_flags+=("LDFLAGS=-all-static -static")
>>           CT_DoLog EXTRA "Prepare binutils for static build"
>>           CT_DoExecLog ALL make ${JOBSFLAGS} configure-host
>>       fi
>> -- 
>> 2.0.1
>>
Currently, this patch wouldn't help me. I looked at my system in detail 
and realized, that unfortunately I don't have static libraries for lots 
of dependencies and have to compile everything dynamically. When I 
switch off "static toolchain" I can build everything almost without a 
problem. Well - almost - because I had to patch ppl-0.10.2 (just like 
0.11.2 already done for std::ptrdiff_t)... in the end, there are at 
least two patches (another one for duma on mingw) and I'd like to 
contribute them, when I'm completely done with testing.

The question now regarding static toolchain is, if it's reasonable to 
pull some more static dependencies into the crosstool-ng, like flex, 
ncurses (for gdb) and probably some other?

However, thank you very much for your help and this important tool,
Filipp

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