Do not set `march` for android build.
We already build to the right architecture by using the arch_full triplet gcc/g++/... We don't need to set march when building android.
This commit is contained in:
parent
2e05257737
commit
82617f6b94
|
@ -40,9 +40,6 @@ class AndroidPlatformInfo(PlatformInfo):
|
||||||
def get_cross_config(self):
|
def get_cross_config(self):
|
||||||
extra_libs = ['-llog']
|
extra_libs = ['-llog']
|
||||||
extra_cflags = ['-I{}'.format(pj(self.buildEnv.install_dir, 'include'))]
|
extra_cflags = ['-I{}'.format(pj(self.buildEnv.install_dir, 'include'))]
|
||||||
if hasattr(self, 'march'):
|
|
||||||
extra_libs.append('-march={}'.format(self.march))
|
|
||||||
extra_cflags.append('-march={}'.format(self.march))
|
|
||||||
return {
|
return {
|
||||||
'exe_wrapper_def': '',
|
'exe_wrapper_def': '',
|
||||||
'install_path': self.install_path,
|
'install_path': self.install_path,
|
||||||
|
@ -65,11 +62,10 @@ class AndroidPlatformInfo(PlatformInfo):
|
||||||
|
|
||||||
def set_env(self, env):
|
def set_env(self, env):
|
||||||
root_path = pj(self.install_path, 'sysroot')
|
root_path = pj(self.install_path, 'sysroot')
|
||||||
march = '-march={}'.format(self.march) if hasattr(self,'march') else ''
|
|
||||||
env['PKG_CONFIG_LIBDIR'] = pj(root_path, 'lib', 'pkgconfig')
|
env['PKG_CONFIG_LIBDIR'] = pj(root_path, 'lib', 'pkgconfig')
|
||||||
env['CFLAGS'] = '-fPIC -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 --sysroot={} {} '.format(root_path, march) + env['CFLAGS']
|
env['CFLAGS'] = '-fPIC -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 --sysroot={} '.format(root_path) + env['CFLAGS']
|
||||||
env['CXXFLAGS'] = '-fPIC -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 --sysroot={} {} '.format(root_path, march) + env['CXXFLAGS']
|
env['CXXFLAGS'] = '-fPIC -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 --sysroot={} '.format(root_path) + env['CXXFLAGS']
|
||||||
env['LDFLAGS'] = '--sysroot={} {} '.format(root_path, march) + env['LDFLAGS']
|
env['LDFLAGS'] = '--sysroot={} '.format(root_path) + env['LDFLAGS']
|
||||||
#env['CFLAGS'] = ' -fPIC -D_FILE_OFFSET_BITS=64 -O3 '+env['CFLAGS']
|
#env['CFLAGS'] = ' -fPIC -D_FILE_OFFSET_BITS=64 -O3 '+env['CFLAGS']
|
||||||
#env['CXXFLAGS'] = (' -D__OPTIMIZE__ -fno-strict-aliasing '
|
#env['CXXFLAGS'] = (' -D__OPTIMIZE__ -fno-strict-aliasing '
|
||||||
# ' -DU_HAVE_NL_LANGINFO_CODESET=0 '
|
# ' -DU_HAVE_NL_LANGINFO_CODESET=0 '
|
||||||
|
@ -97,7 +93,6 @@ class AndroidArm(AndroidPlatformInfo):
|
||||||
arch = cpu = 'arm'
|
arch = cpu = 'arm'
|
||||||
arch_full = 'arm-linux-androideabi'
|
arch_full = 'arm-linux-androideabi'
|
||||||
abi = 'armeabi-v7a'
|
abi = 'armeabi-v7a'
|
||||||
march = 'armv7-a'
|
|
||||||
|
|
||||||
|
|
||||||
class AndroidArm64(AndroidPlatformInfo):
|
class AndroidArm64(AndroidPlatformInfo):
|
||||||
|
|
Loading…
Reference in New Issue