All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Neuschäfer via buildroot" <buildroot@buildroot.org>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: "J. Neuschäfer" <j.neuschaefer@gmx.net>,
	"Yann E. MORIN" <yann.morin.1998@free.fr>,
	"J. Neuschäfer via buildroot" <buildroot@buildroot.org>
Subject: Re: [Buildroot] [PATCH v5] Config.in: ban textrels on musl toolchains
Date: Mon, 5 Aug 2024 00:31:46 +0200	[thread overview]
Message-ID: <ZrABUhTs_V4enewk@probook> (raw)
In-Reply-To: <20240731000359.270740ba@windsurf>

On Wed, Jul 31, 2024 at 12:03:59AM +0200, Thomas Petazzoni wrote:
> Hello J,
>
> On Fri, 19 Jul 2024 17:27:19 +0200
> J. Neuschäfer via buildroot <buildroot@buildroot.org> wrote:
>
> > +# See also: https://www.openwall.com/lists/musl/2020/09/25/4
> > +ifeq ($(BR2_TOOLCHAIN_USES_MUSL):$(BR2_STATIC_LIBS),y:)
> > +TARGET_LDFLAGS += -Wl,-z,text
> > +endif
>
> Unfortunately, this change is breaking the build of gnu-efi:
>
>   http://autobuild.buildroot.net/results/e3d/e3dec7e0323a3fcb07269b3f9e73becaafeedecd/build-end.log
>
> It seems like gnu-efi uses $(TARGET_LDFLAGS) directly as arguments to
> the linker, not as arguments to gcc-used-as-a-linker, and the linker
> doesn't know about -Wl,-z,-text.

Hm, this is an interesting case, because AFAIU gnu-efi is a bare-metal
library (more or less), so it won't be using the musl ld.so anyway.
So it would be completely reasonable to strip out the -z text here.

> So, either we to "-z text" which I believe is understood by both gcc
> and ld, or we somehow fix gnu-efi.

I think I prefer the first option (with an explanatory comment). I'll
send a patch when I get around to it.


-- jn
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2024-08-04 22:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-19 15:27 [Buildroot] [PATCH v5] Config.in: ban textrels on musl toolchains J. Neuschäfer via buildroot
2024-07-22 16:31 ` Thomas Petazzoni via buildroot
2024-07-30 22:03 ` Thomas Petazzoni via buildroot
2024-08-04 22:31   ` J. Neuschäfer via buildroot [this message]
2024-08-13  9:09 ` yann.morin
2024-08-23 10:21   ` J. Neuschäfer via buildroot
2024-08-24 19:36   ` J. Neuschäfer via buildroot

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=ZrABUhTs_V4enewk@probook \
    --to=buildroot@buildroot.org \
    --cc=j.neuschaefer@gmx.net \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=yann.morin.1998@free.fr \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.