Skip to content
Commit 8e7622b1 authored by Ken Liu's avatar Ken Liu
Browse files

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: default avatarKen Liu <ken.liu@arm.com>
parent a26983f5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment