summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnari Jalakas2026-01-08 10:11:47 +0000
committerHauke Mehrtens2026-01-12 23:23:38 +0000
commit33ef80f2c6b9b80d5acfcf8023ef39e7ac11469f (patch)
treef429f6befe5d52b4831e74d767a89582074d7584
parentb413363b475a08a14ccb87dce22185d3af73c08e (diff)
downloadopenwrt-33ef80f2c6b9b80d5acfcf8023ef39e7ac11469f.tar.gz
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@gmail.com> Link: https://github.com/openwrt/openwrt/pull/21455 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit 4ff0f496a4204b01991bcc804217da9fc2e8bb49)
-rw-r--r--package/libs/readline/Makefile5
1 files changed, 4 insertions, 1 deletions
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