cmake: compiler: Check -fno-printf-return-value before using
GCC versions before 7.1.0 do not have the -fno-printf-return-value flag and give an error if it is used. This patch improves compatibility with older compilers by making CMake check for the flag's availability before using. Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
This commit is contained in:
parent
c7bc47c60d
commit
8b59dcfd11
1 changed files with 1 additions and 1 deletions
|
@ -121,7 +121,7 @@ if (NOT CONFIG_NEWLIB_LIBC AND
|
|||
set_compiler_property(APPEND PROPERTY nostdinc_include ${NOSTDINC})
|
||||
endif()
|
||||
|
||||
set_compiler_property(PROPERTY no_printf_return_value -fno-printf-return-value)
|
||||
check_set_compiler_property(PROPERTY no_printf_return_value -fno-printf-return-value)
|
||||
|
||||
set_property(TARGET compiler-cpp PROPERTY nostdincxx "-nostdinc++")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue