From ceff8dbaa554ed543ec1c09ee8e2a76f40a0415c Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Sun, 29 Sep 2024 22:14:55 +0200 Subject: [PATCH] boot/uboot: pass -mno-fdpic if FDPIC is enabled If the FDPIC ABI is enabled by default in the toolchain, it must be explicitly disabled when building U-Boot. Signed-off-by: Ben Wolsieffer Signed-off-by: Waldemar Brodkorb Signed-off-by: Dario Binacchi Signed-off-by: Thomas Petazzoni --- boot/uboot/uboot.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk index ab534a8b3a..d8faef648f 100644 --- a/boot/uboot/uboot.mk +++ b/boot/uboot/uboot.mk @@ -172,6 +172,11 @@ UBOOT_MAKE_OPTS += \ HOSTLDFLAGS="$(HOST_LDFLAGS)" \ $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS)) +# Disable FDPIC if enabled by default in toolchain +ifeq ($(BR2_BINFMT_FDPIC),y) +UBOOT_MAKE_OPTS += KCFLAGS=-mno-fdpic +endif + ifeq ($(BR2_TARGET_UBOOT_NEEDS_ATF_BL31),y) UBOOT_DEPENDENCIES += arm-trusted-firmware ifeq ($(BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF),y)