annotate config/hwcaps.m4 @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 dnl
kono
parents:
diff changeset
2 dnl Check if the assembler used supports disabling generation of hardware
kono
parents:
diff changeset
3 dnl capabilities. This is only supported by Solaris as at the moment.
kono
parents:
diff changeset
4 dnl
kono
parents:
diff changeset
5 dnl Defines:
kono
parents:
diff changeset
6 dnl HWCAP_CFLAGS='-Wa,-nH' if possible.
kono
parents:
diff changeset
7 dnl
kono
parents:
diff changeset
8 AC_DEFUN([GCC_CHECK_ASSEMBLER_HWCAP], [
kono
parents:
diff changeset
9 test -z "$HWCAP_CFLAGS" && HWCAP_CFLAGS=''
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 # Restrict the test to Solaris, other assemblers (e.g. AIX as) have -nH
kono
parents:
diff changeset
12 # with a different meaning.
kono
parents:
diff changeset
13 case ${target_os} in
kono
parents:
diff changeset
14 solaris2*)
kono
parents:
diff changeset
15 ac_save_CFLAGS="$CFLAGS"
kono
parents:
diff changeset
16 CFLAGS="$CFLAGS -Wa,-nH"
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 AC_MSG_CHECKING([for as that supports -Wa,-nH])
kono
parents:
diff changeset
19 AC_TRY_COMPILE([], [return 0;], [ac_hwcap_flags=yes],[ac_hwcap_flags=no])
kono
parents:
diff changeset
20 if test "$ac_hwcap_flags" = "yes"; then
kono
parents:
diff changeset
21 HWCAP_CFLAGS="-Wa,-nH $HWCAP_CFLAGS"
kono
parents:
diff changeset
22 fi
kono
parents:
diff changeset
23 AC_MSG_RESULT($ac_hwcap_flags)
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 CFLAGS="$ac_save_CFLAGS"
kono
parents:
diff changeset
26 ;;
kono
parents:
diff changeset
27 esac
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29 AC_SUBST(HWCAP_CFLAGS)
kono
parents:
diff changeset
30 ])
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32
kono
parents:
diff changeset
33 dnl
kono
parents:
diff changeset
34 dnl Check if the linker used supports linker maps to clear hardware
kono
parents:
diff changeset
35 dnl capabilities. This is only supported on Solaris at the moment.
kono
parents:
diff changeset
36 dnl
kono
parents:
diff changeset
37 dnl Defines:
kono
parents:
diff changeset
38 dnl HWCAP_LDFLAGS=-mclear-hwcap if possible
kono
parents:
diff changeset
39 dnl LD (as a side effect of testing)
kono
parents:
diff changeset
40 dnl
kono
parents:
diff changeset
41 AC_DEFUN([GCC_CHECK_LINKER_HWCAP], [
kono
parents:
diff changeset
42 test -z "$HWCAP_LDFLAGS" && HWCAP_LDFLAGS=''
kono
parents:
diff changeset
43 AC_REQUIRE([AC_PROG_LD])
kono
parents:
diff changeset
44
kono
parents:
diff changeset
45 ac_save_LDFLAGS="$LDFLAGS"
kono
parents:
diff changeset
46 LDFLAGS="$LFLAGS -mclear-hwcap"
kono
parents:
diff changeset
47
kono
parents:
diff changeset
48 AC_MSG_CHECKING([for -mclear-hwcap])
kono
parents:
diff changeset
49 AC_TRY_LINK([], [return 0;], [ac_hwcap_ldflags=yes],[ac_hwcap_ldflags=no])
kono
parents:
diff changeset
50 if test "$ac_hwcap_ldflags" = "yes"; then
kono
parents:
diff changeset
51 HWCAP_LDFLAGS="-mclear-hwcap $HWCAP_LDFLAGS"
kono
parents:
diff changeset
52 fi
kono
parents:
diff changeset
53 AC_MSG_RESULT($ac_hwcap_ldflags)
kono
parents:
diff changeset
54
kono
parents:
diff changeset
55 LDFLAGS="$ac_save_LDFLAGS"
kono
parents:
diff changeset
56
kono
parents:
diff changeset
57 AC_SUBST(HWCAP_LDFLAGS)
kono
parents:
diff changeset
58
kono
parents:
diff changeset
59 AM_CONDITIONAL(HAVE_HWCAP, test $ac_hwcap_ldflags != no)
kono
parents:
diff changeset
60 ])