python/build/autotools: add --host=... only if cross-compiling

This commit is contained in:
Max Kellermann 2023-09-26 15:26:41 +02:00
parent 5b83c834ac
commit 0ffbe5b5ea
1 changed files with 3 additions and 1 deletions

View File

@ -58,11 +58,13 @@ class AutotoolsProject(MakeProject):
'ARFLAGS=' + toolchain.arflags, 'ARFLAGS=' + toolchain.arflags,
'RANLIB=' + toolchain.ranlib, 'RANLIB=' + toolchain.ranlib,
'STRIP=' + toolchain.strip, 'STRIP=' + toolchain.strip,
'--host=' + toolchain.host_triplet,
'--prefix=' + toolchain.install_prefix, '--prefix=' + toolchain.install_prefix,
'--disable-silent-rules', '--disable-silent-rules',
] ]
if toolchain.host_triplet is not None:
configure.append('--host=' + toolchain.host_triplet)
configure.extend(self.configure_args) configure.extend(self.configure_args)
try: try: