diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2017-01-06 14:33:47 +0000 |
---|---|---|
committer | Rainer Orth <ro@gcc.gnu.org> | 2017-01-06 14:33:47 +0000 |
commit | 1ec62aa9e11eb1f915324634d889e84450b272b1 (patch) | |
tree | ff66792600204f68fadebd00c8bcf64320dbb145 /config | |
parent | bad86e8d42c6572dbcf89814597551823aca2e8d (diff) | |
download | gcc-1ec62aa9e11eb1f915324634d889e84450b272b1.tar.gz |
Build libgo with -Wa,-nH if possible (PR go/78978) [non-libgo parts]
libstdc++-v3:
PR go/78978
* acinclude.m4 (GLIBCXX_CHECK_ASSEMBLER_HWCAP): Remove.
* configure.ac: Call GCC_CHECK_ASSEMBLER_HWCAP instead of
GLIBCXX_CHECK_ASSEMBLER_HWCAP.
* fragment.am (CONFIG_CXXFLAGS): Use HWCAP_CFLAGS instead of
HWCAP_FLAGS.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* Makefile.in, doc/Makefile.in, include/Makefile.in,
libsupc++/Makefile.in, po/Makefile.in, python/Makefile.in,
src/Makefile.in, src/c++11/Makefile.in, src/c++98/Makefile.in,
src/filesystem/Makefile.in, testsuite/Makefile.in: Regenerate.
config:
PR go/78978
* hwcaps.m4 (GCC_CHECK_ASSEMBLER_HWCAP): New macro.
From-SVN: r244162
Diffstat (limited to 'config')
-rw-r--r-- | config/ChangeLog | 5 | ||||
-rw-r--r-- | config/hwcaps.m4 | 32 |
2 files changed, 37 insertions, 0 deletions
diff --git a/config/ChangeLog b/config/ChangeLog index 96230630314..625319a3651 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,8 @@ +2017-01-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + PR go/78978 + * hwcaps.m4 (GCC_CHECK_ASSEMBLER_HWCAP): New macro. + 2017-01-04 Alan Modra <amodra@gmail.com> * picflag.m4: Remove stray \xA0 in comment. diff --git a/config/hwcaps.m4 b/config/hwcaps.m4 index e78c49c46d4..ff352fdd3a6 100644 --- a/config/hwcaps.m4 +++ b/config/hwcaps.m4 @@ -1,4 +1,36 @@ 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 |