[coreboot-gerrit] New patch to review for coreboot: superiotool: fix out-of-box NetBSD Makefile support

Andrey Korolyov (andrey@xdel.ru) gerrit at coreboot.org
Tue Jan 5 11:30:59 CET 2016


Andrey Korolyov (andrey at xdel.ru) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12830

-gerrit

commit 81dae146ed08e1d02aae80b917ed8952afec07cf
Author: Andrey Korolyov <andrey at xdel.ru>
Date:   Mon Jan 4 02:20:04 2016 +0300

    superiotool: fix out-of-box NetBSD Makefile support
    
    Change-Id: I812817a374aaba561b28d8a22f20d238c9dca32b
    Signed-off-by: Andrey Korolyov <andrey at xdel.ru>
---
 util/superiotool/Makefile | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/util/superiotool/Makefile b/util/superiotool/Makefile
index cf487dc..6c20d03 100644
--- a/util/superiotool/Makefile
+++ b/util/superiotool/Makefile
@@ -43,16 +43,25 @@ 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).
 CONFIG_PCI = yes
 
 ifeq ($(CONFIG_PCI), yes)
-CFLAGS += -DPCI_SUPPORT
-LIBS += -lpci
-OBJS += pci.o via.o amd.o
+	ifeq ($(OS_ARCH),NetBSD)
+	CFLAGS += -DPCI_SUPPORT
+	LIBS += -lpciutils -lpci
+	OBJS += pci.o via.o amd.o
+	PCIUTIL_HACK := $(shell sed -i 's,<pci/pci.h>,<pciutils/pci.h>,g' *.c *.h)
+	else
+	CFLAGS += -DPCI_SUPPORT
+	LIBS += -lpci
+	OBJS += pci.o via.o amd.o
+	endif
 endif
 
 all: $(PROGRAM)



More information about the coreboot-gerrit mailing list