Explorar el Código

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 <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/21455
Signed-off-by: Hauke Mehrtens <[email protected]>
Anari Jalakas hace 2 semanas
padre
commit
4ff0f496a4
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      package/libs/readline/Makefile

+ 4 - 1
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