summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2013-01-31 16:33:12 +0100
committerAndoni Morales Alastruey <ylatuya@gmail.com>2013-01-31 17:23:26 +0100
commit4d5433127a1b0b0c621e8237791100e887e12d02 (patch)
treea81c337a5f956610ba764a02fe988ecb92ec03eb /config
parent0aba591396ef59d090d54a534921e1089600d490 (diff)
linux: fix x86 cross-compilation
Diffstat (limited to 'config')
-rw-r--r--config/linux.config13
1 files changed, 10 insertions, 3 deletions
diff --git a/config/linux.config b/config/linux.config
index 2a808ce..614300c 100644
--- a/config/linux.config
+++ b/config/linux.config
@@ -9,9 +9,16 @@ from cerbero.config import Architecture
for f in ['CFLAGS', 'CCASFLAGS', 'CXXFLAGS', 'LDFLAGS', 'OBJCFLAGS']:
os.environ[f] = os.environ.get(f, '')
-os.environ['CFLAGS'] += ' -g -O2'
-os.environ['CXXFLAGS'] += ' -g -O2'
-os.environ['OBJCFLAGS'] += ' -g -O2'
+if target_arch == Architecture.X86:
+ arch_flags = ' -m32 '
+else:
+ arch_flags = ' -m64 '
+
+os.environ['CFLAGS'] += ' -g -O2' + arch_flags
+os.environ['CXXFLAGS'] += ' -g -O2' + arch_flags
+os.environ['OBJCFLAGS'] += ' -g -O2' + arch_flags
+os.environ['CCASFLAGS'] += ' -g -O2' + arch_flags
+os.environ['LDFLAGS'] += arch_flags
os.environ['am_cv_python_pyexecdir'] = '%s/%s/site-packages' % (prefix, py_prefix)
os.environ['am_cv_python_pythondir'] = '%s/%s/site-packages' % (prefix, py_prefix)