From: Joseph Myers <joseph@codesourcery.com>
To: Ilya Enkovich <enkovich.gnu@gmail.com>
Cc: Jeff Law <law@redhat.com>, Andi Kleen <andi@firstfloor.org>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH, MPX runtime 1/2] Integrate MPX runtime library
Date: Fri, 21 Nov 2014 23:49:00 -0000 [thread overview]
Message-ID: <alpine.DEB.2.10.1411212315040.32250@digraph.polyomino.org.uk> (raw)
In-Reply-To: <20141121153405.GB30483@msticlxl57.ims.intel.com>
On Fri, 21 Nov 2014, Ilya Enkovich wrote:
> +# Disable libmpx on unsupported systems.
> +if test -d ${srcdir}/libmpx; then
> + if test x$enable_libmpx = x; then
> + AC_MSG_CHECKING([for libmpx support])
> + if (srcdir=${srcdir}/libmpx; \
> + . ${srcdir}/configure.tgt; \
> + test "$LIBMPX_SUPPORTED" != "yes")
> + then
> + AC_MSG_RESULT([no])
> + noconfigdirs="$noconfigdirs target-libmpx"
> + else
> + AC_MSG_RESULT([yes])
> + fi
> + fi
> +fi
Using this at toplevel you can only enable or disable for all multilibs -
this code runs just once. But:
> diff --git a/libmpx/configure.tgt b/libmpx/configure.tgt
> +LIBMPX_SUPPORTED=no
> +case "${target}" in
> + x86_64-*-linux* | i?86-*-linux*)
> + # X32 doesn't support MPX.
> + echo "int i[sizeof (void *) == 4 ? 1 : -1] = { __x86_64__ };" > conftestx.c
> + if ${CC} ${CFLAGS} -c -o conftestx.o conftestx.c > /dev/null 2>&1; then
> + LIBMPX_SUPPORTED=no
> + else
> + LIBMPX_SUPPORTED=yes
> + fi
> + ;;
Here you are testing something per-multilib. Furthermore, using CC and
CFLAGS here is wrong when used by toplevel configure, as at toplevel
they'll relate to the host rather than the target.
So you need to separate the two tests of (a) might MPX be supported for
some multilib on the target (usable at toplevel, not using CC or CFLAGS)
and (b) is it supported for the present multilib. Thus the libmpx
directory will need configuring for all multilibs for supported targets.
Then, if the particular multilib doesn't support it (i.e. is x32), you'll
need to arrange for the directory not to build or install anything - much
like the libquadmath directory gets configured in some cases where it
doesn't build anything.
--
Joseph S. Myers
joseph@codesourcery.com
next prev parent reply other threads:[~2014-11-21 23:20 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-11 15:37 Ilya Enkovich
2014-11-11 18:09 ` Joseph Myers
2014-11-11 18:15 ` Joseph Myers
2014-11-11 20:26 ` Ilya Enkovich
2014-11-11 18:49 ` Andi Kleen
2014-11-11 20:22 ` H.J. Lu
2014-11-11 21:04 ` Andi Kleen
2014-11-11 21:11 ` H.J. Lu
2014-11-11 21:24 ` Andi Kleen
2014-11-11 21:37 ` Joseph Myers
2014-11-11 22:07 ` H.J. Lu
2014-11-11 22:10 ` Joseph Myers
2014-11-11 20:36 ` Joseph Myers
2014-11-12 16:20 ` Ilya Enkovich
2014-11-12 21:41 ` Joseph Myers
2014-11-12 22:56 ` Ilya Enkovich
2014-11-12 23:11 ` Joseph Myers
2014-11-13 8:39 ` Ilya Enkovich
2014-11-13 20:56 ` Joseph Myers
2014-11-19 14:18 ` Ilya Enkovich
2014-11-19 18:05 ` Jeff Law
2014-11-19 18:16 ` Ilya Enkovich
2014-11-21 16:04 ` Ilya Enkovich
2014-11-21 23:49 ` Joseph Myers [this message]
2014-11-24 14:28 ` Ilya Enkovich
2014-12-09 8:25 ` Ilya Enkovich
2014-12-09 20:48 ` Jeff Law
2014-12-09 20:56 ` Ilya Enkovich
2015-03-02 16:19 ` Ilya Enkovich
2015-03-04 17:36 ` Jeff Law
2014-11-22 0:26 ` Joseph Myers
2014-11-11 20:06 ` Jeff Law
2014-11-11 20:24 ` Ilya Enkovich
2014-11-12 20:53 ` Jeff Law
2014-11-12 8:36 ` Richard Biener
2014-11-12 8:38 ` Jakub Jelinek
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=alpine.DEB.2.10.1411212315040.32250@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=andi@firstfloor.org \
--cc=enkovich.gnu@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=law@redhat.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).