Tell lpgcc about the target architecture directory. This slipped through since
authorStefan Reinauer <stepan@coresystems.de>
Tue, 26 May 2009 18:01:53 +0000 (18:01 +0000)
committerStefan Reinauer <stepan@openbios.org>
Tue, 26 May 2009 18:01:53 +0000 (18:01 +0000)
FILO does not use lpgcc (yet)

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4310 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

payloads/libpayload/bin/lpgcc

index cbc52c12e680eb2753068a76b88ea336320b5241..e88c74fc226463d3aee4f37e6d388e9bc8e279b0 100755 (executable)
@@ -48,6 +48,9 @@ BASE=`dirname $0`
 # This will set the _LIBDIR and _INCDIR variables used below
 . $BASE/lp.functions
 
+# include libpayload config
+. $BASE/../libpayload.config
+
 _LDSCRIPT="-Wl,-T,$_LIBDIR/libpayload.ldscript"
 
 trygccoption() {
@@ -97,7 +100,15 @@ while [ $# -gt 0 ]; do
        shift
 done
 
-_CFLAGS="-m32 -nostdinc -nostdlib -I$_INCDIR"
+if [ "$CONFIG_TARGET_I386" = "y" ]; then
+  _ARCHINCDIR=$_INCDIR/i386
+fi
+
+if [ "$CONFIG_TARGET_POWERPC" = "y" ]; then
+  _ARCHINCDIR=$_INCDIR/powerpc
+fi
+
+_CFLAGS="-m32 -nostdinc -nostdlib -I$_INCDIR -I$_ARCHINCDIR"
 
 # Check for the -fno-stack-protector silliness