Skip to content
Commit 1b399d78 authored by Joel Holdsworth's avatar Joel Holdsworth Committed by Benjamin Cabé
Browse files

picolibc: Replace hard coded -fno-lto flag



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: default avatarJoel Holdsworth <jholdsworth@nvidia.com>
parent 6d63d4d9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment