commit | 679d82c48411973a477da05d4e77fca875902e73 | [log] [tgz] |
---|---|---|
author | Grant Ramsay <gramsay@enphaseenergy.com> | Sat Nov 11 09:35:49 2023 +1300 |
committer | Carles CufĂ <carles.cufi@nordicsemi.no> | Mon Nov 13 10:21:41 2023 +0100 |
tree | 85ec9d7de8534c0307cd344c1035db7474b05bae | |
parent | c72b9f5048b0c4d523a40043248ef089d5b9363f [diff] |
libc: Add GCC fno-builtin-malloc flag to common stdlib compilation This prevents the compiler from optimizing calloc into an infinite recursive call. For example a call to malloc + memset zero at GCC -O2 will be replaced by a call to calloc. This causes infinite recursion if the function being implemented *is* calloc. fno-builtin-malloc forces the compiler to avoid this optimization. Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>