2 dnl Check if the linker used supports linker maps to clear hardware
3 dnl capabilities. This is only supported on Solaris at the moment.
6 dnl HWCAP_LDFLAGS=-mclear-hwcap if possible
7 dnl LD (as a side effect of testing)
9 AC_DEFUN([GCC_CHECK_LINKER_HWCAP], [
10 test -z "$HWCAP_LDFLAGS" && HWCAP_LDFLAGS=''
11 AC_REQUIRE([AC_PROG_LD])
13 ac_save_LDFLAGS="$LDFLAGS"
14 LDFLAGS="$LFLAGS -mclear-hwcap"
16 AC_MSG_CHECKING([for -mclear-hwcap])
17 AC_TRY_LINK([], [return 0;], [ac_hwcap_ldflags=yes],[ac_hwcap_ldflags=no])
18 if test "$ac_hwcap_ldflags" = "yes"; then
19 HWCAP_LDFLAGS="-mclear-hwcap $HWCAP_LDFLAGS"
21 AC_MSG_RESULT($ac_hwcap_ldflags)
23 LDFLAGS="$ac_save_LDFLAGS"
25 AC_SUBST(HWCAP_LDFLAGS)
27 AM_CONDITIONAL(HAVE_HWCAP, test $ac_hwcap_ldflags != no)