GCC versions before 4.5 do not have the -fno-lto flag and give an error if it is used. The flag may also be unavailable on various other non-GCC compilers. Previously, the picolibc CMakeList.txt script assumed that the flag was available, and hard-coded it as an addition to the compiler flags. This patch improves compatibility by making use of the already existing "prohibit_lto" CMake target compiler property, which is set to the appropriate flag to disable LTO support, or unset if the compiler lacks such an option. Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com> |
||
|---|---|---|
| .. | ||
| acpi | ||
| cpp | ||
| crc | ||
| hash | ||
| heap | ||
| libc | ||
| mem_blocks | ||
| net_buf | ||
| open-amp | ||
| os | ||
| posix | ||
| runtime | ||
| smf | ||
| utils | ||
| CMakeLists.txt | ||
| Kconfig | ||