[openwrt/openwrt] readline: add $(FPIC) to LDFLAGS

LEDE Commits lede-commits at lists.infradead.org
Sun Jan 11 09:50:27 PST 2026


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4ff0f496a4204b01991bcc804217da9fc2e8bb49

commit 4ff0f496a4204b01991bcc804217da9fc2e8bb49
Author: Anari Jalakas <anari.jalakas at gmail.com>
AuthorDate: Thu Jan 8 12:11:47 2026 +0200

    readline: add $(FPIC) to LDFLAGS
    
    Ensure -fPIC is passed during the linking stage to fix LTO build
    failures (relocation errors) on MIPS and other architectures.
    
    Fixes: #20436
    Signed-off-by: Anari Jalakas <anari.jalakas at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/21455
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/libs/readline/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/package/libs/readline/Makefile b/package/libs/readline/Makefile
index 7962cf6340..a067a516c6 100644
--- a/package/libs/readline/Makefile
+++ b/package/libs/readline/Makefile
@@ -57,7 +57,10 @@ CONFIGURE_VARS += \
 	bash_cv_termcap_lib=libncursesw
 
 TARGET_CFLAGS += $(FPIC)
-HOST_CFLAGS += $(FPIC)
+TARGET_LDFLAGS += $(FPIC)
+
+HOST_CFLAGS += $(HOST_FPIC)
+HOST_LDFLAGS += $(HOST_FPIC)
 
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include




More information about the lede-commits mailing list