From: Anari Jalakas Date: Thu, 8 Jan 2026 10:11:47 +0000 (+0200) Subject: readline: add $(FPIC) to LDFLAGS X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ff0f496a4204b01991bcc804217da9fc2e8bb49;p=thirdparty%2Fopenwrt.git 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 Link: https://github.com/openwrt/openwrt/pull/21455 Signed-off-by: Hauke Mehrtens --- diff --git a/package/libs/readline/Makefile b/package/libs/readline/Makefile index 7962cf6340b..a067a516c60 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