[Buildroot] [PATCH] autossh: honour LDFLAGS

Waldemar Brodkorb wbx at openadk.org
Sun Dec 4 12:06:37 UTC 2016


Hi Max,
Max Filippov wrote,

> 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 for the patch, I tried it.
But unforunately it breaks other applications as busybox init.
Not startup possible in Qemu to test the smaller autossh.

best regards
 Waldemar



More information about the buildroot mailing list