diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2014-05-28 11:32:54 +0000 |
---|---|---|
committer | Rainer Orth <ro@gcc.gnu.org> | 2014-05-28 11:32:54 +0000 |
commit | 3c698bf09bbb3c96d568011c7b62a49c9d67f928 (patch) | |
tree | 7a94d4d83dba15233aa76c30e53b2b3f9bd8d99e /libitm | |
parent | 4c8bd90f9f48591980394092c4748678c37049ff (diff) | |
download | gcc-3c698bf09bbb3c96d568011c7b62a49c9d67f928.tar.gz |
Centralise clearing hardware capabilities with Sun ld
gcc:
* configure.ac ($gcc_cv_ld_clearcap): New test.
* configure: Regenerate.
* config.in: Regenerate.
* config/sol2.opt (mclear-hwcap): New option.
* config/sol2.h (LINK_CLEARCAP_SPEC): Define.
* config/sol2-clearcap.map: Moved here from
testsuite/gcc.target/i386/clearcap.map.
* config/sol2-clearcapv2.map: Move here from
gcc.target/i386/clearcapv2.map.
* config/t-sol2 (install): Depend on install-clearcap-map.
(install-clearcap-map): New target.
* doc/invoke.texi (Option Summary, Solaris 2 Options): Document
-mclear-hwcap.
gcc/testsuite:
* lib/clearcap.exp: New file.
* gcc.dg/vect/vect.exp: Load clearcap.exp.
Remove clearcap_ldflags handling.
Call clearcap-init, clearcap-finish.
* gcc.target/i386/i386.exp: Likewise.
* gcc.target/i386/clearcap.map: Move to ../config/sol2-clearcap.map.
* gcc.target/i386/clearcapv2.map: Move to
../config/sol2-clearcapv2.map.
* gcc.target/x86_64/abi/avx/abi-avx.exp: Likewise.
* gcc.target/x86_64/abi/avx512f/abi-avx512f.exp: Likewise.
libitm:
* acinclude.m4 (LIBITM_CHECK_LINKER_HWCAP): Check for
-mclear-hwcap instead.
* configure: Regenerate.
* clearcap.map: Remove.
From-SVN: r211014
Diffstat (limited to 'libitm')
-rw-r--r-- | libitm/ChangeLog | 7 | ||||
-rw-r--r-- | libitm/acinclude.m4 | 10 | ||||
-rw-r--r-- | libitm/clearcap.map | 14 | ||||
-rw-r--r-- | libitm/configure | 8 |
4 files changed, 16 insertions, 23 deletions
diff --git a/libitm/ChangeLog b/libitm/ChangeLog index 7dedbb494b1..17bb0a66448 100644 --- a/libitm/ChangeLog +++ b/libitm/ChangeLog @@ -1,3 +1,10 @@ +2014-05-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * acinclude.m4 (LIBITM_CHECK_LINKER_HWCAP): Check for + -mclear-hwcap instead. + * configure: Regenerate. + * clearcap.map: Remove. + 2014-05-21 John Marino <gnugcc@marino.st> * configure.tgt (*-*-dragonfly*): New target. diff --git a/libitm/acinclude.m4 b/libitm/acinclude.m4 index ca7e0a92118..a82f6d6179b 100644 --- a/libitm/acinclude.m4 +++ b/libitm/acinclude.m4 @@ -301,10 +301,10 @@ AC_DEFUN([LIBITM_CHECK_LINKER_FEATURES], [ dnl dnl Check if the linker used supports linker maps to clear hardware -dnl capabilities. This is only supported by Sun ld at the moment. +dnl capabilities. This is only supported on Solaris at the moment. dnl dnl Defines: -dnl HWCAP_LDFLAGS='-Wl,-M,clearcap.map' if possible +dnl HWCAP_LDFLAGS=-mclear-hwcap if possible dnl LD (as a side effect of testing) dnl AC_DEFUN([LIBITM_CHECK_LINKER_HWCAP], [ @@ -312,12 +312,12 @@ AC_DEFUN([LIBITM_CHECK_LINKER_HWCAP], [ AC_REQUIRE([AC_PROG_LD]) ac_save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LFLAGS -Wl,-M,$srcdir/clearcap.map" + LDFLAGS="$LFLAGS -mclear-hwcap" - AC_MSG_CHECKING([for ld that supports -Wl,-M,mapfile]) + AC_MSG_CHECKING([for -mclear-hwcap]) AC_TRY_LINK([], [return 0;], [ac_hwcap_ldflags=yes],[ac_hwcap_ldflags=no]) if test "$ac_hwcap_ldflags" = "yes"; then - HWCAP_LDFLAGS="-Wl,-M,$srcdir/clearcap.map $HWCAP_LDFLAGS" + HWCAP_LDFLAGS="-mclear-hwcap $HWCAP_LDFLAGS" fi AC_MSG_RESULT($ac_hwcap_ldflags) diff --git a/libitm/clearcap.map b/libitm/clearcap.map deleted file mode 100644 index bd8189b43ff..00000000000 --- a/libitm/clearcap.map +++ /dev/null @@ -1,14 +0,0 @@ -# Clear hardware capabilities emitted by Sun as: calls to the x86_avx.c -# functions are only emitted with -mavx. -# -# The v1 mapfile syntax has no support for clearing specific capabilities, -# so clear everything. -# -hwcap_1 = V0x0 OVERRIDE; -# -# If we can assume mapfile v2 syntax, we can specificially clear AVX. -# -#$mapfile_version 2 -#CAPABILITY { -# HW -= AVX; -#}; diff --git a/libitm/configure b/libitm/configure index 031c19ce337..ce6d50a7d3a 100644 --- a/libitm/configure +++ b/libitm/configure @@ -16739,10 +16739,10 @@ with_gnu_ld=$lt_cv_prog_gnu_ld ac_save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LFLAGS -Wl,-M,$srcdir/clearcap.map" + LDFLAGS="$LFLAGS -mclear-hwcap" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,-M,mapfile" >&5 -$as_echo_n "checking for ld that supports -Wl,-M,mapfile... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -mclear-hwcap" >&5 +$as_echo_n "checking for -mclear-hwcap... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -16762,7 +16762,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_hwcap_ldflags" = "yes"; then - HWCAP_LDFLAGS="-Wl,-M,$srcdir/clearcap.map $HWCAP_LDFLAGS" + HWCAP_LDFLAGS="-mclear-hwcap $HWCAP_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_hwcap_ldflags" >&5 $as_echo "$ac_hwcap_ldflags" >&6; } |