diff options
| author | Robin Haberkorn <rhaberkorn@fmsbw.de> | 2026-05-19 21:21:52 +0400 |
|---|---|---|
| committer | Robin Haberkorn <rhaberkorn@fmsbw.de> | 2026-05-20 00:07:05 +0400 |
| commit | 62177d06bd9d31242e67995d4e33a755a3447ca2 (patch) | |
| tree | 41cf5451e1d93a0e7a8ae94d60ebc2bdc7607e08 /contrib/dlmalloc/Makefile.am | |
| parent | c011363117c18d9332c42d4e5ec7f6ba3f932ec3 (diff) | |
check for sbrk() even on UNIX
* Turns out that not all UNIXes support sbrk().
FreeBSD arm64 and riscv ports don't implement sbrk().
It's also apparently not in POSIX - so other systems might also
be affected.
This needs to be passed on to dlmalloc.
* We now use DLMALLOC_CPPFLAGS instead of conditionals to pass
on flags to dlmalloc.
* Should be backported to the FreeBSD v2.5.2 package
to fix Poudriere fallout.
Diffstat (limited to 'contrib/dlmalloc/Makefile.am')
| -rw-r--r-- | contrib/dlmalloc/Makefile.am | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/contrib/dlmalloc/Makefile.am b/contrib/dlmalloc/Makefile.am index 223ed13..73232d7 100644 --- a/contrib/dlmalloc/Makefile.am +++ b/contrib/dlmalloc/Makefile.am @@ -1,6 +1,6 @@ # Source: http://gee.cs.oswego.edu/dl/html/malloc.html # -# FIXME: On FreeBSD, we might implement a compatible mremap() based on the BSD mremap() and pass +# FIXME: On NetBSD, we might implement a compatible mremap() based on the NetBSD mremap() and pass # in -DHAVE_MREMAP=1 -DMREMAP=mremap_bsd. We'll have to add a declaration to malloc.c or # use -include mremap_bsd.h in CPPFLAGS. # @@ -8,10 +8,7 @@ # for increased portability. There is also AC_LIBOBJ, but it's usually for defining sources of # replacement libraries. -AM_CPPFLAGS = -DNO_MALLINFO=1 -DNO_MALLOC_STATS=1 -DUSE_LOCKS=1 -DUSE_DL_PREFIX -if !DEBUG -AM_CPPFLAGS += -DINSECURE=1 -endif +AM_CPPFLAGS = @DLMALLOC_CPPFLAGS@ -DNO_MALLINFO=1 -DNO_MALLOC_STATS=1 -DUSE_LOCKS=1 -DUSE_DL_PREFIX # FIXME: This optimization is still broken as of GCC v9.3.0. # This is a known GCC bug, triggered by memset() in calloc(). |
