summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@chromium.org>2012-03-15 18:14:42 -0400
committerGerrit <chrome-bot@google.com>2012-03-15 19:22:19 -0700
commite62e316ecf34b17a65e7781335ed206d0ffbb679 (patch)
treeeb4e66f0257bd4584942800c4f348ac02ea42e20
parentbde0696234c2c665aec56fa4de768d8414af9621 (diff)
downloadvboot-e62e316ecf34b17a65e7781335ed206d0ffbb679.tar.gz
CgptManagerTests: fix linking order
We need all the libraries to come after the objects, not before, otherwise static and --as-needed linking fails when the linker drops the libraries. BUG=None TEST=`emerge vboot_reference` still works Change-Id: Id98571a90115ab5ace68a0c795de86d7fe78f133 Reviewed-on: https://gerrit.chromium.org/gerrit/18290 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Jay Srinivasan <jaysri@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org> Commit-Ready: Mike Frysinger <vapier@chromium.org>
-rw-r--r--tests/Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 54129811..f7f0cba6 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -55,7 +55,7 @@ ALL_DEPS = $(addsuffix .d,${TEST_BINS} ${TEST_LIB_OBJS})
# Allow multiple definitions, so tests can mock functions from other libraries
CFLAGS += -MMD -MF $@.d -Xlinker --allow-multiple-definition
CXXFLAGS += -MMD -MF $@.d -Xlinker --allow-multiple-definition
-LDFLAGS += -luuid
+LDLIBS += $(PC_LIBS) -luuid
LIBS := ${TEST_LIB} $(HOSTLIB)
@@ -78,8 +78,8 @@ ${BUILD_ROOT}/CgptManagerTests.o: CgptManagerTests.cc
$(CXX) -DWITH_UTIL_MAIN $(CXXFLAGS) $(INCLUDES) -c $< -o $@
${BUILD_ROOT}/CgptManagerTests: ${BUILD_ROOT}/CgptManagerTests.o
- $(CXX) $(CXXFLAGS) $(INCLUDES) $(LDFLAGS) -lgtest -lgflags $^ \
- ${BUILD}/cgpt/libcgpt-cc.a $(PC_LIBS) -o $@
+ $(CXX) $(CXXFLAGS) $(INCLUDES) $(LDFLAGS) $^ \
+ ${BUILD}/cgpt/libcgpt-cc.a -lgtest -lgflags $(LDLIBS) -o $@
${BUILD_ROOT}/vboot_audio_for_test.o : $(FWDIR)/lib/vboot_audio.c
$(CC) $(CFLAGS) -DCUSTOM_MUSIC $(INCLUDES) \