buildroot.busybox.net archive mirror
 help / color / mirror / Atom feed
* [Buildroot] [git commit branch/2021.05.x] Config.in: add BR2_PIC_PIE_ARCH_SUPPORTS hidden option
@ 2021-08-05 10:56 Peter Korsgaard
  0 siblings, 0 replies; only message in thread
From: Peter Korsgaard @ 2021-08-05 10:56 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=0f725b8f6c2853468b896d767ca4a98abe6691b0
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2021.05.x

The nios2 architecture is already excluded from PIC/PIE due to issues,
and we're going to also exclude Microblaze, so let's introduce a
BR2_PIC_PIE_ARCH_SUPPORTS hidden boolean to facilitate adding this new
architecture exclusion.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 70dd4bd156bac2bde07751dc3c4d5da9b14d7d7c)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 Config.in | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/Config.in b/Config.in
index d9be677c21..be0da30c63 100644
--- a/Config.in
+++ b/Config.in
@@ -713,11 +713,16 @@ endmenu
 
 comment "Security Hardening Options"
 
-config BR2_PIC_PIE
-	bool "Build code with PIC/PIE"
+config BR2_PIC_PIE_ARCH_SUPPORTS
+	bool
 	default y
 	# Nios2 toolchains produce non working binaries with -fPIC
 	depends on !BR2_nios2
+
+config BR2_PIC_PIE
+	bool "Build code with PIC/PIE"
+	default y
+	depends on BR2_PIC_PIE_ARCH_SUPPORTS
 	depends on BR2_SHARED_LIBS
 	depends on BR2_TOOLCHAIN_SUPPORTS_PIE
 	help
@@ -725,7 +730,7 @@ config BR2_PIC_PIE
 	  Position-Independent Executables (PIE).
 
 comment "PIC/PIE needs a toolchain w/ PIE"
-	depends on !BR2_nios2
+	depends on BR2_PIC_PIE_ARCH_SUPPORTS
 	depends on BR2_SHARED_LIBS
 	depends on !BR2_TOOLCHAIN_SUPPORTS_PIE
 
@@ -816,7 +821,7 @@ config BR2_RELRO_PARTIAL
 
 config BR2_RELRO_FULL
 	bool "Full"
-	depends on !BR2_nios2 # BR2_PIC_PIE
+	depends on BR2_PIC_PIE_ARCH_SUPPORTS
 	depends on BR2_TOOLCHAIN_SUPPORTS_PIE
 	select BR2_PIC_PIE
 	help
@@ -825,7 +830,7 @@ config BR2_RELRO_FULL
 	  program loading, i.e every time an executable is started.
 
 comment "RELRO Full needs a toolchain w/ PIE"
-	depends on !BR2_nios2
+	depends on BR2_PIC_PIE_ARCH_SUPPORTS
 	depends on !BR2_TOOLCHAIN_SUPPORTS_PIE
 
 endchoice
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-05 11:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-05 10:56 [Buildroot] [git commit branch/2021.05.x] Config.in: add BR2_PIC_PIE_ARCH_SUPPORTS hidden option Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).