From e62e316ecf34b17a65e7781335ed206d0ffbb679 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 15 Mar 2012 18:14:42 -0400 Subject: 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 Reviewed-by: Jay Srinivasan Tested-by: Mike Frysinger Commit-Ready: Mike Frysinger --- tests/Makefile | 6 +++--- 1 file 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) \ -- cgit v1.2.1