As requested in IRC, a small patch for superiotool's Makefile has been
attached, for more details please take a look at the patch itself.

-- 
Regards,
Christian Ruppert
Role: Gentoo Linux developer, Bugzilla administrator and Infrastructure
member
Fingerprint: EEB1 C341 7C84 B274 6C59  F243 5EAB 0C62 B427 ABC8
Minor cleanup

Append optimization flags and -Werror only if no user-specified CFLAGS have been
set.
Move the libz dependency into the CONFIG_PCI statement as it's only needed when 
linking against static libpci.
Remove duplicate CFLAGS.

Signed-off-by: Christian Ruppert <[email protected]>

Index: Makefile
===================================================================
--- Makefile    (revision 6247)
+++ Makefile    (working copy)
@@ -29,25 +29,24 @@
 SVNDEF := -D'SUPERIOTOOL_VERSION="$(shell svnversion -cn . \
           | sed -e "s/.*://" -e "s/\([0-9]*\).*/\1/")"'
 
-CFLAGS += -O2 -Wall -Werror -Wstrict-prototypes -Wundef -Wstrict-aliasing \
-         -Werror-implicit-function-declaration -ansi -pedantic $(SVNDEF)
-LDFLAGS += -lz
+CFLAGS ?= -O2 -Werror
+CFLAGS += -Wall -Wstrict-prototypes -Wundef -Wstrict-aliasing \
+         -Werror-implicit-function-declaration -ansi $(SVNDEF)
 
 OBJS = superiotool.o ali.o fintek.o ite.o nsc.o nuvoton.o smsc.o winbond.o
 
 OS_ARCH = $(shell uname)
 ifeq ($(OS_ARCH), Darwin)
-LIBS = -framework IOKit -framework DirectIO -lpci -lz
+LIBS = -framework IOKit -framework DirectIO
 endif
 ifeq ($(OS_ARCH), FreeBSD)
-CFLAGS = -O2 -Wall -Werror -Wstrict-prototypes -Wundef -Wstrict-aliasing \
-         -Werror-implicit-function-declaration -ansi $(SVNDEF) \
-         -I/usr/local/include
+CFLAGS += -I/usr/local/include
 LDFLAGS += -L/usr/local/lib
-LIBS = -lz
+else
+CFLAGS += -pedantic
 endif
 ifeq ($(OS_ARCH), NetBSD)
-LDFLAGS = -l$(shell uname -p)
+LIBS = -l$(shell uname -p)
 endif
 
 # Support for PCI-attached "Super I/Os" (e.g. in VIA VT82686A/B).
@@ -55,7 +54,7 @@
 
 ifeq ($(CONFIG_PCI), yes)
 CFLAGS += -DPCI_SUPPORT
-LIBS += -lpci
+LIBS += -lpci -lz
 OBJS += pci.o via.o
 endif
 

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to