diff options
author | wsnipex <wsnipex@a1.net> | 2018-01-02 10:17:23 +0100 |
---|---|---|
committer | Chris Koying Browet <cbro@semperpax.com> | 2018-01-03 09:43:51 +0100 |
commit | 28eddf0888f75e82af4ced95fe313cafbea35243 (patch) | |
tree | cc5d203cc9ffa7b86089582912fe852494092965 /tools/depends/configure.ac | |
parent | 792d18507eeb9a9dc6b9ed93874cce1293e38d41 (diff) |
[depends] fix compiler detection for clang on android
Diffstat (limited to 'tools/depends/configure.ac')
-rw-r--r-- | tools/depends/configure.ac | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/tools/depends/configure.ac b/tools/depends/configure.ac index 98244c8a6f..5cd0e5a2ed 100644 --- a/tools/depends/configure.ac +++ b/tools/depends/configure.ac @@ -101,8 +101,17 @@ AC_ARG_ENABLE([wayland], OLD_PATH="${PATH}" if test -n "$use_toolchain"; then PATH="${use_toolchain}/bin:${use_toolchain}/usr/bin:$PATH" + case $host in + arm*-*linux-android*|aarch64*-*linux-android*) + COMPILER_LIST="clang++ gcc g++" + ;; + *) + COMPILER_LIST="" + ;; + esac fi -AX_CXX_COMPILE_STDCXX_11(,[mandatory]) +AC_PROG_CXX([$COMPILER_LIST]) +AX_CXX_COMPILE_STDCXX_11([noext],[mandatory]) c11_flags=$(echo "$CFLAGS" | sed 's/-O@<:@123@:>@//g;s/-g //g;s/ //g') cxx11_flags=$(echo "$CXXFLAGS" | sed 's/-O@<:@123@:>@//g;s/-g //g;s/ //g') PATH="${OLD_PATH}" @@ -179,7 +188,7 @@ case $host in platform_cflags+=" -march=armv7-a -mtune=cortex-a9 -mfloat-abi=softfp -mfpu=neon" fi platform_ldflags="-Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -Wl,--exclude-libs,libunwind.a -L$prefix/$deps_dir/lib/android-$use_ndk_api" - platform_cxxflags="$platform_cflags -std=c++11 -frtti" + platform_cxxflags="$platform_cflags -frtti" platform_includes="-I$prefix/$deps_dir/include/android-$use_ndk_api" platform_os="android" #android builds are always cross @@ -200,7 +209,7 @@ case $host in platform_cflags+=" -march=armv8-a -mtune=cortex-a53" fi platform_ldflags="-Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -L$prefix/$deps_dir/lib/android-$use_ndk_api" - platform_cxxflags="$platform_cflags -std=c++11 -frtti" + platform_cxxflags="$platform_cflags -frtti" platform_includes="-I$prefix/$deps_dir/include/android-$use_ndk_api" platform_os="android" #android builds are always cross @@ -218,7 +227,7 @@ case $host in platform_cflags="-DANDROID -D__ANDROID_API__=$use_ndk_api -fexceptions -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fPIC -DPIC -D_GLIBCXX_USE_C99_MATH_TR1" optimize_flags="-Os" platform_ldflags="-Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -L$prefix/$deps_dir/lib/android-$use_ndk_api" - platform_cxxflags="$platform_cflags -std=c++11 -frtti" + platform_cxxflags="$platform_cflags -frtti" platform_includes="-I$prefix/$deps_dir/include/android-$use_ndk_api" platform_os="android" #android builds are always cross |