preconfigure.ac 1.7 KB

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