This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Build break on SPU (and other non-mmap systems?) (Re: [patch,libgfortran,toplevel] Use libbacktrace in libgfortran)


> 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]