public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: FX <fxcoudert@gmail.com>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: iant@google.com, gfortran <fortran@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: Build break on SPU (and other non-mmap systems?) (Re: [patch,libgfortran,toplevel] Use libbacktrace in libgfortran)
Date: Mon, 24 Aug 2015 12:41:00 -0000	[thread overview]
Message-ID: <5E9275E2-1488-45B2-8074-3D92A5320DF3@gmail.com> (raw)
In-Reply-To: <20150824121739.42DC0CD56@oc7340732750.ibm.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

  reply	other threads:[~2015-08-24 12:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-14  9:23 [patch,libgfortran,toplevel] Use libbacktrace in libgfortran FX
2015-08-14 14:19 ` Ian Lance Taylor
2015-08-24 12:27 ` Build break on SPU (and other non-mmap systems?) (Re: [patch,libgfortran,toplevel] Use libbacktrace in libgfortran) Ulrich Weigand
2015-08-24 12:41   ` FX [this message]
2015-08-24 13:15     ` Ulrich Weigand
2015-08-24 13:44       ` FX
2015-08-24 17:31       ` Jeff Law
2015-08-24 18:56         ` Ulrich Weigand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5E9275E2-1488-45B2-8074-3D92A5320DF3@gmail.com \
    --to=fxcoudert@gmail.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iant@google.com \
    --cc=uweigand@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).