Commit b41af4ba44560ad0b2997c9a592fcd30bd0a91d0
Committed by
Anthony Liguori
1 parent
4baae0ac
simplify fdt libs selection
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing
2 changed files
with
5 additions
and
8 deletions
Makefile.target
... | ... | @@ -514,9 +514,7 @@ CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE |
514 | 514 | endif |
515 | 515 | |
516 | 516 | obj-ppc-$(CONFIG_FDT) += device_tree.o |
517 | -ifdef FDT_LIBS | |
518 | 517 | LIBS+= $(FDT_LIBS) |
519 | -endif | |
520 | 518 | |
521 | 519 | obj-mips-y = mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o |
522 | 520 | 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 |
542 | 540 | obj-microblaze-y += pflash_cfi02.o |
543 | 541 | |
544 | 542 | obj-microblaze-$(CONFIG_FDT) += device_tree.o |
545 | -ifdef FDT_LIBS | |
546 | 543 | LIBS+= $(FDT_LIBS) |
547 | -endif | |
548 | 544 | |
549 | 545 | # Boards |
550 | 546 | obj-cris-y = cris_pic_cpu.o etraxfs.o axis_dev88.o | ... | ... |
configure
... | ... | @@ -1257,11 +1257,12 @@ fi |
1257 | 1257 | ########################################## |
1258 | 1258 | # fdt probe |
1259 | 1259 | if test "$fdt" = "yes" ; then |
1260 | - fdt=no | |
1261 | - cat > $TMPC << EOF | |
1260 | + fdt=no | |
1261 | + fdt_libs="-lfdt" | |
1262 | + cat > $TMPC << EOF | |
1262 | 1263 | int main(void) { return 0; } |
1263 | 1264 | EOF |
1264 | - if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $TMPC -lfdt 2> /dev/null > /dev/null ; then | |
1265 | + if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $TMPC $fdt_libs 2> /dev/null > /dev/null ; then | |
1265 | 1266 | fdt=yes |
1266 | 1267 | fi |
1267 | 1268 | fi |
... | ... | @@ -1711,7 +1712,7 @@ fi |
1711 | 1712 | if test "$fdt" = "yes" ; then |
1712 | 1713 | echo "CONFIG_FDT=y" >> $config_host_mak |
1713 | 1714 | echo "#define CONFIG_FDT 1" >> $config_host_h |
1714 | - echo "FDT_LIBS=-lfdt" >> $config_host_mak | |
1715 | + echo "FDT_LIBS=$fdt_libs" >> $config_host_mak | |
1715 | 1716 | fi |
1716 | 1717 | |
1717 | 1718 | # XXX: suppress that | ... | ... |