summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2020-11-14 23:43:12 +0100
committerNico Huber <nico.h@gmx.de>2021-01-11 23:32:32 +0000
commitec70383acc892611e788378f1263ef74f13f0864 (patch)
tree9c4e6396e5240328e5aaffb4a3153d48b0c3dc89
parent3e0b3f17af16371dfac2a285cf1eba1dbcc06fa0 (diff)
downloadcoreboot-ec70383acc892611e788378f1263ef74f13f0864.tar.xz
libpayload/lpgcc: Set proper include paths for in-tree builds
We only need `$_OBJ` in the include path for in-tree builds. Also, curses only need special handling for those and PDCurses turned out to need many more include paths. Change-Id: Idd29ef33065033e26ba61b09d412d8ca3566d643 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/47631 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
-rwxr-xr-xpayloads/libpayload/bin/lpgcc17
1 files changed, 11 insertions, 6 deletions
diff --git a/payloads/libpayload/bin/lpgcc b/payloads/libpayload/bin/lpgcc
index 12d8e47774..d6716da065 100755
--- a/payloads/libpayload/bin/lpgcc
+++ b/payloads/libpayload/bin/lpgcc
@@ -143,14 +143,19 @@ while [ $# -gt 0 ]; do
shift
done
-_CFLAGS="$_ARCHEXTRA -nostdinc -nostdlib -I$_OBJ -I$_INCDIR -I$_ARCHINCDIR -D__LIBPAYLOAD__=1"
+_CFLAGS="$_ARCHEXTRA -nostdinc -nostdlib -I$_INCDIR -I$_ARCHINCDIR -D__LIBPAYLOAD__=1"
-if [ "$CONFIG_LP_PDCURSES" = y ]; then
- _CFLAGS="$_CFLAGS -I$BASE/../curses/PDCurses"
-fi
+if [ $_LIBDIR = $_OBJ ]; then
+ _CFLAGS="$_CFLAGS -I$_OBJ"
+
+ if [ "$CONFIG_LP_PDCURSES" = y ]; then
+ _CFLAGS="$_CFLAGS -I$BASE/../curses/PDCurses -I$BASE/../curses/pdcurses-backend"
+ _CFLAGS="$_CFLAGS -I$BASE/../curses/form -I$BASE/../curses/menu"
+ fi
-if [ "$CONFIG_LP_TINYCURSES" = y ]; then
- _CFLAGS="$_CFLAGS -I$BASE/../curses"
+ if [ "$CONFIG_LP_TINYCURSES" = y ]; then
+ _CFLAGS="$_CFLAGS -I$BASE/../curses"
+ fi
fi
# Check for the -fno-stack-protector silliness