From patchwork Sun Oct 17 16:37:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: update superiotool support for FreeBSD Date: Sun, 17 Oct 2010 16:37:27 -0000 From: Idwer Vollering X-Patchwork-Id: 2128 Message-Id: To: coreboot@coreboot.org Update support for FreeBSD. Signed-off-by: Idwer Vollering --- FreeBSD support already existed but doesn't compile without errors on my fbsd 8.1 machine: $ gmake gcc -O2 -Wall -Werror -Wstrict-prototypes -Wundef -Wstrict-aliasing -Werror-implicit-function-declaration -ansi -pedantic -D'SUPERIOTOOL_VERSION="5728"' -DPCI_SUPPORT -c -o superiotool.o superiotool.c In file included from superiotool.c:24: superiotool.h:41:21: error: pci/pci.h: No such file or directory superiotool.c: In function 'main': superiotool.c:302: error: implicit declaration of function 'pci_alloc' cc1: warnings being treated as errors superiotool.c:302: warning: assignment makes pointer from integer without a cast superiotool.c:303: error: implicit declaration of function 'pci_init' superiotool.c:304: error: implicit declaration of function 'pci_scan_bus' gmake: *** [superiotool.o] Error 1 Index: Makefile =================================================================== --- Makefile (revision 5954) +++ Makefile (working copy) @@ -39,6 +39,13 @@ ifeq ($(OS_ARCH), Darwin) LIBS = -framework IOKit -framework DirectIO -lpci -lz endif +ifeq ($(OS_ARCH), FreeBSD) +CFLAGS = -O2 -Wall -Werror -Wstrict-prototypes -Wundef -Wstrict-aliasing \ + -Werror-implicit-function-declaration $(SVNDEF) \ + -I/usr/local/include +LDFLAGS += -L/usr/local/lib +LIBS = -lz +endif # Support for PCI-attached "Super I/Os" (e.g. in VIA VT82686A/B). CONFIG_PCI = yes