From 178e089683bf42097ac6d27522820d07483bc6bd Mon Sep 17 00:00:00 2001 From: Gyorgy Sarvari Date: Thu, 23 Apr 2026 08:54:02 +0200 Subject: [PATCH] c_build_helper: Split cc command line Optionally the CC/HOSTCC environment variable can hold the command to invoke the C compiler, however this command can also contain extra arguments, not only the binary name. In this particular case Python was treating the whole value as a single binary name, and was trying to execute as such (e.g. "cc -arg1 -arg2" instead of "cc" and the arguments separately), which results in failure. Split the compiler command into its components to invoke it correctly. Signed-off-by: Gyorgy Sarvari --- scripts/mbedtls_framework/c_build_helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mbedtls_framework/c_build_helper.py b/scripts/mbedtls_framework/c_build_helper.py index 59bb326e25..85dbb628fc 100644 --- a/scripts/mbedtls_framework/c_build_helper.py +++ b/scripts/mbedtls_framework/c_build_helper.py @@ -98,7 +98,7 @@ def compile_c_file(c_filename, exe_filename, include_dirs): cc = os.getenv('HOSTCC', None) if cc is None: cc = os.getenv('CC', 'cc') - cmd = [cc] + cmd = cc.split() proc = subprocess.Popen(cmd, stdout=subprocess.DEVNULL,