This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Build break on SPU (and other non-mmap systems?) (Re: [patch,libgfortran,toplevel] Use libbacktrace in libgfortran)
- From: FX <fxcoudert at gmail dot com>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: iant at google dot com, gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 24 Aug 2015 14:37:58 +0200
- Subject: Re: Build break on SPU (and other non-mmap systems?) (Re: [patch,libgfortran,toplevel] Use libbacktrace in libgfortran)
- Authentication-results: sourceware.org; auth=none
- References: <20150824121739 dot 42DC0CD56 at oc7340732750 dot ibm dot com>
> On the SPU, mmap is indeed not available. Before that change, it was still
> possible to build libgfortran for SPU ...
>
> Is the intent to now require mmap on every system that supports libgfortran,
> or should use of mmap in libbacktrace be optional in some form?
The idea is that libbacktrace should be able to build on all targets, at least in a minimally-functional form: https://gcc.gnu.org/ml/gcc/2015-08/msg00038.html
libgfortran should continue to build on all targets, even those that donât have an mmap().
I see that there is a test in libbacktrace/configure.ac for mmap(), but apparently it fails on your system:
--------------------------------
AC_CHECK_HEADERS(sys/mman.h)
if test "$ac_cv_header_sys_mman_h" = "no"; then
have_mmap=no
else
if test -n "${with_target_subdir}"; then
# When built as a GCC target library, we can't do a link test. We
# simply assume that if we have mman.h, we have mmap.
have_mmap=yes
else
AC_CHECK_FUNC(mmap, [have_mmap=yes], [have_mmap=no])
fi
fi
--------------------------------
So this should be the place to patch things up. Relying on the presence of <sys/mman.h> is apparently not restrictive enough. Maybe we could use a AC_EGREP_HEADER test, as is currently done for dl_interate_phdr()?
FX