Commit 40c2e08e82 ("xcc/cmake: don't discard stderr; don't (ever!) use
ERROR_QUIET") fixed xcc but the corresponding code is duplicated. Fix
the duplicates too.
See that commit for the issue description, longer commit message and
rationale.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This enables -Wshadow to warn about shadow variables on
in tree code under arch/, boards/, drivers/, kernel/,
lib/, soc/, and subsys/.
Note that this does not enable it globally because
out-of-tree modules will probably take some time to fix
(or not at all depending on the project), and it would be
great to avoid introduction of any new shadow variables
in the meantime.
Also note that this tries to be done in a minimally
invasive way so it is easy to revert when we enable
-Wshadow globally. Source files under modules/, samples/
and tests/ are currently excluded because there does not
seem to be a trivial way to add -Wshadow there without
going through all CMakeLists.txt to add the option
(as there are 1000+ files to change).
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
arm-clang utilizes the gcc fpu flags, however -mfpu=auto is not a
supported option in arm-clang. For arm-clang we can mimic the auto
behavior by just not setting the -mfpu option.
Signed-off-by: Kumar Gala <kumar.gala@intel.com>
On mps2_an521 GCC_M_CPU gets set to cortex-m33+nodsp, however that is
not a valid setting for CMAKE_SYSTEM_PROCESSOR. We need to strip the
extra options (+<OPTION>) from GCC_M_CPU so that we get just cortex-m33.
Signed-off-by: Kumar Gala <kumar.gala@intel.com>
When we build for a SoC that has a cortex-m4 w/o a FPU that
utilizes CMSIS headers with armclang (like mec1501modular_assy6885)
we get the following warning:
modules/hal/cmsis/CMSIS/Core/Include/core_cm4.h:93:8: warning:
"Compiler generates FPU instructions for a device without
an FPU (check __FPU_PRESENT)" [-W#warnings]
#warning "Compiler generates FPU instructions for a device
without an FPU (check __FPU_PRESENT)"
Fix the by setting -mfloat-abi=soft for such cases that don't have FPU
enabled.
Fixes#56068
Signed-off-by: Kumar Gala <kumar.gala@intel.com>
The toolchain support was developed and tested against arm clang
version 6.17. So add a check to ensure we are utilizing 6.17 or
newer.
Signed-off-by: Kumar Gala <kumar.gala@intel.com>
This commit updates the Zephyr build system to support specifying
advanced floating-point compilation options derived from the newly
introduced unified floating-point configurations.
The following changes are introduced by this commit:
1. Specify architecture floating-point option to the `-mcpu` flag.
2. Specify floating-point unit (FPU) type using the `-mfpu` flag.
Note that the `-march` flag is not specified separately because the
`-mcpu` flag provides more detailed architecture options and this
makes the `-march` flag redundant.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Support for ARM Compiler C library.
This commit add support for the ARM Compiler C libary in:
- Kconfig
- libc/armstdc
A new Kconfig symbol is added to allow a toolchain to specify if they
support linking with the minimal C library.
Also the CMake variable `TOOLCHAIN_HAS_NEWLIB` is exported to Kconfig
so that CONFIG_NEWLIB_LIBS can only be enabled if the toolchain has
newlib.
The armclang toolchain selects the CMake scatter file generator and
disables support for the LD linker template which is not supported by
armlink.
For the ARM Compiler C library, a corresponding lib/libc/armstc/ folder
with a minimal implementation to work with the ARM Compiler C library
is added.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This is the initial support for the armclang compiler together with the
armlink linker.
Introduced in this commit:
- armclang compiler support
- armlink linker support
- armlink scatter file generator for scatter loading
- dual pass linker script generation
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>