Fix warnings in coreboot utilities.

- Fix some poor programming practice (breaks of strict aliasing as well
  as not checking the return value of read)
- Use PRIx64 instead of %llx to prevent compilation warnings with both
  32bit and 64bit compilers
- Use same compiler command options when linking inteltool and when
  detecting libpci for inteltool

Change-Id: I08b2e8d1bbc908f6b1f26d25cb3a4b03d818e124
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/752
Tested-by: build bot (Jenkins)
Reviewed-by: Mathias Krause <minipli@googlemail.com>
diff --git a/util/inteltool/inteltool.c b/util/inteltool/inteltool.c
index 6b99605..e5c2b86 100644
--- a/util/inteltool/inteltool.c
+++ b/util/inteltool/inteltool.c
@@ -21,6 +21,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <inttypes.h>
 #include <getopt.h>
 #include <fcntl.h>
 #include <sys/mman.h>
@@ -99,7 +100,8 @@
 		    fd_mem, (off_t) phys_addr);
 
 	if (virt_addr == MAP_FAILED) {
-		printf("Error mapping physical memory 0x%08lx[0x%zx]\n", phys_addr, len);
+		printf("Error mapping physical memory 0x%08" PRIx64 "[0x%zx]\n",
+			phys_addr, len);
 		return NULL;
 	}