]> git.ozlabs.org Git - petitboot/commitdiff
Add CFLAGS to LDFLAGS
authorGeoff Levand <geoffrey.levand@am.sony.com>
Fri, 27 Feb 2009 14:54:04 +0000 (14:54 +0000)
committerJeremy Kerr <jk@ozlabs.org>
Mon, 23 Mar 2009 10:49:08 +0000 (21:49 +1100)
Add the CFLAGS options to LDFLAGS so that the machine option
from CFLAGS is used when linking.  This duplicates the
behavior of automake.

Fixes errors like these:
  ppu-ld: skipping incompatible libc.so when searching for -lc

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
rules.mk

index 6f85040ea397f6eec6c26fc8d4ae7679252f1114..43e047b36d179e19b72275bce4b5285af7f9ea1d 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -2,6 +2,7 @@
 VPATH = $(srcdir)
 
 CPPFLAGS += -I$(top_srcdir) -I$(top_srcdir)/lib -I$(builddir)
 VPATH = $(srcdir)
 
 CPPFLAGS += -I$(top_srcdir) -I$(top_srcdir)/lib -I$(builddir)
+LDFLAGS += $(CFLAGS)
 
 # we need paths to be overridable at build-time
 DEFS += '-DPREFIX="$(prefix)"' '-DPKG_SHARE_DIR="$(pkgdatadir)"' \
 
 # we need paths to be overridable at build-time
 DEFS += '-DPREFIX="$(prefix)"' '-DPKG_SHARE_DIR="$(pkgdatadir)"' \