Andrey Korolyov (andrey@xdel.ru) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12830
-gerrit
commit 9619403513e3b66ef255873803f549d4c2e3df55 Author: Andrey Korolyov andrey@xdel.ru Date: Mon Jan 4 02:20:04 2016 +0300
superiotool: fix out-of-box NetBSD Makefile support
Add NetBSD-specific locations under pkg/ and missing linker flag for libpciutils.
Change-Id: I812817a374aaba561b28d8a22f20d238c9dca32b Signed-off-by: Andrey Korolyov andrey@xdel.ru --- util/superiotool/Makefile | 10 ++++++++-- util/superiotool/superiotool.h | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/util/superiotool/Makefile b/util/superiotool/Makefile index cf487dc..0e69176 100644 --- a/util/superiotool/Makefile +++ b/util/superiotool/Makefile @@ -43,7 +43,9 @@ LDFLAGS += -L/usr/local/lib LIBS = -lz endif ifeq ($(OS_ARCH), NetBSD) -LDFLAGS = -l$(shell uname -p) +CFLAGS += -I/usr/pkg/include +LDFLAGS += -L/usr/pkg/lib -Wl,-rpath-link,/usr/pkg/lib +LIBS = -lz -l$(shell uname -p) endif
# Support for PCI-attached "Super I/Os" (e.g. in VIA VT82686A/B). @@ -51,8 +53,12 @@ CONFIG_PCI = yes
ifeq ($(CONFIG_PCI), yes) CFLAGS += -DPCI_SUPPORT -LIBS += -lpci OBJS += pci.o via.o amd.o + ifeq ($(OS_ARCH),NetBSD) + LIBS += -lpciutils -lpci + else + LIBS += -lpci + endif endif
all: $(PROGRAM) diff --git a/util/superiotool/superiotool.h b/util/superiotool/superiotool.h index cc87a0f..443cc07 100644 --- a/util/superiotool/superiotool.h +++ b/util/superiotool/superiotool.h @@ -34,7 +34,11 @@ #endif
#ifdef PCI_SUPPORT +# ifdef __NetBSD__ +#include <pciutils/pci.h> +# else #include <pci/pci.h> +# endif #endif
#if defined(__FreeBSD__)