On Sat, Apr 4, 2020 at 1:35 PM H.J. Lu <hjl.to...@gmail.com> wrote: > > On Sat, Apr 4, 2020 at 1:28 PM Eric Botcazou <botca...@adacore.com> wrote: > > > > > Hmmm, sorry about that. Which target? x86_64? It does seem that > > > glibc consolidated mmap implementations in 2.26, but even in 2.22 I > > > see definitions for __mmap. > > > > commit fa872e1b6210e81e60d6029429f0a083b8eab26e > Author: Adhemerval Zanella <adhemerval.zane...@linaro.org> > Date: Fri Dec 2 16:32:28 2016 -0200 > > Clean pthread functions namespaces for C11 threads > ... > * misc/Versions (libc): Export __mmap, __munmap, __mprotect, > __sched_get_priority_min, and __sched_get_priority_max under > GLIBC_PRIVATE. > > was checked into glibc 2.26.
Thanks. I committed this patch. Ian
diff --git a/libgcc/generic-morestack.c b/libgcc/generic-morestack.c index bb9f67a7366..fa2062e2bb3 100644 --- a/libgcc/generic-morestack.c +++ b/libgcc/generic-morestack.c @@ -60,7 +60,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see glibc on GNU/Linux we can avoid the problem by calling __mmap and __munmap. */ -#ifdef __gnu_linux__ +#if defined(__gnu_linux__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 26)) extern void *__mmap (void *, size_t, int, int, int, off_t); extern int __munmap (void *, size_t);