summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2019-09-21 17:43:40 -0700
committerCommit Bot <commit-bot@chromium.org>2019-10-01 11:36:38 +0000
commit1db81be6d747c8c90ddb3f1e93dadc230506b859 (patch)
tree189573a51819063623b8cecb29edd50f16567d4f
parent68c9a2870ead8a3306a2601c4f5689656d49c6a8 (diff)
downloadchrome-ec-1db81be6d747c8c90ddb3f1e93dadc230506b859.tar.gz
Makefile.rules: LDFLAGS comes last
When compiling host utilities on standard Ubuntu 19.04, linking will fail if LDFLAGS is not specified after the object files. Signed-off-by: Stefan Reinauer <reinauer@chromium.org> BUG=none BRANCH=none TEST=Run make outside of chroot and see it succeed. Change-Id: I3330edf247aa109d5fbaa0e08cb7b4cfefc96a09 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1818149 Reviewed-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
-rw-r--r--Makefile.rules4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile.rules b/Makefile.rules
index dbe6ee5161..6195d70bd9 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -90,8 +90,8 @@ cmd_c_to_build = $(BUILDCC) $(BUILD_CFLAGS) \
-MMD -MF $@.d -o $@
cmd_c_to_vif = $(BUILDCC) $(BUILD_CFLAGS) $(STANDALONE_FLAGS) \
-MMD -MF $@.d -c $< -flto -o $@
-cmd_c_to_host = $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -MMD -MF $@.d -o $@ \
- $(sort $(foreach c,$($(*F)-objs),util/$(c:%.o=%.c)) $(wildcard $*.c))
+cmd_c_to_host = $(HOSTCC) $(HOST_CFLAGS) -MMD -MF $@.d -o $@ \
+ $(sort $(foreach c,$($(*F)-objs),util/$(c:%.o=%.c)) $(wildcard $*.c)) $(HOST_LDFLAGS)
cmd_cxx_to_host = $(HOSTCXX) -std=c++0x $(COMMON_WARN) $(HOST_CXXFLAGS)\
-I ./$($(notdir $@)_ROOT) -o $@ $(filter %.cc,$^) $($(notdir $@)_LIBS)
cmd_o_to_a = $(AR) rcs $@ $^