summaryrefslogtreecommitdiff
path: root/payloads/libpayload/bin/lpgcc
diff options
context:
space:
mode:
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