summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@chromium.org>2012-11-01 20:15:08 -0400
committerGerrit <chrome-bot@google.com>2012-11-01 19:13:17 -0700
commit9e2c3b0b98cd615b83cff84fb1bb9df187ceb1fd (patch)
tree20a0c5ffa1b92476624a93676bdccbb9dadcbdeb
parent97625b69be461c51e5021932506f933a78237b3f (diff)
downloadvboot-9e2c3b0b98cd615b83cff84fb1bb9df187ceb1fd.tar.gz
fix linking order
Libraries must come after objects when linking. Otherwise their references will be elided when earlier objects didn't need them. BUG=None TEST=`LDFLAGS=-Wl,--as-needed emerge-daisy vboot_reference` worked BRANCH=None Change-Id: Ic8237a767758d002cd848ed3293b17940884b609 Reviewed-on: https://gerrit.chromium.org/gerrit/37166 Reviewed-by: Kees Cook <keescook@chromium.org> Commit-Ready: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org>
-rw-r--r--utility/Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/utility/Makefile b/utility/Makefile
index 68e09413..b874c36a 100644
--- a/utility/Makefile
+++ b/utility/Makefile
@@ -191,9 +191,10 @@ ${BUILD_ROOT}/mount-encrypted: mount-encrypted.c mount-encrypted.h \
-I$(FWDIR)/include \
-I$(HOSTDIR)/include \
$(LDFLAGS) \
- $< -o $@ $(shell $(PKG_CONFIG) --libs glib-2.0 openssl) \
- -lm \
- ${BUILD_ROOT}/mount-helpers.o $(LIBS)
+ $< -o $@ \
+ ${BUILD_ROOT}/mount-helpers.o $(LIBS) \
+ $(shell $(PKG_CONFIG) --libs glib-2.0 openssl) \
+ -lm
${BUILD_ROOT}/dev_sign_file: dev_sign_file.c $(LIBS)
$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LIBS) $(CRYPTO_LIBS)