aboutsummaryrefslogtreecommitdiff
path: root/gcc/configure.ac
diff options
context:
space:
mode:
authorAlexander Ivchenko <alexander.ivchenko@intel.com>2016-09-09 21:38:06 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2016-09-09 14:38:06 -0700
commit7e4955774fe4e365ec762a51d90ef6365b8be315 (patch)
tree7fffb6b63dfdd2d0db6edabc6cacba2f58086af7 /gcc/configure.ac
parentaf63ba4b309ea3ff8946be59e8dba7333594f4ff (diff)
downloadgcc-7e4955774fe4e365ec762a51d90ef6365b8be315.zip
gcc-7e4955774fe4e365ec762a51d90ef6365b8be315.tar.gz
gcc-7e4955774fe4e365ec762a51d90ef6365b8be315.tar.bz2
re PR target/77267 (MPX does not work in a presence of "-Wl,-as-needed" option (Ubuntu default))
Fix PR target/77267 2016-09-10 Alexander Ivchenko <alexander.ivchenko@intel.com> PR target/77267 * config.in: Regenerate. * config/i386/linux-common.h (MPX_LD_AS_NEEDED_GUARD_PUSH): New macro. (MPX_LD_AS_NEEDED_GUARD_PUSH): Ditto. (LIBMPXWRAPPERS_SPEC): Remove "--no-whole-archive" from static-libmpxwrappers case. (LIBMPX_SPEC): Add guards with MPX_LD_AS_NEEDED_GUARD_PUSH and MPX_LD_AS_NEEDED_GUARD_POP. * configure: Regenerate. * configure.ac (HAVE_LD_PUSHPOPSTATE_SUPPORT): New variable. defined if linker support "--push-state"/"--pop-state". From-SVN: r240057
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r--gcc/configure.ac21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 241e82d..93af766 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -6237,6 +6237,27 @@ if test x"$ld_bndplt_support" = xyes; then
fi
AC_MSG_RESULT($ld_bndplt_support)
+# Check linker supports '--push-state'/'--pop-state'
+ld_pushpopstate_support=no
+AC_MSG_CHECKING(linker --push-state/--pop-state options)
+if test x"$ld_is_gold" = xno; then
+ if test $in_tree_ld = yes ; then
+ if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 25 -o "$gcc_cv_gld_major_version" -gt 2; then
+ ld_pushpopstate_support=yes
+ fi
+ elif test x$gcc_cv_ld != x; then
+ # Check if linker supports --push-state/--pop-state options
+ if $gcc_cv_ld --help 2>/dev/null | grep -- '--push-state' > /dev/null; then
+ ld_pushpopstate_support=yes
+ fi
+ fi
+fi
+if test x"$ld_pushpopstate_support" = xyes; then
+ AC_DEFINE(HAVE_LD_PUSHPOPSTATE_SUPPORT, 1,
+ [Define if your linker supports --push-state/--pop-state])
+fi
+AC_MSG_RESULT($ld_pushpopstate_support)
+
# Configure the subdirectories
# AC_CONFIG_SUBDIRS($subdirs)