Christian Ruppert (idl0r@qasl.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/494
-gerrit
commit 66ebaa9f670438b7dd4efa80b65830b362729a9b Author: Christian Ruppert idl0r@qasl.de Date: Sat Dec 17 21:56:05 2011 +0100
Respect linker order
Linking fails when using -Wl,--as-needed and/or esp. when forcing --as-needed through a compiler specs file. A proper compile/link command would look like: $(CC) $(CFLAGS) $(LDFLAGS) -o foo $(OBJS) $(LIBS). So the *FLAGS must be passed *before* the objects while the libraries/dependencies must be passed *after* the objects. For more details see: http://www.gentoo.org/proj/en/qa/asneeded.xml
Change-Id: I5a5b05e1cab8a2d88ce56c92d9b2f991ca1ee6c0 Signed-off-by: Christian Ruppert idl0r@qasl.de --- payloads/coreinfo/util/kconfig/Makefile | 6 +++--- payloads/libpayload/util/kconfig/Makefile | 6 +++--- util/kconfig/Makefile | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/payloads/coreinfo/util/kconfig/Makefile b/payloads/coreinfo/util/kconfig/Makefile index 9462aea..679ab92 100644 --- a/payloads/coreinfo/util/kconfig/Makefile +++ b/payloads/coreinfo/util/kconfig/Makefile @@ -298,7 +298,7 @@ $(objk)/qconf: $(patsubst %,$(objk)/%,$(qconf-cxxobjs)) \ $(objk)/gconf: $(patsubst %,$(objk)/%,$(gconf-objs)) $(Q)$(HOSTCC) $(HOSTCFLAGS) $(HOSTLOADLIBES_gconf) -o $@ $^ $(objk)/mconf: $(patsubst %,$(objk)/%,$(mconf-objs)) - $(Q)$(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES) -o $@ $^ + $(Q)$(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -o $@ $^ $(HOST_LOADLIBES) $(objk)/conf: $(patsubst %,$(objk)/%,$(conf-objs)) $(Q)$(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -o $@ $^
@@ -330,8 +330,8 @@ $(objk)/zconf.tab.c: $(srck)/zconf.tab.c_shipped
$(objk)/lxdialog/lxdialog: $(objk)/dochecklxdialog \ $(patsubst %,$(objk)/lxdialog/%,$(lxdialog)) - $(Q)$(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES) \ - $(patsubst %,$(objk)/lxdialog/%,$(lxdialog)) -o $@ + $(Q)$(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) \ + $(patsubst %,$(objk)/lxdialog/%,$(lxdialog)) $(HOST_LOADLIBES) -o $@ $(objk)/lxdialog/%.o: $(srck)/lxdialog/%.c $(Q)$(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) $^ -c -o $@
diff --git a/payloads/libpayload/util/kconfig/Makefile b/payloads/libpayload/util/kconfig/Makefile index f613a62..624233d 100644 --- a/payloads/libpayload/util/kconfig/Makefile +++ b/payloads/libpayload/util/kconfig/Makefile @@ -304,7 +304,7 @@ $(objk)/qconf: $(patsubst %,$(objk)/%,$(qconf-cxxobjs)) \ $(objk)/gconf: $(patsubst %,$(objk)/%,$(gconf-objs)) $(Q)$(HOSTCC) $(HOSTCFLAGS) $(HOSTLOADLIBES_gconf) -o $@ $^ $(objk)/mconf: $(patsubst %,$(objk)/%,$(mconf-objs)) - $(Q)$(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES) -o $@ $^ + $(Q)$(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -o $@ $^ $(HOST_LOADLIBES) $(objk)/conf: $(patsubst %,$(objk)/%,$(conf-objs)) $(Q)$(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -o $@ $^
@@ -338,8 +338,8 @@ $(objk)/zconf.tab.c: $(srck)/zconf.tab.c_shipped
$(objk)/lxdialog/lxdialog: $(objk)/dochecklxdialog \ $(patsubst %,$(objk)/lxdialog/%,$(lxdialog)) - $(Q)$(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES) \ - $(patsubst %,$(objk)/lxdialog/%,$(lxdialog)) -o $@ + $(Q)$(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) \ + $(patsubst %,$(objk)/lxdialog/%,$(lxdialog)) $(HOST_LOADLIBES) -o $@ $(objk)/lxdialog/%.o: $(srck)/lxdialog/%.c $(Q)$(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) $^ -c -o $@
diff --git a/util/kconfig/Makefile b/util/kconfig/Makefile index 477ff03..0e108a3 100644 --- a/util/kconfig/Makefile +++ b/util/kconfig/Makefile @@ -338,8 +338,8 @@ $(objk)/zconf.tab.c: $(srck)/zconf.tab.c_shipped
$(objk)/lxdialog/lxdialog: $(objk)/dochecklxdialog \ $(patsubst %,$(objk)/lxdialog/%,$(lxdialog)) - $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES) \ - $(patsubst %,$(objk)/lxdialog/%,$(lxdialog)) -o $@ + $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) \ + $(patsubst %,$(objk)/lxdialog/%,$(lxdialog)) $(HOST_LOADLIBES) -o $@ $(objk)/lxdialog/%.o: $(srck)/lxdialog/%.c $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) $^ -c -o $@