Explorar o código

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>
Ben Wolsieffer hai 10 meses
pai
achega
d75e29c9b2
Modificáronse 2 ficheiros con 7 adicións e 0 borrados
  1. 1 0
      arch/Config.in.arm
  2. 6 0
      package/Makefile.in

+ 1 - 0
arch/Config.in.arm

@@ -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

+ 6 - 0
package/Makefile.in

@@ -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.