Date: Monday, January 8, 2007 @ 20:55:52
Author: marc
Path: /cvsroot/carob/carob
Modified: GNUmakefile (1.16 -> 1.17) make-includes/main.mk (1.3 -> 1.4)
test/GNUmakefile (1.33 -> 1.34)
Do not link carob to -lpthread anymore, but only clients of it. See CAROB-117
for rationale.
-----------------------+
GNUmakefile | 9 ++++-----
make-includes/main.mk | 6 ++++++
test/GNUmakefile | 3 +--
3 files changed, 11 insertions(+), 7 deletions(-)
Index: carob/GNUmakefile
diff -u carob/GNUmakefile:1.16 carob/GNUmakefile:1.17
--- carob/GNUmakefile:1.16 Mon Jan 8 15:14:09 2007
+++ carob/GNUmakefile Mon Jan 8 20:55:52 2007
@@ -81,8 +81,7 @@
LIB_CAROB_STATIC = lib${LIB_CAROB}.a
# LDLIBS is not used to build static libcarob.a
-# -lpthread must be first, see CAROB-117
-ALL_LDLIBS = -lpthread -lgmp ${LDLIBS}
+override LDLIBS += -lgmp
@@ -109,7 +108,7 @@
$(MAKE) -C test
${LIB_CAROB_LIB}: ${OBJS}
- ${CXX} ${CXXFLAGS} ${OBJS} ${SHARED_LDFLAGS} ${LDFLAGS} ${ALL_LDLIBS}
-o ${LIB_CAROB_LIB}
+ ${CXX} ${CXXFLAGS} ${OBJS} ${SHARED_LDFLAGS} ${LDFLAGS} ${LDLIBS} -o
${LIB_CAROB_LIB}
- ${LN} -f ${LIB_CAROB_LIB} ${LIB_CAROB_LIB_SHORT}
${LIB_CAROB_STATIC}: ${OBJS}
@@ -145,11 +144,11 @@
# Link a empty executable to our lib
# Useful to detect unresolved symbols in our lib
checklib: ${LIB_CAROB_LIB}
- - ${CXX} ${CXXFLAGS} ${CPPFLAGS} dummymain.cpp $< -o $@
+ - ${CXX} ${CXXFLAGS} ${CPPFLAGS} dummymain.cpp $< ${TEST_LDLIBS} -o $@
ldd ./$<
checkstatic: ${LIB_CAROB_STATIC}
- ${CXX} ${CXXFLAGS} ${CPPFLAGS} dummymain.cpp $< ${LDFLAGS}
${ALL_LDLIBS} -o $@
+ ${CXX} ${CXXFLAGS} ${CPPFLAGS} dummymain.cpp $< ${LDFLAGS} ${LDLIBS}
${TEST_LDLIBS} -o $@
ldd ./$@
Index: carob/make-includes/main.mk
diff -u carob/make-includes/main.mk:1.3 carob/make-includes/main.mk:1.4
--- carob/make-includes/main.mk:1.3 Mon Jan 8 15:14:09 2007
+++ carob/make-includes/main.mk Mon Jan 8 20:55:52 2007
@@ -12,6 +12,12 @@
LINKER?=gnu
OS?=linux
+
+# one thread library is needed, check CAROB-117
+# provide a default
+TEST_LDLIBS = -lpthread
+
+
include ${MKINCLUDES}/${COMPILER}-compiler.mk
include ${MKINCLUDES}/${LINKER}-linker.mk
include ${MKINCLUDES}/${OS}-os.mk
Index: carob/test/GNUmakefile
diff -u carob/test/GNUmakefile:1.33 carob/test/GNUmakefile:1.34
--- carob/test/GNUmakefile:1.33 Mon Jan 8 20:11:55 2007
+++ carob/test/GNUmakefile Mon Jan 8 20:55:52 2007
@@ -52,8 +52,7 @@
override CPPFLAGS += -I${INCDIR}
-# even when tests don't use thread, -lpthread must be first, check CAROB-117
-override TEST_LDLIBS += -lpthread -l${LIB_CPPUNIT}
+override TEST_LDLIBS += -l${LIB_CPPUNIT}
# cppunit is sometimes not linked to libdl while using dlopen() & co
ifeq (${OS}, linux)
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits