arch/arm: add support for FDPIC

Linux on ARM supports FDPIC binaries intended for use on no-MMU
systems. This patch enables support for building a toolchain that
produces FDPIC binaries, only for ARMv7-M platforms, for which FDPIC
binaries are relevant.

The target name for a FDPIC toolchain must be
arm-<vendor>-uclinuxfdpiceabi, which doesn't follow the standard
format and requires a special case.

Signed-off-by: Ben Wolsieffer <Ben.Wolsieffer@hefring.com>
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Ben Wolsieffer 2024-09-29 22:14:54 +02:00 committed by Thomas Petazzoni
parent a6b364c2e3
commit d75e29c9b2
2 changed files with 7 additions and 0 deletions

View file

@ -89,6 +89,7 @@ config BR2_ARM_CPU_ARMV7A
config BR2_ARM_CPU_ARMV7M
bool
select BR2_ARCH_HAS_FDPIC_SUPPORT
config BR2_ARM_CPU_ARMV8A
bool

View file

@ -39,7 +39,13 @@ $(error BR2_TOOLCHAIN_BUILDROOT_VENDOR cannot be 'unknown'. \
endif
# Compute GNU_TARGET_NAME
# FDPIC on ARM requires a special target name: it has no OS field and must
# use the suffix -uclinuxfdpiceabi.
ifeq ($(BR2_arm)$(BR2_armeb):$(BR2_BINFMT_FDPIC),y:y)
GNU_TARGET_NAME = $(ARCH)-$(TARGET_VENDOR)-uclinuxfdpiceabi
else
GNU_TARGET_NAME = $(ARCH)-$(TARGET_VENDOR)-$(TARGET_OS)-$(LIBC)$(ABI)
endif
# FLAT binary format needs uclinux, except RISC-V which needs the
# regular linux name.