mem_usage.py: fix error with ccache
Fix the following error:
make mem_usage CROSS_COMPILE="ccache arm-linux-gnueabihf-"
...
GEN out/arm-plat-vexpress/core/tee.mem_usage
Traceback (most recent call last):
File "./scripts/mem_usage.py", line 162, in <module>
main()
File "./scripts/mem_usage.py", line 94, in main
universal_newlines=True)
File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'ccache arm-linux-gnueabihf-readelf'
core/arch/arm/kernel/link.mk:255: recipe for target 'out/arm-plat-vexpress/core/tee.mem_usage' failed
make: *** [out/arm-plat-vexpress/core/tee.mem_usage] Error 1
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
diff --git a/scripts/mem_usage.py b/scripts/mem_usage.py
index 8b7faf0..d9aa2df 100755
--- a/scripts/mem_usage.py
+++ b/scripts/mem_usage.py
@@ -89,7 +89,8 @@
args = get_args()
env = os.environ.copy()
env['LC_ALL'] = 'C'
- readelf = subprocess.Popen([readelf_cmd(), '-S', '-W', args.tee_elf],
+ readelf = subprocess.Popen(str.split(readelf_cmd()) + ['-S', '-W',
+ args.tee_elf],
stdout=subprocess.PIPE, env=env,
universal_newlines=True)
for line in iter(readelf.stdout.readline, ''):