cmake: fix use of unsupported -fno-pie with xcc

The commit 8259931fce ("xcc-clang: Do not used unavailable options")
has a side-effect that builds with xcc default to use -fno-pie. This
is not a supported compiler option for xcc, resulting in failing builds.

Use same configuration for xcc as is in place for xcc-clang, and
do not use -fno-pie.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This commit is contained in:
Kai Vehmanen 2022-08-29 10:13:09 +03:00 committed by Anas Nashif
parent 52fe06495d
commit 99bab75a69

View file

@ -9,3 +9,6 @@ include(${ZEPHYR_BASE}/cmake/compiler/gcc/compiler_flags.cmake)
check_set_compiler_property(APPEND PROPERTY warning_base "-fgnu89-inline")
set_compiler_property(PROPERTY warning_error_misra_sane)
# XCC does not support -fno-pic and -fno-pie
set_compiler_property(PROPERTY no_position_independent "")