On 13.06.2009 21:04, Joseph Smith wrote:
> [r...@localhost flashrom]# make
> make: Warning: File `Makefile' has modification time 1.3e+09 s in the
> future
>
> Checking for pciutils and zlib... not found.
>
> Please install pciutils-devel and zlib-devel.
> See README for more information.
>
> make: *** [pciutils] Error 1
>   

Turns out gcc was not installed.

No idea whether we really should check for a working gcc. Anyway, here's
a patch.

Signed-off-by: Carl-Daniel Hailfinger <[email protected]>

Index: flashrom-makefile_check_gcc/Makefile
===================================================================
--- flashrom-makefile_check_gcc/Makefile        (Revision 595)
+++ flashrom-makefile_check_gcc/Makefile        (Arbeitskopie)
@@ -80,7 +80,16 @@
 strip: $(PROGRAM)
        $(STRIP) $(STRIP_ARGS) $(PROGRAM)
 
-pciutils:
+compiler:
+       @echo; printf "Checking for a C compiler... "
+       @$(shell ( echo "int main(int argc, char **argv)"; \
+                  echo "{ return 0; }"; ) > .test.c )
+       @$(CC) $(CFLAGS) $(LDFLAGS) .test.c -o .test >/dev/null &&      \
+               echo "found." || ( echo "not found."; \
+               rm -f .test.c .test; exit 1)
+       @rm -f .test.c .test
+
+pciutils: compiler
        @echo; printf "Checking for pciutils and zlib... "
        @$(shell ( echo "#include <pci/pci.h>";            \
                   echo "struct pci_access *pacc;";        \
@@ -110,6 +119,6 @@
        @rm -rf $(EXPORTDIR)/flashrom-$(VERSION)
        @echo Created $(EXPORTDIR)/flashrom-$(VERSION).tar.gz
 
-.PHONY: all clean distclean dep pciutils export tarball
+.PHONY: all clean distclean dep compiler pciutils export tarball
 
 -include .dependencies


-- 
http://www.hailfinger.org/

Index: flashrom-makefile_check_gcc/Makefile
===================================================================
--- flashrom-makefile_check_gcc/Makefile        (Revision 595)
+++ flashrom-makefile_check_gcc/Makefile        (Arbeitskopie)
@@ -80,7 +80,16 @@
 strip: $(PROGRAM)
        $(STRIP) $(STRIP_ARGS) $(PROGRAM)
 
-pciutils:
+compiler:
+       @echo; printf "Checking for a C compiler... "
+       @$(shell ( echo "int main(int argc, char **argv)"; \
+                  echo "{ return 0; }"; ) > .test.c )
+       @$(CC) $(CFLAGS) $(LDFLAGS) .test.c -o .test >/dev/null &&      \
+               echo "found." || ( echo "not found."; \
+               rm -f .test.c .test; exit 1)
+       @rm -f .test.c .test
+
+pciutils: compiler
        @echo; printf "Checking for pciutils and zlib... "
        @$(shell ( echo "#include <pci/pci.h>";            \
                   echo "struct pci_access *pacc;";        \
@@ -110,6 +119,6 @@
        @rm -rf $(EXPORTDIR)/flashrom-$(VERSION)
        @echo Created $(EXPORTDIR)/flashrom-$(VERSION).tar.gz
 
-.PHONY: all clean distclean dep pciutils export tarball
+.PHONY: all clean distclean dep compiler pciutils export tarball
 
 -include .dependencies
-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to