mirror of https://github.com/FWGS/xash3d-fwgs
waifulib: xcompile: we need to disable builtins even on armeabi with host compiler and NDK r10e
This commit is contained in:
parent
729f534614
commit
32ddc2a47f
|
@ -248,18 +248,8 @@ class Android:
|
|||
if cxx and not self.is_clang() and self.toolchain not in ['4.8','4.9']:
|
||||
cflags += ['-fno-sized-deallocation']
|
||||
|
||||
if self.is_arm():
|
||||
if self.arch == 'armeabi-v7a':
|
||||
# ARMv7 support
|
||||
cflags += ['-mthumb', '-mfpu=neon', '-mcpu=cortex-a9', '-DHAVE_EFFICIENT_UNALIGNED_ACCESS', '-DVECTORIZE_SINCOS']
|
||||
|
||||
if not self.is_clang() and not self.is_host():
|
||||
cflags += [ '-mvectorize-with-neon-quad' ]
|
||||
|
||||
if self.is_hardfp():
|
||||
cflags += ['-D_NDK_MATH_NO_SOFTFP=1', '-mfloat-abi=hard', '-DLOAD_HARDFP', '-DSOFTFP_LINK']
|
||||
|
||||
if self.is_host():
|
||||
def fixup_host_clang_with_old_ndk():
|
||||
cflags = []
|
||||
# Clang builtin redefine w/ different calling convention bug
|
||||
# NOTE: I did not added complex.h functions here, despite
|
||||
# that NDK devs forgot to put __NDK_FPABI_MATH__ for complex
|
||||
|
@ -268,9 +258,28 @@ class Android:
|
|||
# just run sed to patch header
|
||||
for f in ['strtod', 'strtof', 'strtold']:
|
||||
cflags += ['-fno-builtin-%s' % f]
|
||||
return cflags
|
||||
|
||||
|
||||
if self.is_arm():
|
||||
if self.arch == 'armeabi-v7a':
|
||||
# ARMv7 support
|
||||
cflags += ['-mthumb', '-mfpu=neon', '-mcpu=cortex-a9', '-DHAVE_EFFICIENT_UNALIGNED_ACCESS', '-DVECTORIZE_SINCOS']
|
||||
|
||||
if not self.is_clang() and not self.is_host():
|
||||
cflags += [ '-mvectorize-with-neon-quad' ]
|
||||
|
||||
if self.is_host() and self.ndk_rev <= ANDROID_NDK_HARDFP_MAX:
|
||||
cflags += fixup_host_clang_with_old_ndk()
|
||||
|
||||
if self.is_hardfp():
|
||||
cflags += ['-D_NDK_MATH_NO_SOFTFP=1', '-mfloat-abi=hard', '-DLOAD_HARDFP', '-DSOFTFP_LINK']
|
||||
else:
|
||||
cflags += ['-mfloat-abi=softfp']
|
||||
else:
|
||||
if self.is_host() and self.ndk_rev <= ANDROID_NDK_HARDFP_MAX:
|
||||
cflags += fixup_host_clang_with_old_ndk()
|
||||
|
||||
# ARMv5 support
|
||||
cflags += ['-march=armv5te', '-mtune=xscale', '-msoft-float']
|
||||
elif self.is_x86():
|
||||
|
|
Loading…
Reference in New Issue