From patchwork Tue Jun 22 15:16:52 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: libpayload: add defines to lpgcc Date: Tue, 22 Jun 2010 15:16:52 -0000 From: Patrick Georgi X-Patchwork-Id: 1540 Message-Id: <4C20D3E4.7080606@georgi-clan.de> To: coreboot@coreboot.org Hi, attached patch tells lpgcc to add two defines to the compiler it invokes: __LIBPAYLOAD__ and an architecture specific one (__i386__ or __powerpc__) Signed-off-by: Patrick Georgi Acked-by: Peter Stuge Acked-by: Stefan Reinauer Acked-by: Carl-Daniel Hailfinger Index: bin/lpgcc =================================================================== --- bin/lpgcc (Revision 5638) +++ bin/lpgcc (Arbeitskopie) @@ -103,14 +103,16 @@ 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