[flashrom] [PATCH 1/2] Makefile: fix order of libraries.

Stefan Tauner stefan.tauner at student.tuwien.ac.at
Wed Dec 26 20:18:28 CET 2012


FEATURE_LIBS needs to come *after* PCILIBS in case ZLIB is needed by it.

Also, mute the warnings of trying to use pcilib without zlib available.
---
If you see any reason this could be wrong, please speak up soon since this
seems to be too simple to not commit it :)

Signed-off-by: Stefan Tauner <stefan.tauner at student.tuwien.ac.at>
---
 Makefile |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index f3cb07a..a8d0ad8 100644
--- a/Makefile
+++ b/Makefile
@@ -614,7 +614,7 @@ ifeq ($(ARCH), x86)
 endif
 
 $(PROGRAM)$(EXEC_SUFFIX): $(OBJS)
-	$(CC) $(LDFLAGS) -o $(PROGRAM)$(EXEC_SUFFIX) $(OBJS) $(FEATURE_LIBS) $(LIBS) $(PCILIBS) $(USBLIBS)
+	$(CC) $(LDFLAGS) -o $(PROGRAM)$(EXEC_SUFFIX) $(OBJS) $(LIBS) $(PCILIBS) $(USBLIBS) $(FEATURE_LIBS)
 
 libflashrom.a: $(LIBFLASHROM_OBJS)
 	$(AR) rcs $@ $^
@@ -710,7 +710,7 @@ ifeq ($(CHECK_LIBPCI), yes)
 		echo "See README for more information."; echo;			\
 		rm -f .test.c .test.o; exit 1)
 	@printf "Checking if libpci is present and sufficient... "
-	@$(CC) $(LDFLAGS) .test.o -o .test$(EXEC_SUFFIX) $(LIBS) $(PCILIBS) >/dev/null &&		\
+	@$(CC) $(LDFLAGS) .test.o -o .test$(EXEC_SUFFIX) $(LIBS) $(PCILIBS) >/dev/null 2>&1 &&		\
 		echo "yes." || ( echo "no.";							\
 		printf "Checking if libz+libpci are present and sufficient...";	\
 		$(CC) $(LDFLAGS) .test.o -o .test$(EXEC_SUFFIX) $(LIBS) $(PCILIBS) -lz >/dev/null &&	\
-- 
Kind regards, Stefan Tauner





More information about the flashrom mailing list