From 1035d5c18f64d114ac790b92a96f3b3a1a301eb9 Mon Sep 17 00:00:00 2001 From: Aliaksey Kandratsenka Date: Sun, 21 Dec 2014 19:52:34 -0800 Subject: [PATCH] start building malloc_extension_c_test even with static linking Comment in Makefile.am stating that it doesn't work with static linking is not accurate anymore. --- Makefile.am | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Makefile.am b/Makefile.am index b45176a..a5a9af8 100755 --- a/Makefile.am +++ b/Makefile.am @@ -660,12 +660,10 @@ malloc_extension_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) malloc_extension_test_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS) malloc_extension_test_LDADD = $(LIBTCMALLOC_MINIMAL) $(PTHREAD_LIBS) -# This doesn't work with static linkage, because libtcmalloc.a isn't -# happy with C linkage (it misses the stdc++ library). Likewise with -# mingw, which links foo.a even though it doesn't set ENABLE_STATIC. -# TODO(csilvers): set enable_static=true in configure.ac:36? +# This doesn't work with mingw, which links foo.a even though it +# doesn't set ENABLE_STATIC. TODO(csilvers): set enable_static=true +# in configure.ac:36? if !MINGW -if !ENABLE_STATIC TESTS += malloc_extension_c_test malloc_extension_c_test_SOURCES = src/tests/malloc_extension_c_test.c \ src/gperftools/malloc_extension.h \ @@ -676,8 +674,7 @@ if GCC malloc_extension_c_test_CFLAGS += -ansi endif GCC malloc_extension_c_test_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS) -malloc_extension_c_test_LDADD = $(LIBTCMALLOC_MINIMAL) $(PTHREAD_LIBS) -lstdc++ -endif !ENABLE_STATIC +malloc_extension_c_test_LDADD = $(LIBTCMALLOC_MINIMAL) $(PTHREAD_LIBS) -lstdc++ -lm endif !MINGW if !MINGW