diff mbox

disable libmpx x32 multilib builds

Message ID 20150312085821.GI27860@msticlxl57.ims.intel.com
State New
Headers show

Commit Message

Ilya Enkovich March 12, 2015, 8:58 a.m. UTC
On 11 Mar 19:11, Ilya Enkovich wrote:
> 2015-03-11 18:59 GMT+03:00 H.J. Lu <hjl.tools@gmail.com>:
> > On Wed, Mar 11, 2015 at 7:37 AM, Matthias Klose <doko@ubuntu.com> wrote:
> >> current trunk fails to build on x86*-linux, when configured for x32 multilibs
> >> because libmpx doesn't support these. Disable them.
> >>
> >> ok for the trunk?
> >>
> >>         * Disable libmpx x32 multilib builds.
> >>
> >> --- a/config-ml.in
> >> +++ b/config-ml.in
> >> @@ -102,6 +102,7 @@
> >>  Makefile=${ac_file-Makefile}
> >>  ml_config_shell=${CONFIG_SHELL-/bin/sh}
> >>  ml_realsrcdir=${srcdir}
> >> +ml_srcbase=`basename $ml_realsrcdir`
> >>
> >>  # Scan all the arguments and set all the ones we need.
> >>
> >> @@ -220,6 +221,10 @@
> >>    if [ "${dir}" = "." ]; then
> >>      true
> >>    else
> >> +    # libmpx is not supported on x32
> >> +    if [ "${ml_srcbase}-${dir}" = libmpx-x32 ]; then
> >> +      continue
> >> +    fi
> >>      if [ -z "${multidirs}" ]; then
> >>        multidirs="${dir}"
> >>      else
> >
> > This is incorrect.  Ilya and I are working on a proper fix.
> >
> > --
> > H.J.
> 
> Current libmpx configure has a check for x32 but it doesn't work due
> to square brackets removed from the test by autoconf. Will test this
> patch:
> 
> diff --git a/libmpx/configure.ac b/libmpx/configure.ac
> index 4669525..fe0d3f2 100644
> --- a/libmpx/configure.ac
> +++ b/libmpx/configure.ac
> @@ -28,7 +28,7 @@ GCC_LIBSTDCXX_RAW_CXX_FLAGS
>  # See if supported.
>  unset LIBMPX_SUPPORTED
>  AC_MSG_CHECKING([for target support for Intel MPX runtime library])
> -echo "int i[sizeof (void *) == 4 ? 1 : -1] = { __x86_64__ };" > conftest.c
> +echo "int i[[sizeof (void *) == 4 ? 1 : -1]] = { __x86_64__ };" > conftest.c
>  if AC_TRY_COMMAND([${CC} ${CFLAGS} -c -o conftest.o conftest.c
> 1>&AS_MESSAGE_LOG_FD])
>  then
>      LIBMPX_SUPPORTED=no
> 
> 
> Thanks,
> Ilya

Successfully bootstrapped on on x86_64-unknown-linux-gnu with '--enable-libmpx --with-multilib-list=m32,m64,mx32'.  Applied to trunk.

Thanks,
Ilya
--
2015-03-12  Ilya Enkovich  <ilya.enkovich@intel.com>

	PR other/65384
	* configure.ac: Fix x32 test.
	* configure: Regenerate.
diff mbox

Patch

diff --git a/libmpx/configure.ac b/libmpx/configure.ac
index 4669525..fe0d3f2 100644
--- a/libmpx/configure.ac
+++ b/libmpx/configure.ac
@@ -28,7 +28,7 @@  GCC_LIBSTDCXX_RAW_CXX_FLAGS
 # See if supported.
 unset LIBMPX_SUPPORTED
 AC_MSG_CHECKING([for target support for Intel MPX runtime library])
-echo "int i[sizeof (void *) == 4 ? 1 : -1] = { __x86_64__ };" > conftest.c
+echo "int i[[sizeof (void *) == 4 ? 1 : -1]] = { __x86_64__ };" > conftest.c
 if AC_TRY_COMMAND([${CC} ${CFLAGS} -c -o conftest.o conftest.c 1>&AS_MESSAGE_LOG_FD])
 then
     LIBMPX_SUPPORTED=no