All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] toolchain: add hidden symbol for PIE support
Date: Mon, 11 Jul 2016 11:53:31 +0200	[thread overview]
Message-ID: <20160711115331.65c8e054@free-electrons.com> (raw)
In-Reply-To: <20160709112030.GA25741@waldemar-brodkorb.de>

Hello,

On Sat, 9 Jul 2016 13:20:30 +0200, Waldemar Brodkorb wrote:
> uClibc-ng does not support PIE for some architectures as
> arc and m68k. It isn't implemented in the static linking case, too.
> With musl toolchains you might have static PIE support with little
> patching of gcc. Static linking for GNU libc isn't enabled in
> buildroot. Fixup any package using special treatment of PIE.
> (grep -ir pie package/*/*.mk)
> 
> Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>

Thanks for doing this! One question below, though.

> +config BR2_TOOLCHAIN_SUPPORTS_PIE
> +	bool
> +	depends on !BR2_STATIC_LIBS && !BR2_arc && !BR2_m68k

Should this be:

	default y
	depends on !(BR2_STATIC_LIBS && BR2_TOOLCHAIN_USES_UCLIBC) &&
		!BR2_arc && !BR2_m68k

First, a "default y" otherwise I'm not sure the option is ever enabled.
And then, it's really only uClibc that doesn't support static PIE:

 * glibc doesn't do BR2_STATIC_LIBS=y builds, so it doesn't matter.

 * musl can support static PIE binaries, see the gcc patch I pointed to
   you recently about musl static PIE support.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2016-07-11  9:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-09 11:20 [Buildroot] [PATCH] toolchain: add hidden symbol for PIE support Waldemar Brodkorb
2016-07-11  9:53 ` Thomas Petazzoni [this message]
2016-07-11  9:54 ` Thomas Petazzoni

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=20160711115331.65c8e054@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --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 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.