Add Changelog ...
[glibc.git] / sysdeps / arm / preconfigure
blobd98c167a95e87513931fdd4c2e01926034e819ef
1 case "$machine" in
2 arm*)
3         base_machine=arm
4         case $config_os in
5         linux-gnueabi*)
6                 # Lets ask the compiler which ARM family we've got
7                 # Unfortunately it doesn't define any flags for implementations
8                 # that you might pass to -mcpu or -mtune
9                 # Note if you add patterns here you must ensure that
10                 # an appropriate directory exists in sysdeps/arm
11                 archcppflag=`echo "" |
12                 $CC $CFLAGS $CPPFLAGS -E -dM - |
13                   grep __ARM_ARCH |
14                   sed -e 's/^#define //' -e 's/ .*//'`
16                 case x$archcppflag in
17                 x__ARM_ARCH_[89]*__)
18                   machine=armv7
19                   echo "Found compiler is configured for something newer than v7 - using v7"
20                   ;;
22                 x__ARM_ARCH_7A__)
23                   machine=armv7
24                   echo "Found compiler is configured for $machine"
25                   ;;
27                 x__ARM_ARCH_6T2__)
28                   machine=armv6t2
29                   echo "Found compiler is configured for $machine"
30                   ;;
32                 *)
33                   machine=arm
34                   echo 2>&1 "arm/preconfigure: Did not find ARM architecture type; using default"
35                   ;;
36                 esac
38                 machine=arm/$machine
39                 if [ "${CFLAGS+set}" != "set" ]; then
40                   CFLAGS="-g -O2"
41                 fi
42                 CFLAGS="$CFLAGS -fno-unwind-tables"
43                 ;;
44         *)
45                 echo "Old ABI no longer supported" 2>&1
46                 exit 1
47                 ;;
48         esac
49         ;;
50 esac