[coreboot] Patch set updated for coreboot: 1771098 inteltool: fix Makefile
Stefan Tauner (stefan.tauner@gmx.at)
gerrit at coreboot.org
Fri Oct 12 10:41:35 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
-gerrit
commit 1771098e2837083f3ecf5d0263ff567ccb223a3d
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
redirect both streams (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
dep:
@$(CC) $(CFLAGS) -MM *.c > .dependencies
+define LIBPCI_TEST
+/* 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;
+}
+endef
+export LIBPCI_TEST
+
pciutils:
@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