Patrick Georgi submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Patrick Georgi: Looks good to me, approved
libpayload: Add coreboot commonlib/bsd include path

Make BSD part of the coreboot commonlib accessible to libpayload.

Change-Id: I09f475d399ab785f3d3ffdb4b42950d2b397845e
Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59697
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <patrick@coreboot.org>
---
M payloads/libpayload/Makefile
M payloads/libpayload/Makefile.inc
M payloads/libpayload/tests/Makefile.inc
3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/payloads/libpayload/Makefile b/payloads/libpayload/Makefile
index ee83a0a..1da8c64 100644
--- a/payloads/libpayload/Makefile
+++ b/payloads/libpayload/Makefile
@@ -34,6 +34,7 @@
endif

export top := $(CURDIR)
+export coreboottop ?= $(abspath $(top)/../../)
export src := src
export srck := $(abspath $(top)/../../util/kconfig)
export obj ?= build
diff --git a/payloads/libpayload/Makefile.inc b/payloads/libpayload/Makefile.inc
index 8e0a3d6..2332517 100644
--- a/payloads/libpayload/Makefile.inc
+++ b/payloads/libpayload/Makefile.inc
@@ -58,6 +58,7 @@

INCLUDES := -Iinclude -Iinclude/$(ARCHDIR-y) -I$(obj)
INCLUDES += -include include/kconfig.h -include include/compiler.h
+INCLUDES += -I$(coreboottop)/src/commonlib/bsd/include

CFLAGS += $(INCLUDES) -Os -pipe -nostdinc -ggdb3
CFLAGS += -nostdlib -fno-builtin -ffreestanding -fomit-frame-pointer
diff --git a/payloads/libpayload/tests/Makefile.inc b/payloads/libpayload/tests/Makefile.inc
index ba465b0..c4463d7 100644
--- a/payloads/libpayload/tests/Makefile.inc
+++ b/payloads/libpayload/tests/Makefile.inc
@@ -11,8 +11,6 @@
endif
coverage-dir := $(testobj)/coverage_reports

-coreboottop := ../../
-
cmockasrc := $(coreboottop)/3rdparty/cmocka
cmockaobj := $(objutil)/cmocka
CMOCKA_LIB := $(cmockaobj)/src/libcmocka.so
@@ -34,6 +32,7 @@
# Default includes
TEST_CFLAGS := -include include/kconfig.h -include include/compiler.h
TEST_CFLAGS += -Iinclude -Iinclude/mock
+TEST_CFLAGS += -I$(coreboottop)/src/commonlib/bsd/include
TEST_CFLAGS += -I$(dir $(TEST_KCONFIG_AUTOHEADER))

# Test specific includes

To view, visit change 59697. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I09f475d399ab785f3d3ffdb4b42950d2b397845e
Gerrit-Change-Number: 59697
Gerrit-PatchSet: 3
Gerrit-Owner: Jakub Czapiga <jacz@semihalf.com>
Gerrit-Reviewer: Jan Dabros <jsd@semihalf.com>
Gerrit-Reviewer: Julius Werner <jwerner@chromium.org>
Gerrit-Reviewer: Patrick Georgi <patrick@coreboot.org>
Gerrit-Reviewer: Yu-Ping Wu <yupingso@google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter@mailbox.org>
Gerrit-MessageType: merged