summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorKarthikeyan Ramasubramanian <kramasub@google.com>2022-09-06 14:02:41 -0600
committerMartin Roth <martin.roth@amd.corp-partner.google.com>2022-10-02 22:09:01 +0000
commit236245ec7dc79b03e5e8011d4bac4880126752da (patch)
treeb03eb7e7ca6ac38c9d084c78a6c5e930f11004d9 /util
parent520c8c070b5c5bdb3a32580ed09311ebb9834fbc (diff)
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>
Diffstat (limited to 'util')
-rw-r--r--util/amdfwtool/Makefile2
-rw-r--r--util/amdfwtool/Makefile.inc1
-rw-r--r--util/amdfwtool/amdfwtool.h1
3 files changed, 4 insertions, 0 deletions
diff --git a/util/amdfwtool/Makefile b/util/amdfwtool/Makefile
index bdc3dc3432..e0ce3b76ab 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 @@ HEADER=amdfwtool.h
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 4b7db76e4d..d45d273c45 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 027a8f30f3..6b13edcb79 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>