From 4fdb8d2aae647b490f973e14bbaa6bcf2e77c6a0 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Tue, 24 Apr 2012 18:41:17 +0000 Subject: [PATCH] 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 Reviewed by: jasone --- contrib/jemalloc/src/jemalloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/jemalloc/src/jemalloc.c b/contrib/jemalloc/src/jemalloc.c index 8e24a5a045b..9292d26f6fb 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 : */ +const char *__malloc_options_1_0 = NULL; __sym_compat(_malloc_options, __malloc_options_1_0, FBSD_1.0); /* Runtime configuration options. */