summaryrefslogtreecommitdiff
path: root/payloads/libpayload/bin
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2024-03-15 14:08:14 -0700
committerMartin L Roth <gaumless@gmail.com>2024-03-17 16:53:06 +0000
commitc00c14077d6108176360b49614a73dabdc5c59a5 (patch)
tree65c0be15a4d25a517bcb3e810982aea35a94b980 /payloads/libpayload/bin
parent614fb7a51cd2e378f8aa84392f0700ac3ef5f1a3 (diff)
libpayload: Make GPL commonlib includes available to payloads and tests
CB:77968 made some non-BSD commonlib files part of libpayload when CONFIG_LP_GPL is set. This patch exports those headers to the payload (again only when CONFIG_LP_GPL is set) so that payloads can also call the functions in them directly. Also make those includes available to tests so that their functions can be tested. There's no menuconfig for unit tests, so they are included unconditionally, but this should be fine since the tests are standalone and won't have to link with any proprietary third-party code. Change-Id: Ifc3e52ee5c3e51520f7b7d44b483bfcb0e8380f8 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/81287 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Diffstat (limited to 'payloads/libpayload/bin')
-rwxr-xr-xpayloads/libpayload/bin/lpgcc3
1 files changed, 3 insertions, 0 deletions
diff --git a/payloads/libpayload/bin/lpgcc b/payloads/libpayload/bin/lpgcc
index 35fa5584a8..bdc1518ed3 100755
--- a/payloads/libpayload/bin/lpgcc
+++ b/payloads/libpayload/bin/lpgcc
@@ -170,6 +170,9 @@ if [ $_LIBDIR = $_OBJ ]; then
_CFLAGS="$_CFLAGS -include $BASE/../../../src/commonlib/bsd/include/commonlib/bsd/compiler.h"
_CFLAGS="$_CFLAGS -I$BASE/../../../src/commonlib/bsd/include"
+ if [ "$CONFIG_LP_GPL" = y ]; then
+ _CFLAGS="$_CFLAGS -I$BASE/../../../src/commonlib/include"
+ fi
_CFLAGS="$_CFLAGS -I$BASE/../../../3rdparty/vboot/firmware/include"
else
_CFLAGS="$_CFLAGS -include $BASE/../include/commonlib/bsd/compiler.h"