Patchwork [1/3] libpayload: Add lib/ to the default library path of lpgcc, so -l works

login
register
about
Submitter Patrick Georgi
Date 2011-02-15 14:46:19
Message ID <1297942045.3976.38.camel@linux-0a8x.site>
Download mbox | patch
Permalink /patch/2674/
State Accepted
Commit r6413
Headers show

Comments

Patrick Georgi - 2011-02-15 14:46:19
Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com>
---
 payloads/libpayload/bin/lpgcc |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/payloads/libpayload/bin/lpgcc b/payloads/libpayload/bin/lpgcc
index 57015d5..80c2266 100755
--- a/payloads/libpayload/bin/lpgcc
+++ b/payloads/libpayload/bin/lpgcc
@@ -123,7 +123,7 @@  trygccoption -fno-stack-protector
 
 _CFLAGS="$_CFLAGS -I`$DEFAULT_CC -m32 -print-search-dirs | head -n 1 | cut -d' ' -f2`include"
 
-_LDFLAGS="$_LDSCRIPT -static"
+_LDFLAGS="-L$BASE/../lib $_LDSCRIPT -static"
 
 if [ $DOLINK -eq 0 ]; then
     if [ $DEBUGME -eq 1 ]; then
@@ -134,7 +134,7 @@  if [ $DOLINK -eq 0 ]; then
 else
     _LIBGCC=`$DEFAULT_CC -m32 -print-libgcc-file-name`
     if [ $DEBUGME -eq 1 ]; then
-	echo "$DEFAULT_CC $_CFLAGS $_LDFLAGS $_ARCHLIBDIR/head.o $CMDLINE $_LIBDIR/libpayload.a $_LIBGCC"
+	echo "$DEFAULT_CC $_CFLAGS $_LDFLAGS $_ARCHLIBDIR/head.o $CMDLINE -lpayload $_LIBGCC"
     fi
 
     # Note: $_ARCHLIBDIR/head.o must be the first object being linked, because it
@@ -142,5 +142,5 @@  else
     # 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 $_ARCHLIBDIR/head.o  $CMDLINE $_LIBDIR/libpayload.a $_LIBGCC
+    $DEFAULT_CC $_CFLAGS $_LDFLAGS $_ARCHLIBDIR/head.o  $CMDLINE -lpayload $_LIBGCC
 fi