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>
This commit is contained in:
committed by
Stefan Reinauer
parent
8acbc2a886
commit
a7b296d450
@@ -42,7 +42,7 @@ endif
|
||||
all: pciutils dep $(PROGRAM)
|
||||
|
||||
$(PROGRAM): $(OBJS)
|
||||
$(CC) -o $(PROGRAM) $(OBJS) $(LDFLAGS)
|
||||
$(CC) $(CFLAGS) -o $(PROGRAM) $(OBJS) $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
rm -f $(PROGRAM) *.o *~
|
||||
@@ -59,7 +59,7 @@ pciutils:
|
||||
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) $(LDFLAGS) .test.c -o .test &>/dev/null && \
|
||||
@$(CC) $(CFLAGS) .test.c -o .test $(LDFLAGS) &>/dev/null && \
|
||||
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"; \
|
||||
|
Reference in New Issue
Block a user