Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Waldemar Brodkorb <wbx@openadk.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] autossh: honour LDFLAGS
Date: Sun, 4 Dec 2016 13:06:37 +0100	[thread overview]
Message-ID: <20161204120637.GE14207@waldemar-brodkorb.de> (raw)
In-Reply-To: <CAMo8BfLxFxaRGAsgAX+xqorPfJAH0ZTAVmpUfFb3mC_wHbKPMg@mail.gmail.com>

Hi Max,
Max Filippov wrote,

> On Thu, Dec 1, 2016 at 9:25 PM, Waldemar Brodkorb <wbx@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

  reply	other threads:[~2016-12-04 12:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-25 18:00 [Buildroot] [PATCH] autossh: honour LDFLAGS Waldemar Brodkorb
2016-11-28 21:28 ` Thomas Petazzoni
2016-11-28 23:22   ` Max Filippov
2016-11-29  4:16   ` Waldemar Brodkorb
2016-11-29  8:43     ` Thomas Petazzoni
2016-11-29 22:50       ` Max Filippov
2016-11-30  5:00         ` Waldemar Brodkorb
2016-12-01 18:20           ` Waldemar Brodkorb
2016-12-02  5:12           ` Max Filippov
2016-12-02  5:25             ` Waldemar Brodkorb
2016-12-03  2:12               ` Max Filippov
2016-12-04 12:06                 ` Waldemar Brodkorb [this message]
2016-12-05  3:24                   ` Max Filippov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161204120637.GE14207@waldemar-brodkorb.de \
    --to=wbx@openadk.org \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox