elf2flt: fix build when LTO is enabled

Signed-off-by: Douglas RAILLARD <public.douglas.raillard@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
Douglas RAILLARD 2015-09-06 17:48:19 +02:00 committed by Thomas Petazzoni
parent 7d7c1be4fc
commit dab6765150

View File

@ -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))