From 5df224b6542b3a11f3d73e68f065571c803bf858 Mon Sep 17 00:00:00 2001 From: Randall Meyer Date: Thu, 26 Aug 2021 13:37:44 -0700 Subject: [PATCH] Cleanup generated LDFLAGS for jemalloc Use the already expanded jemalloc_ldflags instead of overwriting what was previously specified earlier in the file. Also, drop use --add-needed,--no-as-needed --- build/jemalloc.m4 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build/jemalloc.m4 b/build/jemalloc.m4 index c7df15d320a..9f2c0d1319a 100644 --- a/build/jemalloc.m4 +++ b/build/jemalloc.m4 @@ -55,8 +55,7 @@ if test "$enable_jemalloc" != "no"; then jemalloc_have_libs=0 if test "$jemalloc_base_dir" != "/usr"; then TS_ADDTO(CPPFLAGS, [-I${jemalloc_include}]) - TS_ADDTO(LDFLAGS, [-L${jemalloc_ldflags}]) - TS_ADDTO(LDFLAGS, [-Wl,--add-needed -L${jemalloc_base_dir}/lib -Wl,-rpath,${jemalloc_base_dir}/lib -Wl,--no-as-needed]) + TS_ADDTO(LDFLAGS, [-L${jemalloc_ldflags} -Wl,-rpath,${jemalloc_ldflags}]) TS_ADDTO_RPATH(${jemalloc_ldflags}) fi # On Darwin, jemalloc symbols are prefixed with je_. Search for that first, then fall back