Fix android export templates build
This commit fixes errors occurring during Android export template builds. This required modification in third-party library (libpng) to compile with NEON. Most likely a similar patch will be applied by them and we could then replace the modified version.
This commit is contained in:
parent
45b498c4e0
commit
fbb27a0c43
|
@ -87,20 +87,6 @@ def configure(env):
|
||||||
|
|
||||||
env['SPAWN'] = mySpawn
|
env['SPAWN'] = mySpawn
|
||||||
|
|
||||||
## Build type
|
|
||||||
|
|
||||||
if (env["target"].startswith("release")):
|
|
||||||
env.Append(LINKFLAGS=['-O2'])
|
|
||||||
env.Append(CPPFLAGS=['-O2', '-DNDEBUG', '-ffast-math', '-funsafe-math-optimizations', '-fomit-frame-pointer'])
|
|
||||||
if (can_vectorize):
|
|
||||||
env.Append(CPPFLAGS=['-ftree-vectorize'])
|
|
||||||
if (env["target"] == "release_debug"):
|
|
||||||
env.Append(CPPFLAGS=['-DDEBUG_ENABLED'])
|
|
||||||
elif (env["target"] == "debug"):
|
|
||||||
env.Append(LINKFLAGS=['-O0'])
|
|
||||||
env.Append(CPPFLAGS=['-O0', '-D_DEBUG', '-UNDEBUG', '-DDEBUG_ENABLED',
|
|
||||||
'-DDEBUG_MEMORY_ENABLED', '-g', '-fno-limit-debug-info'])
|
|
||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
if env['android_arch'] not in ['armv7', 'armv6', 'x86']:
|
if env['android_arch'] not in ['armv7', 'armv6', 'x86']:
|
||||||
|
@ -133,6 +119,20 @@ def configure(env):
|
||||||
else:
|
else:
|
||||||
env.extra_suffix = ".armv7" + env.extra_suffix
|
env.extra_suffix = ".armv7" + env.extra_suffix
|
||||||
|
|
||||||
|
## Build type
|
||||||
|
|
||||||
|
if (env["target"].startswith("release")):
|
||||||
|
env.Append(LINKFLAGS=['-O2'])
|
||||||
|
env.Append(CPPFLAGS=['-O2', '-DNDEBUG', '-ffast-math', '-funsafe-math-optimizations', '-fomit-frame-pointer'])
|
||||||
|
if (can_vectorize):
|
||||||
|
env.Append(CPPFLAGS=['-ftree-vectorize'])
|
||||||
|
if (env["target"] == "release_debug"):
|
||||||
|
env.Append(CPPFLAGS=['-DDEBUG_ENABLED'])
|
||||||
|
elif (env["target"] == "debug"):
|
||||||
|
env.Append(LINKFLAGS=['-O0'])
|
||||||
|
env.Append(CPPFLAGS=['-O0', '-D_DEBUG', '-UNDEBUG', '-DDEBUG_ENABLED',
|
||||||
|
'-DDEBUG_MEMORY_ENABLED', '-g', '-fno-limit-debug-info'])
|
||||||
|
|
||||||
## Compiler configuration
|
## Compiler configuration
|
||||||
|
|
||||||
env['SHLIBSUFFIX'] = '.so'
|
env['SHLIBSUFFIX'] = '.so'
|
||||||
|
|
|
@ -464,7 +464,7 @@
|
||||||
static_cast<type>(static_cast<void*>(value))
|
static_cast<type>(static_cast<void*>(value))
|
||||||
# define png_aligncastconst(type, value) \
|
# define png_aligncastconst(type, value) \
|
||||||
static_cast<type>(static_cast<const void*>(value))
|
static_cast<type>(static_cast<const void*>(value))
|
||||||
#else
|
#elif !defined(__ASSEMBLER__)
|
||||||
# define png_voidcast(type, value) (value)
|
# define png_voidcast(type, value) (value)
|
||||||
# ifdef _WIN64
|
# ifdef _WIN64
|
||||||
# ifdef __GNUC__
|
# ifdef __GNUC__
|
||||||
|
|
Loading…
Reference in New Issue