summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2013-04-29 05:24:38 (GMT)
committerAndoni Morales Alastruey <ylatuya@gmail.com>2013-05-06 14:03:09 (GMT)
commit019c4d940e6476172159a54b38e44a18e91f6860 (patch)
tree9bacd739bc80bfd9e42953a1d80fbd801f84258b
parent6c2a9a4145ec120c8d86ab42701a00ceb3d254b7 (diff)
downloadcerbero-019c4d940e6476172159a54b38e44a18e91f6860.tar.gz
cerbero-019c4d940e6476172159a54b38e44a18e91f6860.tar.xz
linux: set --host for autotools when cross-compiling
-rw-r--r--config/linux.config5
1 files changed, 5 insertions, 0 deletions
diff --git a/config/linux.config b/config/linux.config
index 3f21097..5dac1ae 100644
--- a/config/linux.config
+++ b/config/linux.config
@@ -11,8 +11,13 @@ for f in ['CFLAGS', 'CCASFLAGS', 'CXXFLAGS', 'LDFLAGS', 'OBJCFLAGS']:
if target_arch == Architecture.X86:
arch_flags = ' -m32 '
+ _host = 'i686-pc-linux'
else:
arch_flags = ' -m64 '
+ _host = 'x86_64-pc-linux'
+
+if host is None and target_arch != arch:
+ host = _host
os.environ['CFLAGS'] += ' -Wall -g -O2' + arch_flags
os.environ['CXXFLAGS'] += ' -Wall -g -O2' + arch_flags