Module Name: src
Committed By: rin
Date: Thu Aug 24 06:02:44 UTC 2023
Modified Files:
src/external/bsd/jemalloc/lib: Makefile jemalloc_stub.c
Log Message:
libjemalloc: Compile in empty jemalloc_stub.c for HAVE_JEMALLOC=100
Fix strange parallel build failures observed on vax and sun2, which
should be due to empty SRCS.
No functional changes as library itself.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/jemalloc/lib/Makefile
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/jemalloc/lib/jemalloc_stub.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/jemalloc/lib/Makefile
diff -u src/external/bsd/jemalloc/lib/Makefile:1.4 src/external/bsd/jemalloc/lib/Makefile:1.5
--- src/external/bsd/jemalloc/lib/Makefile:1.4 Mon Jul 10 07:59:24 2023
+++ src/external/bsd/jemalloc/lib/Makefile Thu Aug 24 06:02:44 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2023/07/10 07:59:24 mrg Exp $
+# $NetBSD: Makefile,v 1.5 2023/08/24 06:02:44 rin Exp $
WARNS?= 5
.include <bsd.init.mk>
@@ -6,8 +6,7 @@ WARNS?= 5
LIB=jemalloc
# The symbols from the stub only exist in newer jemalloc.
-.if ${HAVE_JEMALLOC:U0} != 100
-SRCS=jemalloc_stub.c
-.endif
+CPPFLAGS+= -DHAVE_JEMALLOC=${HAVE_JEMALLOC:U0}
+SRCS= jemalloc_stub.c
.include <bsd.lib.mk>
Index: src/external/bsd/jemalloc/lib/jemalloc_stub.c
diff -u src/external/bsd/jemalloc/lib/jemalloc_stub.c:1.1 src/external/bsd/jemalloc/lib/jemalloc_stub.c:1.2
--- src/external/bsd/jemalloc/lib/jemalloc_stub.c:1.1 Tue Mar 12 15:13:25 2019
+++ src/external/bsd/jemalloc/lib/jemalloc_stub.c Thu Aug 24 06:02:44 2023
@@ -26,6 +26,8 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
+
+#if HAVE_JEMALLOC != 100
#include <malloc.h>
void *__je_mallocx(size_t, int);
@@ -139,3 +141,4 @@ void malloc_conf_set(const char *m)
{
__je_malloc_conf_set(m);
}
+#endif /* HAVE_JEMALLOC != 100 */