File: hwcaps.m4

package info (click to toggle)
gdb 8.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 223,696 kB
  • sloc: ansic: 1,936,156; asm: 341,757; exp: 146,606; makefile: 56,749; sh: 23,776; cpp: 20,830; yacc: 12,914; perl: 5,331; ada: 4,977; python: 4,617; xml: 4,176; pascal: 3,134; lisp: 1,527; cs: 879; lex: 620; f90: 479; sed: 228; awk: 140; objc: 134; fortran: 43
file content (60 lines) | stat: -rw-r--r-- 1,634 bytes parent folder | download | duplicates (30)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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)
])