Commit da4699ad authored by Andre Przywara's avatar Andre Przywara Committed by Will Deacon
Browse files

kvmtool: Makefile: replace kernel libfdt source with system library



kvmtool used the in-kernel version of the device tree handling
library. Now that we are a proper userland tool, use the system's
library for that purpose. Actually this seems to fix some
long-standing warning generated by the Linux copy.
Also fix up a bogus x86 warning (no FDT needed here).

Signed-off-by: Andre Przywara's avatarAndre Przywara <andre.przywara@arm.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent 7e66b121
......@@ -198,12 +198,10 @@ endif
# libfdt support
LIBFDT_SRC = fdt.o fdt_ro.o fdt_wip.o fdt_sw.o fdt_rw.o fdt_strerror.o
LIBFDT_OBJS = $(patsubst %,../../scripts/dtc/libfdt/%,$(LIBFDT_SRC))
ifeq (y,$(ARCH_WANT_LIBFDT))
DEFINES += -DCONFIG_HAS_LIBFDT
OTHEROBJS += $(LIBFDT_OBJS)
LIBS_DYNOPT += -lfdt
LIBS_STATOPT += -lfdt
endif
###
......@@ -366,16 +364,6 @@ builtin-help.d: $(KVM_INCLUDE)/common-cmds.h
$(OBJS):
# This rule relaxes the -Werror on libfdt, since for now it still has
# a bunch of warnings. :(
../../scripts/dtc/libfdt/%.o: ../../scripts/dtc/libfdt/%.c
ifeq ($(C),1)
$(E) " CHECK " $@
$(Q) $(CHECK) -c $(CFLAGS_EASYGOING) $< -o $@
endif
$(E) " CC " $@
$(Q) $(CC) -c $(CFLAGS_EASYGOING) $< -o $@
util/rbtree.static.o util/rbtree.o: util/rbtree.c
ifeq ($(C),1)
$(E) " CHECK " $@
......
#ifndef KVM__FDT_H
#define KVM__FDT_H
#include "libfdt.h"
#ifdef CONFIG_HAS_LIBFDT
#include <libfdt.h>
#endif
#include <linux/types.h>
......
......@@ -15,10 +15,10 @@
#include "kvm/kvm-cpu.h"
#include "kvm/util.h"
#include "kvm/term.h"
#include "libfdt.h"
#include "spapr.h"
#include <libfdt.h>
#include <stdio.h>
#include <assert.h>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment