1GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
2# Local preconfigure fragment for sysdeps/arm
3
4case "$machine" in
5arm*)
6  # If the compiler enables unwind tables by default, this causes
7  # problems with undefined symbols in -nostdlib link tests.  To
8  # avoid this, add -fno-unwind-tables here and remove it in
9  # sysdeps/arm/configure.ac after those tests have been run.
10  if test "${CFLAGS+set}" != "set"; then
11    CFLAGS="-g -O2"
12  fi
13  CFLAGS="$CFLAGS -fno-unwind-tables"
14
15  base_machine=arm
16  # Lets ask the compiler which ARM family we've got
17  # Unfortunately it doesn't define any flags for implementations
18  # that you might pass to -mcpu or -mtune
19  # Note if you add patterns here you must ensure that
20  # an appropriate directory exists in sysdeps/arm
21  archcppflag=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null |
22    sed -n 's/^#define \(__ARM_ARCH_[0-9].*__\) .*$/\1/p'`
23
24  case "x$archcppflag" in
25  x__ARM_ARCH_[89]*__)
26    machine=armv7
27    AC_MSG_NOTICE([Found compiler is configured for something newer than v7 - using v7])
28    ;;
29
30  x__ARM_ARCH_7A__)
31    machine=armv7
32    AC_MSG_NOTICE([Found compiler is configured for $machine])
33    ;;
34
35  x__ARM_ARCH_6T2__)
36    machine=armv6t2
37    AC_MSG_NOTICE([Found compiler is configured for $machine])
38    ;;
39  x__ARM_ARCH_6*__)
40    machine=armv6
41    AC_MSG_NOTICE([Found compiler is configured for $machine])
42    ;;
43  *)
44    machine=arm
45    AC_MSG_WARN([arm/preconfigure: Did not find ARM architecture type; using default])
46    ;;
47  esac
48
49  AC_EGREP_CPP(yes,[#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
50                     yes
51                    #endif
52                   ], endianness=le, endianness=be)
53
54  machine=arm/$endianness/$machine
55  with_fp_cond="!defined __SOFTFP__"
56esac
57