From ac39d8f1e48d0a875c411607d5c8d60fbd09ca3e Mon Sep 17 00:00:00 2001 From: wsnipex Date: Sat, 26 Apr 2014 09:37:33 +0200 Subject: [PATCH] [depends] add neon and tegra switches --- tools/depends/configure.in | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/tools/depends/configure.in b/tools/depends/configure.in index 6370fc83d1d98..e849e5f31d0ea 100644 --- a/tools/depends/configure.in +++ b/tools/depends/configure.in @@ -31,6 +31,18 @@ AC_ARG_WITH([cpu], [optional. specify target cpu. guessed if not specified])], [use_cpu=$withval],use_cpu=auto) +AC_ARG_ENABLE([neon], + [AS_HELP_STRING([--enable-neon], + [enable neon support (default is no)])], + [use_neon=$enableval], + [use_neon=no]) + +AC_ARG_ENABLE([tegra], + [AS_HELP_STRING([--enable-tegra], + [enable Tegra2 arm (default is no)])], + [use_tegra=$enableval], + [use_tegra=no]) + AC_ARG_WITH([ndk], [AS_HELP_STRING([--with-ndk], [specify path to ndk (required for android only)])], @@ -93,15 +105,20 @@ platform_cc=gcc platform_cxx=g++ case $host in arm*-*linux-android*) - if test "x$use_cpu" = "xauto"; then + if test "x$use_cpu" = "xauto" || test "x$use_cpu" = "xarmeabi-v7a"; then use_cpu="armeabi-v7a" + platform_cflags+=" -march=armv7-a -mtune=cortex-a9 -mfloat-abi=softfp" + use_neon="yes" + fi + if test "$use_neon" = "yes"; then + platform_cflags+="-mfpu=neon -mvectorize-with-neon-quad" + fi + if test "$use_tegra" = "yes"; then + platform_cflags+="-Wno-psabi -Wa,-march=armv7a -mtune=cortex-a9 -mfpu=vfpv3-d16 -mthumb-interwork" fi use_sdk="${use_sdk:-android-14}" deps_dir="$use_host-$use_sdk" platform_cflags="-DANDROID -Os -fexceptions" - if test "x$use_cpu" = "xarmeabi-v7a"; then - platform_cflags+=" -march=armv7-a -mtune=cortex-a9 -mfloat-abi=softfp -mfpu=neon" - fi platform_ldflags="-L$prefix/$deps_dir/lib/$use_sdk" platform_cxxflags="$platform_cflags -frtti" platform_includes="-I$prefix/$deps_dir/include/$use_sdk" @@ -134,6 +151,12 @@ case $host in if test "x$use_cpu" = "xauto"; then use_cpu=$host_cpu fi + if test "$use_neon" = "yes"; then + platform_cflags+="-mfpu=neon -mvectorize-with-neon-quad" + fi + if test "$use_tegra" = "yes"; then + platform_cflags+="-Wno-psabi -Wa,-march=armv7a -mtune=cortex-a9 -mfpu=vfpv3-d16 -mthumb-interwork" + fi use_toolchain="${use_toolchain:-/usr}" platform_cflags="-Os -fPIC -DPIC" platform_ldflags="-Wl,-rpath-link=$prefix/$deps_dir/lib"