diff mbox series

[v3,3/8] arch: make FDPIC dependent on toolchain support

Message ID 20220819151734.926106-4-Ben.Wolsieffer@hefring.com
State Deferred
Headers show
Series Add support for FDPIC binaries on ARM | expand

Commit Message

Ben Wolsieffer Aug. 19, 2022, 3:17 p.m. UTC
FDPIC support on ARM requires a certain target name, and therefore is
only currently available with the Buildroot toolchain. In addition,
only uClibc-ng supports FDPIC on ARM at the moment.

This may need to become more complicated if we end up in a situation
where each libc supports FDPIC on a different set of architectures.

Signed-off-by: Ben Wolsieffer <Ben.Wolsieffer@hefring.com>
---
 arch/Config.in      | 1 +
 toolchain/Config.in | 4 ++++
 2 files changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/arch/Config.in b/arch/Config.in
index 0ee7077df6..4cd58041a4 100644
--- a/arch/Config.in
+++ b/arch/Config.in
@@ -435,6 +435,7 @@  config BR2_BINFMT_ELF
 config BR2_BINFMT_FDPIC
 	bool "FDPIC"
 	depends on BR2_ARCH_HAS_FDPIC_SUPPORT
+	depends on BR2_TOOLCHAIN_SUPPORTS_FDPIC
 	select BR2_BINFMT_SUPPORTS_SHARED
 	help
 	  ELF FDPIC binaries are based on ELF, but allow the individual
diff --git a/toolchain/Config.in b/toolchain/Config.in
index fbc2f28553..be72350c06 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -49,6 +49,7 @@  choice
 config BR2_TOOLCHAIN_BUILDROOT
 	bool "Buildroot toolchain"
 	depends on BR2_ARCH_HAS_TOOLCHAIN_BUILDROOT
+	select BR2_TOOLCHAIN_SUPPORTS_FDPIC if BR2_TOOLCHAIN_USES_UCLIBC
 
 config BR2_TOOLCHAIN_EXTERNAL
 	bool "External toolchain"
@@ -269,6 +270,9 @@  config BR2_TOOLCHAIN_HAS_OPENMP
 config BR2_TOOLCHAIN_SUPPORTS_PIE
 	bool
 
+config BR2_TOOLCHAIN_SUPPORTS_FDPIC
+	bool
+
 config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
 	bool "Copy gconv libraries"
 	depends on BR2_TOOLCHAIN_USES_GLIBC