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> |
||
|---|---|---|
| .. | ||
| arcmwdt | ||
| armstdc | ||
| common | ||
| minimal | ||
| newlib | ||
| picolibc | ||
| CMakeLists.txt | ||
| Kconfig | ||