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:
parent
ac49ee5d4c
commit
ef504d96c1
1 changed files with 4 additions and 1 deletions
|
@ -90,6 +90,9 @@ int main(void)
|
||||||
''')
|
''')
|
||||||
|
|
||||||
def compile_c_file(c_filename, exe_filename, include_dirs):
|
def compile_c_file(c_filename, exe_filename, include_dirs):
|
||||||
|
# Respect $HOSTCC if it is set
|
||||||
|
cc = os.getenv('HOSTCC', None)
|
||||||
|
if cc is None:
|
||||||
cc = os.getenv('CC', 'cc')
|
cc = os.getenv('CC', 'cc')
|
||||||
cmd = [cc]
|
cmd = [cc]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue