Martin Roth has submitted this change. ( https://review.coreboot.org/c/coreboot/+/67384 )
(
5 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: util/amdfwtool: Include the header with __packed definition ......................................................................
util/amdfwtool: Include the header with __packed definition
Checkpatch script recommends to use __packed instead of __attribute__((packed)). Currently the build rule for amdfwtool does not include the required header file with __packed definition. Update the compiler flag to include the required header file.
BUG=None TEST=Build amdfwtool.
Signed-off-by: Karthikeyan Ramasubramanian kramasub@google.com Change-Id: I448cbad533608dd5c2bd4f2d827fcc5db5dee5cb Reviewed-on: https://review.coreboot.org/c/coreboot/+/67384 Reviewed-by: Jon Murphy jpmurphy@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M util/amdfwtool/Makefile M util/amdfwtool/Makefile.inc M util/amdfwtool/amdfwtool.h 3 files changed, 25 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Jon Murphy: Looks good to me, approved
diff --git a/util/amdfwtool/Makefile b/util/amdfwtool/Makefile index bdc3dc3..e0ce3b7 100644 --- a/util/amdfwtool/Makefile +++ b/util/amdfwtool/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: BSD-3-Clause
+top ?= $(abspath ../..) HOSTCC ?= cc
READ_SRC = amdfwread.c @@ -10,6 +11,7 @@ TARGETS = amdfwread amdfwtool WERROR=-Werror CFLAGS=-O2 -Wall -Wextra -Wshadow ${WERROR} +CFLAGS += -I $(top)/src/commonlib/bsd/include
all: $(TARGETS)
diff --git a/util/amdfwtool/Makefile.inc b/util/amdfwtool/Makefile.inc index 4b7db76..d45d273 100644 --- a/util/amdfwtool/Makefile.inc +++ b/util/amdfwtool/Makefile.inc @@ -3,6 +3,7 @@ amdfwtoolobj = amdfwtool.o data_parse.o
AMDFWTOOLCFLAGS=-O2 -Wall -Wextra -Wshadow -Werror +AMDFWTOOLCFLAGS += -I $(top)/src/commonlib/bsd/include
$(objutil)/amdfwtool/%.o: $(top)/util/amdfwtool/%.c # $(HEADER) $(HOSTCC) $(AMDFWTOOLCFLAGS) $(HOSTCFLAGS) -c -o $@ $< diff --git a/util/amdfwtool/amdfwtool.h b/util/amdfwtool/amdfwtool.h index 027a8f3..6b13edc 100644 --- a/util/amdfwtool/amdfwtool.h +++ b/util/amdfwtool/amdfwtool.h @@ -3,6 +3,7 @@ #ifndef _AMD_FW_TOOL_H_ #define _AMD_FW_TOOL_H_
+#include <commonlib/bsd/compiler.h> #include <stdint.h> #include <stdbool.h>