Build: Avoid toolchain library function optimization
Assign '-fno-builtin' to avoid optimizing toolchain library functions,
this could ensure a safe overridden on toolchain library functions
(mostly libc functions).
This flag is supported by Arm Compiler and GNUARM toolchain.
Arm Compiler needs one more '-nostdlib' to disable all optimizations.
Otherwise, some symbols like 'snprintf' still are optimized and lead
to a link error when default library is not provided:
'Error: L6218E: Undefined symbol __2snprintf'
Change-Id: I464e1e47fa6370feeb041f72d1ffff1b585af71f
Signed-off-by:
Ken Liu <ken.liu@arm.com>
Loading
Please register or sign in to comment