From 4d5433127a1b0b0c621e8237791100e887e12d02 Mon Sep 17 00:00:00 2001 From: Andoni Morales Alastruey Date: Thu, 31 Jan 2013 16:33:12 +0100 Subject: linux: fix x86 cross-compilation --- config/linux.config | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'config') 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) -- cgit v1.2.3