summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
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)