mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Make c_build_helper module respect HOSTCC
If HOSTCC is set, use that to generate files, otherwise use CC. This should make cross-compilation with generated files slightly easier. Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
@ -90,7 +90,10 @@ int main(void)
|
|||||||
''')
|
''')
|
||||||
|
|
||||||
def compile_c_file(c_filename, exe_filename, include_dirs):
|
def compile_c_file(c_filename, exe_filename, include_dirs):
|
||||||
cc = os.getenv('CC', 'cc')
|
# Respect $HOSTCC if it is set
|
||||||
|
cc = os.getenv('HOSTCC', None)
|
||||||
|
if cc is None:
|
||||||
|
cc = os.getenv('CC', 'cc')
|
||||||
cmd = [cc]
|
cmd = [cc]
|
||||||
|
|
||||||
proc = subprocess.Popen(cmd,
|
proc = subprocess.Popen(cmd,
|
||||||
|
Reference in New Issue
Block a user