[Buildroot] [PATCH] autossh: honour LDFLAGS

Max Filippov jcmvbkbc at gmail.com
Sat Dec 3 02:12:32 UTC 2016


On Thu, Dec 1, 2016 at 9:25 PM, Waldemar Brodkorb <wbx at openadk.org> wrote:
>> Hello,
>>
>> TL;DR: -static is good, order of objects in libc.a is important.
>
> Thanks for the very detailed analysis.
> Do you have any idea how we could restore the old order and keep
> the binaries smaller?

One ugly solution could be putting __uClibc-main.os before both libc-tls.os
and init.os, something like the following:

diff --git a/libc/misc/internals/Makefile.in b/libc/misc/internals/Makefile.in
index ae094ee..d2400d2 100644
--- a/libc/misc/internals/Makefile.in
+++ b/libc/misc/internals/Makefile.in
@@ -25,7 +25,7 @@ libc-shared-y += $(MISC_INTERNALS_OUT)/__uClibc_main.oS
 else
 libc-shared-y += $(MISC_INTERNALS_OUT)/__uClibc_main.os
 endif
-libc-static-y += $(MISC_INTERNALS_OUT)/__uClibc_main.o
+libc-static-y := $(MISC_INTERNALS_OUT)/__uClibc_main.o $(libc-static-y)
 libc-static-$(UCLIBC_FORMAT_FLAT_SEP_DATA) += \
   $(MISC_INTERNALS_OUT)/shared_flat_initfini.o \
   $(MISC_INTERNALS_OUT)/shared_flat_add_library.o

-- 
Thanks.
-- Max



More information about the buildroot mailing list