summaryrefslogtreecommitdiff
path: root/payloads/libpayload/bin/lpgcc
diff options
context:
space:
mode:
authorPatrick Georgi <patrick.georgi@coresystems.de>2010-06-24 11:14:51 +0000
committerPatrick Georgi <patrick.georgi@coresystems.de>2010-06-24 11:14:51 +0000
commit815c47f7b458f7342195ffe99e994e2757df96c1 (patch)
treec65d5441839603f8300bfedac4f080872fb03506 /payloads/libpayload/bin/lpgcc
parentad5107e5e6cb6d79e6b3e228226ffd87b72f62f1 (diff)
downloadcoreboot-815c47f7b458f7342195ffe99e994e2757df96c1.tar.xz
Add __LIBPAYLOAD__ and __i386__/__powerpc__ symbols to lpgcc's build context.
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5642 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'payloads/libpayload/bin/lpgcc')
-rwxr-xr-xpayloads/libpayload/bin/lpgcc4
1 files changed, 3 insertions, 1 deletions
diff --git a/payloads/libpayload/bin/lpgcc b/payloads/libpayload/bin/lpgcc
index 448557c0b9..5bc76803a5 100755
--- a/payloads/libpayload/bin/lpgcc
+++ b/payloads/libpayload/bin/lpgcc
@@ -103,14 +103,16 @@ done
if [ "$CONFIG_TARGET_I386" = "y" ]; then
_ARCHINCDIR=$_INCDIR/i386
_ARCHLIBDIR=$_LIBDIR/i386
+ _TARGETCFLAGS="-D__i386__=1"
fi
if [ "$CONFIG_TARGET_POWERPC" = "y" ]; then
_ARCHINCDIR=$_INCDIR/powerpc
_ARCHLIBDIR=$_LIBDIR/powerpc
+ _TARGETCFLAGS="-D__powerpc__=1"
fi
-_CFLAGS="-m32 -nostdinc -nostdlib -I$_INCDIR -I$_ARCHINCDIR"
+_CFLAGS="-m32 -nostdinc -nostdlib -I$_INCDIR -I$_ARCHINCDIR -D__LIBPAYLOAD__=1 $_TARGETCFLAGS"
# Check for the -fno-stack-protector silliness