aboutsummaryrefslogtreecommitdiff
path: root/config/hwcaps.m4
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2018-01-10 15:29:21 +0000
committerNick Clifton <nickc@redhat.com>2018-01-10 15:29:21 +0000
commitbf41f30dde0f2ad09c2b7a9894fd7992e4b36a16 (patch)
treebe4f62c520eb0b0652899b45cac10b2d9e92db0f /config/hwcaps.m4
parent2a8ae7146cacb006105e2e9c6f4635aca543e7ec (diff)
downloadgdb-bf41f30dde0f2ad09c2b7a9894fd7992e4b36a16.zip
gdb-bf41f30dde0f2ad09c2b7a9894fd7992e4b36a16.tar.gz
gdb-bf41f30dde0f2ad09c2b7a9894fd7992e4b36a16.tar.bz2
Update top level configure files by synchronizing them with gcc.
. * config-ml.in: Sync with gcc sources. * config.guess: Likewise. * config.sub: Likewise. * configure.ac: Likewise. * configure: Regenerate. config * Sync with GCC sources: 2017-11-14 Boris Kolpackov <boris@codesynthesis.com> * gcc-plugin.m4: Add support for MinGW. 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com> * cet.m4: New file. 2017-11-15 Alexandre Oliva <aoliva@redhat.com> * bootstrap-debug-lean.mk (do-compare): Use the contrib/compare-debug script. 2017-10-24 H.J. Lu <hongjiu.lu@intel.com> * bootstrap-cet.mk: New file. 2017-06-19 Martin Liska <mliska@suse.cz> * bootstrap-lto-noplugin.mk: Enable -flto in all PGO stages. * bootstrap-lto.mk: Likewise. 2017-06-03 Eric Botcazou <ebotcazou@adacore.com> * mt-android: New file. 2017-02-13 Richard Biener <rguenther@suse.de> * isl.m4: Remove support for ISL 0.14. 2017-01-19 Uros Bizjak <ubizjak@gmail.com> PR target/78478 * ax_check_define.m4: New file. 2017-01-17 Jakub Jelinek <jakub@redhat.com> PR other/79046 * acx.m4 (GCC_BASE_VER): New m4 function. (ACX_TOOL_DIRS): Require GCC_BASE_VER, for --with-gcc-major-version-only use just major number from BASE-VER. 2017-01-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> PR go/78978 * hwcaps.m4 (GCC_CHECK_ASSEMBLER_HWCAP): New macro.
Diffstat (limited to 'config/hwcaps.m4')
-rw-r--r--config/hwcaps.m460
1 files changed, 60 insertions, 0 deletions
diff --git a/config/hwcaps.m4 b/config/hwcaps.m4
new file mode 100644
index 0000000..ff352fd
--- /dev/null
+++ b/config/hwcaps.m4
@@ -0,0 +1,60 @@
+dnl
+dnl Check if the assembler used supports disabling generation of hardware
+dnl capabilities. This is only supported by Solaris as at the moment.
+dnl
+dnl Defines:
+dnl HWCAP_CFLAGS='-Wa,-nH' if possible.
+dnl
+AC_DEFUN([GCC_CHECK_ASSEMBLER_HWCAP], [
+ test -z "$HWCAP_CFLAGS" && HWCAP_CFLAGS=''
+
+ # Restrict the test to Solaris, other assemblers (e.g. AIX as) have -nH
+ # with a different meaning.
+ case ${target_os} in
+ solaris2*)
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Wa,-nH"
+
+ AC_MSG_CHECKING([for as that supports -Wa,-nH])
+ AC_TRY_COMPILE([], [return 0;], [ac_hwcap_flags=yes],[ac_hwcap_flags=no])
+ if test "$ac_hwcap_flags" = "yes"; then
+ HWCAP_CFLAGS="-Wa,-nH $HWCAP_CFLAGS"
+ fi
+ AC_MSG_RESULT($ac_hwcap_flags)
+
+ CFLAGS="$ac_save_CFLAGS"
+ ;;
+ esac
+
+ AC_SUBST(HWCAP_CFLAGS)
+])
+
+
+dnl
+dnl Check if the linker used supports linker maps to clear hardware
+dnl capabilities. This is only supported on Solaris at the moment.
+dnl
+dnl Defines:
+dnl HWCAP_LDFLAGS=-mclear-hwcap if possible
+dnl LD (as a side effect of testing)
+dnl
+AC_DEFUN([GCC_CHECK_LINKER_HWCAP], [
+ test -z "$HWCAP_LDFLAGS" && HWCAP_LDFLAGS=''
+ AC_REQUIRE([AC_PROG_LD])
+
+ ac_save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LFLAGS -mclear-hwcap"
+
+ 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="-mclear-hwcap $HWCAP_LDFLAGS"
+ fi
+ AC_MSG_RESULT($ac_hwcap_ldflags)
+
+ LDFLAGS="$ac_save_LDFLAGS"
+
+ AC_SUBST(HWCAP_LDFLAGS)
+
+ AM_CONDITIONAL(HAVE_HWCAP, test $ac_hwcap_ldflags != no)
+])