summaryrefslogtreecommitdiffstats
path: root/contrib/jemalloc
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-04-24 18:41:17 +0000
committerdim <dim@FreeBSD.org>2012-04-24 18:41:17 +0000
commitcdd8faf2987f8ecc3974ae2aa6f6b89ae5b1ed29 (patch)
tree9c17cdeffbe48e81dcea5c1002f44c8ffb89b1fa /contrib/jemalloc
parentfa609f4d93f798de2153e04476f9b825aa469491 (diff)
downloadFreeBSD-src-cdd8faf2987f8ecc3974ae2aa6f6b89ae5b1ed29.zip
FreeBSD-src-cdd8faf2987f8ecc3974ae2aa6f6b89ae5b1ed29.tar.gz
Work around llvm PR 12623, which makes variables declared with .symver
sometimes disappear from the resulting object file, if compiled with clang. In particular, this can lead to errors when building world with clang and -g, similar to: /usr/obj/usr/src/tmp/usr/lib/libc.so: undefined reference to `_malloc_options' Reported by: Conrad J. Sabatier <conrads@.no.cox.net> Reviewed by: jasone
Diffstat (limited to 'contrib/jemalloc')
-rw-r--r--contrib/jemalloc/src/jemalloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/jemalloc/src/jemalloc.c b/contrib/jemalloc/src/jemalloc.c
index 8e24a5a..9292d26 100644
--- a/contrib/jemalloc/src/jemalloc.c
+++ b/contrib/jemalloc/src/jemalloc.c
@@ -8,7 +8,8 @@ malloc_tsd_data(, arenas, arena_t *, NULL)
malloc_tsd_data(, thread_allocated, thread_allocated_t,
THREAD_ALLOCATED_INITIALIZER)
-const char *__malloc_options_1_0;
+/* Work around <http://llvm.org/bugs/show_bug.cgi?id=12623>: */
+const char *__malloc_options_1_0 = NULL;
__sym_compat(_malloc_options, __malloc_options_1_0, FBSD_1.0);
/* Runtime configuration options. */
OpenPOWER on IntegriCloud