[patch] disable libmpx x32 multilib builds

2015-03-12 Thread Matthias Klose
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


Re: [patch] disable libmpx x32 multilib builds

2015-03-12 Thread Ilya Enkovich
On 11 Mar 19:11, Ilya Enkovich wrote:
 2015-03-11 18:59 GMT+03:00 H.J. Lu hjl.to...@gmail.com:
  On Wed, Mar 11, 2015 at 7:37 AM, Matthias Klose d...@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
 1AS_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.enkov...@intel.com

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


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 
1AS_MESSAGE_LOG_FD])
 then
 LIBMPX_SUPPORTED=no


Re: [patch] disable libmpx x32 multilib builds

2015-03-11 Thread H.J. Lu
On Wed, Mar 11, 2015 at 7:37 AM, Matthias Klose d...@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.


Re: [patch] disable libmpx x32 multilib builds

2015-03-11 Thread Ilya Enkovich
2015-03-11 18:59 GMT+03:00 H.J. Lu hjl.to...@gmail.com:
 On Wed, Mar 11, 2015 at 7:37 AM, Matthias Klose d...@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
1AS_MESSAGE_LOG_FD])
 then
 LIBMPX_SUPPORTED=no


Thanks,
Ilya