diff options
author | Joseph Myers <joseph@codesourcery.com> | 2012-07-01 13:08:59 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2012-07-01 13:08:59 +0000 |
commit | e84eabb3871c9b39e59323bf3f6b98c2ca9d1cd0 (patch) | |
tree | dff3f1b79454b518d15a7b9bbedeb57ff156bbe8 /ports/sysdeps/arm/preconfigure | |
parent | 75f0d3040a2c2de8842bfa7a09e11da1a73e17d0 (diff) | |
parent | e64ac02c24b43659048622714afdc92fedf561fa (diff) |
Merge glibc-ports into ports/ directory.glibc-2.16-ports-merge
Diffstat (limited to 'ports/sysdeps/arm/preconfigure')
-rw-r--r-- | ports/sysdeps/arm/preconfigure | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/ports/sysdeps/arm/preconfigure b/ports/sysdeps/arm/preconfigure new file mode 100644 index 0000000000..d98c167a95 --- /dev/null +++ b/ports/sysdeps/arm/preconfigure @@ -0,0 +1,50 @@ +case "$machine" in +arm*) + base_machine=arm + case $config_os in + linux-gnueabi*) + # Lets ask the compiler which ARM family we've got + # Unfortunately it doesn't define any flags for implementations + # that you might pass to -mcpu or -mtune + # Note if you add patterns here you must ensure that + # an appropriate directory exists in sysdeps/arm + archcppflag=`echo "" | + $CC $CFLAGS $CPPFLAGS -E -dM - | + grep __ARM_ARCH | + sed -e 's/^#define //' -e 's/ .*//'` + + case x$archcppflag in + x__ARM_ARCH_[89]*__) + machine=armv7 + echo "Found compiler is configured for something newer than v7 - using v7" + ;; + + x__ARM_ARCH_7A__) + machine=armv7 + echo "Found compiler is configured for $machine" + ;; + + x__ARM_ARCH_6T2__) + machine=armv6t2 + echo "Found compiler is configured for $machine" + ;; + + *) + machine=arm + echo 2>&1 "arm/preconfigure: Did not find ARM architecture type; using default" + ;; + esac + + machine=arm/$machine + if [ "${CFLAGS+set}" != "set" ]; then + CFLAGS="-g -O2" + fi + CFLAGS="$CFLAGS -fno-unwind-tables" + ;; + *) + echo "Old ABI no longer supported" 2>&1 + exit 1 + ;; + esac + ;; +esac |