Patchwork libpayload lpgcc arch fix

login
register
about
Submitter Stefan Reinauer
Date 2010-03-24 21:03:34
Message ID <4BAA7E26.6010209@coresystems.de>
Download mbox | patch
Permalink /patch/1143/
State Accepted
Headers show

Comments

Stefan Reinauer - 2010-03-24 21:03:34
See patch...
Patrick Georgi - 2010-03-24 21:29:04
Am 24.03.2010 22:03, schrieb Stefan Reinauer:
> See patch...
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>

Patch

--- bin/lpgcc	(revision 5280)
+++ bin/lpgcc	(working copy)
@@ -102,10 +102,12 @@ 
 
 if [ "$CONFIG_TARGET_I386" = "y" ]; then
   _ARCHINCDIR=$_INCDIR/i386
+  _ARCHLIBDIR=$_LIBDIR/i386
 fi
 
 if [ "$CONFIG_TARGET_POWERPC" = "y" ]; then
   _ARCHINCDIR=$_INCDIR/powerpc
+  _ARCHLIBDIR=$_LIBDIR/powerpc
 fi
 
 _CFLAGS="-m32 -nostdinc -nostdlib -I$_INCDIR -I$_ARCHINCDIR"
@@ -128,13 +130,13 @@ 
 else
     _LIBGCC=`$DEFAULT_CC -m32 -print-libgcc-file-name`
     if [ $DEBUGME -eq 1 ]; then
-	echo "$DEFAULT_CC $_CFLAGS $_LDFLAGS $_LIBDIR/i386/head.o $CMDLINE $_LIBDIR/libpayload.a $_LIBGCC"
+	echo "$DEFAULT_CC $_CFLAGS $_LDFLAGS $_ARCHLIBDIR/head.o $CMDLINE $_LIBDIR/libpayload.a $_LIBGCC"
     fi
 
-    # Note: i386/head.o must be the first object being linked, because it
+    # Note: $_ARCHLIBDIR/head.o must be the first object being linked, because it
     # contains a Multiboot header.  The Multiboot standard requires this
     # header to be placed below 0x2000 in the resulting image.  See:
     # http://www.gnu.org/software/grub/manual/multiboot/html_node/OS-image-format.html
 
-    $DEFAULT_CC $_CFLAGS $_LDFLAGS $_LIBDIR/i386/head.o  $CMDLINE $_LIBDIR/libpayload.a $_LIBGCC
+    $DEFAULT_CC $_CFLAGS $_LDFLAGS $_ARCHLIBDIR/head.o  $CMDLINE $_LIBDIR/libpayload.a $_LIBGCC
 fi