[openwrt/openwrt] readline: add $(FPIC) to LDFLAGS
LEDE Commits
lede-commits at lists.infradead.org
Mon Jan 12 15:25:41 PST 2026
hauke pushed a commit to openwrt/openwrt.git, branch openwrt-25.12:
https://git.openwrt.org/33ef80f2c6b9b80d5acfcf8023ef39e7ac11469f
commit 33ef80f2c6b9b80d5acfcf8023ef39e7ac11469f
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>
(cherry picked from commit 4ff0f496a4204b01991bcc804217da9fc2e8bb49)
---
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 70e96699ee..c332bf6554 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