From b41af4ba44560ad0b2997c9a592fcd30bd0a91d0 Mon Sep 17 00:00:00 2001 From: Juan Quintela Date: Mon, 27 Jul 2009 16:13:20 +0200 Subject: [PATCH] simplify fdt libs selection Signed-off-by: Juan Quintela Signed-off-by: Anthony Liguori --- Makefile.target | 4 ---- configure | 9 +++++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Makefile.target b/Makefile.target index 560cc0cbbf..68fcd11448 100644 --- a/Makefile.target +++ b/Makefile.target @@ -514,9 +514,7 @@ CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE endif obj-ppc-$(CONFIG_FDT) += device_tree.o -ifdef FDT_LIBS LIBS+= $(FDT_LIBS) -endif obj-mips-y = mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o obj-mips-y += mips_timer.o mips_int.o dma.o vga.o serial.o i8254.o i8259.o rc4030.o @@ -542,9 +540,7 @@ obj-microblaze-y += xilinx_ethlite.o obj-microblaze-y += pflash_cfi02.o obj-microblaze-$(CONFIG_FDT) += device_tree.o -ifdef FDT_LIBS LIBS+= $(FDT_LIBS) -endif # Boards obj-cris-y = cris_pic_cpu.o etraxfs.o axis_dev88.o diff --git a/configure b/configure index 3c63c0d5cc..b64effcfb3 100755 --- a/configure +++ b/configure @@ -1257,11 +1257,12 @@ fi ########################################## # fdt probe if test "$fdt" = "yes" ; then - fdt=no - cat > $TMPC << EOF + fdt=no + fdt_libs="-lfdt" + cat > $TMPC << EOF int main(void) { return 0; } EOF - if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $TMPC -lfdt 2> /dev/null > /dev/null ; then + if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $TMPC $fdt_libs 2> /dev/null > /dev/null ; then fdt=yes fi fi @@ -1711,7 +1712,7 @@ fi if test "$fdt" = "yes" ; then echo "CONFIG_FDT=y" >> $config_host_mak echo "#define CONFIG_FDT 1" >> $config_host_h - echo "FDT_LIBS=-lfdt" >> $config_host_mak + echo "FDT_LIBS=$fdt_libs" >> $config_host_mak fi # XXX: suppress that