ARM: Clean up EABI-related configury
[glibc.git] / sysdeps / arm / preconfigure
blob59d776d5ca9376366a5d858fbd898078ce34df55
1 # This file is generated from configure.ac by Autoconf.  DO NOT EDIT!
2  # Local preconfigure fragment for sysdeps/arm
4 case "$machine" in
5 arm*)
7 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8 /* end confdefs.h.  */
10 #if !__ARM_EABI__
11 #error
12 #endif
13 int
14 main ()
17   ;
18   return 0;
20 _ACEOF
21 if ac_fn_c_try_compile "$LINENO"; then :
23 else
24   as_fn_error $? "Old ABI no longer supported" "$LINENO" 5
26 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28   # If the compiler enables unwind tables by default, this causes
29   # problems with undefined symbols in -nostdlib link tests.  To
30   # avoid this, add -fno-unwind-tables here and remove it in
31   # sysdeps/arm/configure.ac after those tests have been run.
32   if test "${CFLAGS+set}" != "set"; then
33     CFLAGS="-g -O2"
34   fi
35   CFLAGS="$CFLAGS -fno-unwind-tables"
37   base_machine=arm
38   # Lets ask the compiler which ARM family we've got
39   # Unfortunately it doesn't define any flags for implementations
40   # that you might pass to -mcpu or -mtune
41   # Note if you add patterns here you must ensure that
42   # an appropriate directory exists in sysdeps/arm
43   archcppflag=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null |
44     sed -n 's/^#define \(__ARM_ARCH_[0-9].*__\) .*$/\1/p'`
46   case "x$archcppflag" in
47   x__ARM_ARCH_89*__)
48     machine=armv7
49     { $as_echo "$as_me:${as_lineno-$LINENO}: Found compiler is configured for something newer than v7 - using v7" >&5
50 $as_echo "$as_me: Found compiler is configured for something newer than v7 - using v7" >&6;}
51     ;;
53   x__ARM_ARCH_7A__)
54     machine=armv7
55     { $as_echo "$as_me:${as_lineno-$LINENO}: Found compiler is configured for $machine" >&5
56 $as_echo "$as_me: Found compiler is configured for $machine" >&6;}
57     ;;
59   x__ARM_ARCH_6T2__)
60     machine=armv6t2
61     { $as_echo "$as_me:${as_lineno-$LINENO}: Found compiler is configured for $machine" >&5
62 $as_echo "$as_me: Found compiler is configured for $machine" >&6;}
63     ;;
64   x__ARM_ARCH_6*__)
65     machine=armv6
66     { $as_echo "$as_me:${as_lineno-$LINENO}: Found compiler is configured for $machine" >&5
67 $as_echo "$as_me: Found compiler is configured for $machine" >&6;}
68     ;;
69   *)
70     machine=arm
71     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: arm/preconfigure: Did not find ARM architecture type; using default" >&5
72 $as_echo "$as_me: WARNING: arm/preconfigure: Did not find ARM architecture type; using default" >&2;}
73     ;;
74   esac
76   machine=arm/$machine
77 esac