mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 02:05:01 +00:00
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>
This commit is contained in:
@@ -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) \
|
||||
|
||||
Reference in New Issue
Block a user