From bb679254e1c25e93611d0a81b49353338de987c4 Mon Sep 17 00:00:00 2001 From: Jason Perkins Date: Wed, 15 May 2013 09:30:45 -0400 Subject: Fixed bug #176: Target prefix breaks GCC linking --- tests/actions/make/test_make_linking.lua | 19 ++++++++++--------- tests/test_gmake_cpp.lua | 8 ++++---- 2 files changed, 14 insertions(+), 13 deletions(-) (limited to 'tests') diff --git a/tests/actions/make/test_make_linking.lua b/tests/actions/make/test_make_linking.lua index ef85353..bf43581 100644 --- a/tests/actions/make/test_make_linking.lua +++ b/tests/actions/make/test_make_linking.lua @@ -27,8 +27,9 @@ -- --- Check linking to a shared library sibling project. Should add the library --- path using -L, and link using the base name with -l flag. +-- Check linking to a shared library sibling project. In order to support +-- custom target prefixes and extensions, use the full, relative path +-- to the library. -- function suite.onSharedLibrarySibling() @@ -39,15 +40,15 @@ prepare() test.capture [[ ALL_LDFLAGS += $(LDFLAGS) -Llibs -s - LIBS += -lMyProject2 LDDEPS += libs/libMyProject2.so + LIBS += $(LDDEPS) ]] end -- --- Check linking to a static library sibling project. Should use the full --- decorated library name, relative path, and no -l flag. +-- Check linking to a static library sibling project. As with shared +-- libraries, it should list out the full relative path. -- function suite.onStaticLibrarySibling() @@ -58,8 +59,8 @@ prepare() test.capture [[ ALL_LDFLAGS += $(LDFLAGS) -Llibs -s - LIBS += libs/libMyProject2.a LDDEPS += libs/libMyProject2.a + LIBS += $(LDDEPS) ]] end @@ -77,8 +78,8 @@ prepare() test.capture [[ ALL_LDFLAGS += $(LDFLAGS) -s - LIBS += LDDEPS += + LIBS += $(LDDEPS) ]] end @@ -101,8 +102,8 @@ prepare() test.capture [[ ALL_LDFLAGS += $(LDFLAGS) -L../MyProject2 -s - LIBS += -lMyProject2 LDDEPS += ../MyProject2/libMyProject2.so + LIBS += $(LDDEPS) ]] end @@ -119,7 +120,7 @@ prepare() test.capture [[ ALL_LDFLAGS += $(LDFLAGS) -L../libs -s - LIBS += -lSomeLib LDDEPS += + LIBS += $(LDDEPS) -lSomeLib ]] end diff --git a/tests/test_gmake_cpp.lua b/tests/test_gmake_cpp.lua index 4a6992e..ec895bd 100644 --- a/tests/test_gmake_cpp.lua +++ b/tests/test_gmake_cpp.lua @@ -83,8 +83,8 @@ ifeq ($(config),debug) ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS) ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) ALL_LDFLAGS += $(LDFLAGS) -s - LIBS += LDDEPS += + LIBS += $(LDDEPS) LINKCMD = $(CXX) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(LIBS) $(ALL_LDFLAGS) define PREBUILDCMDS endef @@ -117,8 +117,8 @@ ifeq ($(config),debugps3) ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS) ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) ALL_LDFLAGS += $(LDFLAGS) -s - LIBS += LDDEPS += + LIBS += $(LDDEPS) LINKCMD = $(CXX) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(LIBS) $(ALL_LDFLAGS) define PREBUILDCMDS endef @@ -148,8 +148,8 @@ ifeq ($(config),debug64) ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS) ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) ALL_LDFLAGS += $(LDFLAGS) -s -m64 -L/usr/lib64 - LIBS += LDDEPS += + LIBS += $(LDDEPS) LINKCMD = $(CXX) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(LIBS) $(ALL_LDFLAGS) define PREBUILDCMDS endef @@ -180,8 +180,8 @@ ifeq ($(config),debuguniv32) ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS) ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) ALL_LDFLAGS += $(LDFLAGS) -s -arch i386 -arch ppc - LIBS += LDDEPS += + LIBS += $(LDDEPS) LINKCMD = libtool -o $(TARGET) $(OBJECTS) define PREBUILDCMDS endef -- cgit v1.2.3