[coreboot] Patch set updated for coreboot: 439fbb4 inteltool: fix Makefile

Stefan Tauner (stefan.tauner@gmx.at) gerrit at coreboot.org
Fri Oct 12 10:37:12 CEST 2012

Stefan Tauner (stefan.tauner at gmx.at) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1573


commit 439fbb4d32066294281046436813a10968fc6432
Author: Stefan Tauner <stefan.tauner at gmx.at>
Date:   Fri Oct 12 10:36:49 2012 +0200

    inteltool: fix Makefile
    Note the changed redirection in the CC call. &> is a bashism to reditect
    both, stdout and stderr, but with other shells this introduces a race condition
    with the rm command afterwards, because the compiler execution is done
    in the background/in parallel. This patch also adds the verbatim variable
    method to define and export test code and the actual libpci test as it
    is used in flashrom.
    Change-Id: I08516494828c9f7af168f954f2df027372657867
    Signed-off-by: Stefan Tauner <stefan.tauner at gmx.at>
 util/inteltool/Makefile | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/util/inteltool/Makefile b/util/inteltool/Makefile
index d754005..6c94460 100644
--- a/util/inteltool/Makefile
+++ b/util/inteltool/Makefile
@@ -53,13 +53,25 @@ distclean: clean
 	@$(CC) $(CFLAGS) -MM *.c > .dependencies
+/* Avoid a failing test due to libpci header symbol shadowing breakage */
+#define index shadow_workaround_index
+#include <pci/pci.h>
+struct pci_access *pacc;
+int main(int argc, char **argv)
+	(void) argc;
+	(void) argv;
+	pacc = pci_alloc();
+	return 0;
 	@printf "\nChecking for pciutils and zlib... "
-	@$(shell ( printf "#include <pci/pci.h>\n";		\
-		   printf "struct pci_access *pacc;\n";		\
-		   printf "int main(int argc, char **argv)\n";	\
-		   printf "{ pacc = pci_alloc(); return 0; }\n"; ) > .test.c )
-	@$(CC) $(CFLAGS) .test.c -o .test $(LDFLAGS) &>/dev/null &&	  \
+	@echo "$$LIBPCI_TEST" > .test.c
+	@$(CC) $(CFLAGS) .test.c -o .test $(LDFLAGS) >/dev/null 2>&1 &&	  \
 		printf "found.\n" || ( printf "not found.\n\n"; 	  \
 		printf "Please install pciutils-devel and zlib-devel.\n"; \
 		printf "See README for more information.\n\n";		  \

More information about the coreboot mailing list