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>
This commit is contained in:
Karthikeyan Ramasubramanian 2022-09-06 14:02:41 -06:00 committed by Martin Roth
parent 520c8c070b
commit 236245ec7d
3 changed files with 4 additions and 0 deletions

View File

@ -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)

View File

@ -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 $@ $<

View File

@ -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>