diff options
author | blubee <gurenchan@gmail.com> | 2016-03-20 17:22:48 +0800 |
---|---|---|
committer | blubee <gurenchan@gmail.com> | 2016-03-20 20:29:37 +0800 |
commit | a0fb5b5f95f0d4ce90766301ddce4e5f199fb125 (patch) | |
tree | aac59ba133c42b9d4de074c7290ee31d6d147f75 /platform/android | |
parent | 6cf978b7d61fa1655f13138a775acdd7fbbf39b5 (diff) |
Add support for gnu-libstc++-4.9 needed by recent NDK versions
The 4.9 version is the default one, people can still build using 4.8
with older NDK versions by setting the (optional) NDK_TARGET
and NDK_TARGET_X86 environment variables.
Diffstat (limited to 'platform/android')
-rw-r--r-- | platform/android/detect.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/platform/android/detect.py b/platform/android/detect.py index 15ef478e19..d4038f6584 100644 --- a/platform/android/detect.py +++ b/platform/android/detect.py @@ -22,14 +22,15 @@ def get_opts(): return [ ('ANDROID_NDK_ROOT', 'the path to Android NDK', os.environ.get("ANDROID_NDK_ROOT", 0)), ('NDK_TOOLCHAIN', 'toolchain to use for the NDK',"arm-eabi-4.4.0"), - ('NDK_TARGET', 'toolchain to use for the NDK',"arm-linux-androideabi-4.8"), - ('NDK_TARGET_X86', 'toolchain to use for the NDK x86',"x86-4.8"), + ('NDK_TARGET', 'toolchain to use for the NDK',os.environ.get("NDK_TARGET", "arm-linux-androideabi-4.9")), + ('NDK_TARGET_X86', 'toolchain to use for the NDK x86',os.environ.get("NDK_TARGET_X86", "x86-4.9")), ('ndk_platform', 'compile for platform: (android-<api> , example: android-15)',"android-15"), ('android_arch', 'select compiler architecture: (armv7/armv6/x86)',"armv7"), ('android_neon','enable neon (armv7 only)',"yes"), ('android_stl','enable STL support in android port (for modules)',"no") ] + def get_flags(): return [ @@ -232,17 +233,18 @@ def configure(env): #env.Append(LINKFLAGS=[env["ANDROID_NDK_ROOT"]+"/sources/cxx-stl/gnu-libstdc++/libs/armeabi/libstdc++.a"]) else: - env.Append(CPPPATH=[env["ANDROID_NDK_ROOT"]+"/sources/cxx-stl/gabi++/include"]) + env.Append(CPPPATH=[env["ANDROID_NDK_ROOT"]+"/sources/cxx-stl/gnu-libstdc++/4.9/include"]) env.Append(CPPPATH=[env["ANDROID_NDK_ROOT"]+"/sources/cpufeatures"]) if env['android_arch']=='x86': - env.Append(LIBPATH=[env["ANDROID_NDK_ROOT"]+"/sources/cxx-stl/gabi++/libs/x86"]) + env.Append(LIBPATH=[env["ANDROID_NDK_ROOT"]+"/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86"]) elif env["android_arch"]=="armv6": - env.Append(LIBPATH=[env["ANDROID_NDK_ROOT"]+"/sources/cxx-stl/gabi++/libs/armeabi"]) + env.Append(LIBPATH=[env["ANDROID_NDK_ROOT"]+"/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi"]) elif env["android_arch"]=="armv7": - env.Append(LIBPATH=[env["ANDROID_NDK_ROOT"]+"/sources/cxx-stl/gabi++/libs/armeabi-v7a"]) - env.Append(LIBS=['gabi++_static']) + env.Append(LIBPATH=[env["ANDROID_NDK_ROOT"]+"/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a"]) + env.Append(LIBS=['gnustl_static']) env.Append(CCFLAGS=["-fno-exceptions",'-DNO_SAFE_CAST']) + import methods env.Append( BUILDERS = { 'GLSL120' : env.Builder(action = methods.build_legacygl_headers, suffix = 'glsl.h',src_suffix = '.glsl') } ) env.Append( BUILDERS = { 'GLSL' : env.Builder(action = methods.build_glsl_headers, suffix = 'glsl.h',src_suffix = '.glsl') } ) |