From: Douglas RAILLARD Date: Sun, 6 Sep 2015 15:48:19 +0000 (+0200) Subject: elf2flt: fix build when LTO is enabled X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dab6765150e0eb5016869f3c0c0e0047745560e9;p=buildroot.git elf2flt: fix build when LTO is enabled Signed-off-by: Douglas RAILLARD Reviewed-by: "Yann E. MORIN" Signed-off-by: Thomas Petazzoni --- diff --git a/package/elf2flt/elf2flt.mk b/package/elf2flt/elf2flt.mk index 3fcada42ea..bec270b5be 100644 --- a/package/elf2flt/elf2flt.mk +++ b/package/elf2flt/elf2flt.mk @@ -21,6 +21,12 @@ HOST_ELF2FLT_CONF_OPTS = \ --with-libiberty=$(HOST_BINUTILS_DIR)/libiberty/libiberty.a \ --target=$(GNU_TARGET_NAME) -HOST_ELF2FLT_CONF_ENV = LIBS=-lz +HOST_ELF2FLT_LIBS = -lz + +ifeq ($(BR2_GCC_ENABLE_LTO),y) +HOST_ELF2FLT_LIBS += -ldl +endif + +HOST_ELF2FLT_CONF_ENV = LIBS="$(HOST_ELF2FLT_LIBS)" $(eval $(host-autotools-package))