diff options
author | Ilya Enkovich <ilya.enkovich@intel.com> | 2015-04-02 08:15:49 +0000 |
---|---|---|
committer | Ilya Enkovich <ienkovich@gcc.gnu.org> | 2015-04-02 08:15:49 +0000 |
commit | 512470bb907b267e6cf5b990215dd4d22425d95d (patch) | |
tree | bd4f3ce6c25d8977eb5decebecb83a4ec07c4ca3 /libmpx | |
parent | a8caf3514910c6d8513910e9c9d4c8e6b1b3ad0f (diff) | |
download | gcc-512470bb907b267e6cf5b990215dd4d22425d95d.zip gcc-512470bb907b267e6cf5b990215dd4d22425d95d.tar.gz gcc-512470bb907b267e6cf5b990215dd4d22425d95d.tar.bz2 |
re PR driver/65444 (-z bndplt isn't passed to linker for -mmpx when building dynamic objects)
gcc/
PR driver/65444
* config/i386/linux-common.h (MPX_SPEC): New.
(CHKP_SPEC): Add MPX_SPEC.
* doc/invoke.texi (-fcheck-pointer-boudns): Document
possible issues with '-z bndplt' support in linker.
libmpx/
PR driver/65444
* configure.ac: Add check for '-z bndplt' support
by linker. Add link_mpx output variable.
* libmpx.spec.in (link_mpx): New.
* configure: Regenerate.
From-SVN: r221831
Diffstat (limited to 'libmpx')
-rw-r--r-- | libmpx/ChangeLog | 8 | ||||
-rw-r--r-- | libmpx/configure | 24 | ||||
-rw-r--r-- | libmpx/configure.ac | 11 | ||||
-rw-r--r-- | libmpx/libmpx.spec.in | 4 |
4 files changed, 44 insertions, 3 deletions
diff --git a/libmpx/ChangeLog b/libmpx/ChangeLog index 35bdeab..6b05278 100644 --- a/libmpx/ChangeLog +++ b/libmpx/ChangeLog @@ -1,3 +1,11 @@ +2015-04-02 Ilya Enkovich <ilya.enkovich@intel.com> + + PR driver/65444 + * configure.ac: Add check for '-z bndplt' support + by linker. Add link_mpx output variable. + * libmpx.spec.in (link_mpx): New. + * configure: Regenerate. + 2015-03-12 Ilya Enkovich <ilya.enkovich@intel.com> PR other/65384 diff --git a/libmpx/configure b/libmpx/configure index 3bbb54c..aeaa483 100644 --- a/libmpx/configure +++ b/libmpx/configure @@ -670,6 +670,7 @@ am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM +link_mpx link_libmpx LIBMPX_SUPPORTED_FALSE LIBMPX_SUPPORTED_TRUE @@ -2523,6 +2524,25 @@ fi link_libmpx="-lpthread" +link_mpx="" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ld accepts -z bndplt" >&5 +$as_echo_n "checking whether ld accepts -z bndplt... " >&6; } +echo "int main() {};" > conftest.c +if { ac_try='${CC} ${CFLAGS} -Wl,-z,bndplt -o conftest conftest.c 1>&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } +then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + link_mpx="$link_mpx -z bndplt" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + am__api_version='1.11' @@ -11648,7 +11668,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11651 "configure" +#line 11671 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11754,7 +11774,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11757 "configure" +#line 11777 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libmpx/configure.ac b/libmpx/configure.ac index fe0d3f2..3f8b50f 100644 --- a/libmpx/configure.ac +++ b/libmpx/configure.ac @@ -40,7 +40,18 @@ AC_MSG_RESULT($LIBMPX_SUPPORTED) AM_CONDITIONAL(LIBMPX_SUPPORTED, [test "x$LIBMPX_SUPPORTED" = "xyes"]) link_libmpx="-lpthread" +link_mpx="" +AC_MSG_CHECKING([whether ld accepts -z bndplt]) +echo "int main() {};" > conftest.c +if AC_TRY_COMMAND([${CC} ${CFLAGS} -Wl,-z,bndplt -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD]) +then + AC_MSG_RESULT([yes]) + link_mpx="$link_mpx -z bndplt" +else + AC_MSG_RESULT([no]) +fi AC_SUBST(link_libmpx) +AC_SUBST(link_mpx) AM_INIT_AUTOMAKE(foreign no-dist no-dependencies) AM_ENABLE_MULTILIB(, ..) diff --git a/libmpx/libmpx.spec.in b/libmpx/libmpx.spec.in index a265e28..34d0bdf 100644 --- a/libmpx/libmpx.spec.in +++ b/libmpx/libmpx.spec.in @@ -1,3 +1,5 @@ # This spec file is read by gcc when linking. It is used to specify the -# standard libraries we need in order to link with libcilkrts. +# standard libraries we need in order to link with libmpx. *link_libmpx: @link_libmpx@ + +*link_mpx: @link_mpx@ |