summaryrefslogtreecommitdiff
path: root/payloads/libpayload
diff options
context:
space:
mode:
authorChristian Ruppert <idl0r@qasl.de>2011-12-17 21:56:05 +0100
committerPatrick Georgi <patrick@georgi-clan.de>2011-12-21 16:27:01 +0100
commit74b659992b3283ac8e0f7aa3d371f93144771451 (patch)
tree461e43b89e93fa20789acea9709d719dda2aad4f /payloads/libpayload
parent1c80cf04fe6ffd9508e9d142b6bff03fd7006f95 (diff)
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> Reviewed-on: http://review.coreboot.org/494 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'payloads/libpayload')
-rw-r--r--payloads/libpayload/util/kconfig/Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/payloads/libpayload/util/kconfig/Makefile b/payloads/libpayload/util/kconfig/Makefile
index f613a62fa3..624233d288 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 $@