Message ID | 20240922092312.2061358-5-dario.binacchi@amarulasolutions.com |
---|---|
State | New |
Headers | show |
Series |
|
Related | show |
On Sun, 22 Sep 2024 11:23:07 +0200 Dario Binacchi <dario.binacchi@amarulasolutions.com> wrote: > The target name for a FDPIC toolchain must be > arm-<vendor>-uclinuxfdpiceabi, which doesn't follow the standard format > and requires a special case. > > According to the kernel help for CONFIG_BINFMT_ELF_FDPIC, "It is also > possible to run FDPIC ELF binaries on MMU linux," so FDPIC support is > available on all ARM platforms, not just no-MMU. but then I guess the tuple would not be arm-<vendor>-uclinuxfdpiceabi, but something with "linux" instead? Did you test this support for FDPIC on MMU systems? Unless it has been tested to be working, I believe I would prefer to allow FDPIC only on noMMU systems, for which it has been tested. Thanks! Thomas
diff --git a/arch/Config.in b/arch/Config.in index 52efe3aabda1..cd258b2530d8 100644 --- a/arch/Config.in +++ b/arch/Config.in @@ -39,6 +39,7 @@ config BR2_arceb config BR2_arm bool "ARM (little endian)" + select BR2_ARCH_HAS_FDPIC_SUPPORT # MMU support is set by the subarchitecture file, arch/Config.in.arm help ARM is a 32-bit reduced instruction set computer (RISC) diff --git a/package/Makefile.in b/package/Makefile.in index 808b71a93e99..829636900ba9 100644 --- a/package/Makefile.in +++ b/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.