aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.in
diff options
context:
space:
mode:
authorElliot Ronaghan <ronawho@gmail.com>2016-06-14 14:20:28 -0700
committerJason Evans <jasone@canonware.com>2016-07-07 13:25:01 -0700
commitae3314785bf9726e5a97e5c98f70dcb12e6a7a90 (patch)
tree5305aa220a463f721c8efc7e6ba17f2baa6fd18e /Makefile.in
parentccd64160736c6e94f84a8bf045ecbbc6a4228604 (diff)
downloadplatform_external_jemalloc_new-ae3314785bf9726e5a97e5c98f70dcb12e6a7a90.tar.gz
platform_external_jemalloc_new-ae3314785bf9726e5a97e5c98f70dcb12e6a7a90.tar.bz2
platform_external_jemalloc_new-ae3314785bf9726e5a97e5c98f70dcb12e6a7a90.zip
Fix librt detection when using a Cray compiler wrapper
The Cray compiler wrappers will often add `-lrt` to the base compiler with `-static` linking (the default at most sites.) However, `-lrt` isn't automatically added with `-dynamic`. This means that if jemalloc was built with `-static`, but then used in a program with `-dynamic` jemalloc won't have detected that librt is a dependency. The integration and stress tests use -dynamic, which is causing undefined references to clock_gettime(). This just adds an extra check for librt (ignoring the autoconf cache) with `-dynamic` thrown. It also stops filtering librt from the integration tests. With this `make check` passes for: - PrgEnv-gnu - PrgEnv-intel - PrgEnv-pgi PrgEnv-cray still needs more work (will be in a separate patch.)
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in
index 4347706c..b78e1500 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -294,7 +294,7 @@ $(objroot)test/unit/%$(EXE): $(objroot)test/unit/%.$(O) $(TESTS_UNIT_LINK_OBJS)
$(objroot)test/integration/%$(EXE): $(objroot)test/integration/%.$(O) $(C_TESTLIB_INTEGRATION_OBJS) $(C_UTIL_INTEGRATION_OBJS) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB)
@mkdir -p $(@D)
- $(CC) $(TEST_LD_MODE) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB) $(LDFLAGS) $(filter-out -lm,$(filter -lpthread,$(LIBS))) -lm $(EXTRA_LDFLAGS)
+ $(CC) $(TEST_LD_MODE) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB) $(LDFLAGS) $(filter-out -lm,$(filter -lrt -lpthread,$(LIBS))) -lm $(EXTRA_LDFLAGS)
$(objroot)test/stress/%$(EXE): $(objroot)test/stress/%.$(O) $(C_JET_OBJS) $(C_TESTLIB_STRESS_OBJS) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB)
@mkdir -p $(@D)