summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnari Jalakas2026-01-08 10:11:47 +0000
committerHauke Mehrtens2026-01-11 17:49:55 +0000
commit4ff0f496a4204b01991bcc804217da9fc2e8bb49 (patch)
treec53fa1eb62ec8a9c6557aa1588a36627363cc981
parentee60b65643984509363a2157d7df763485995d46 (diff)
downloadopenwrt-4ff0f496a4204b01991bcc804217da9fc2e8bb49.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>
-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 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