zephyr/cmake
Flavio Ceolin 3fc5d971fe security: Add compiler static analysis support
Enable GCC builtin static analysis in Zephyr's static code analysis
(SCA) infra.

When this option is enabled GCC performs a static analysis and
can point problems like:

sample.c

+	int *j;
+
+	if (j != NULL) {
+		printf("j != NULL\n");

output:

${ZEPHYR_BASE}/samples/userspace/hello_world_user/src/main.c:30:12:
warning: use of uninitialized value 'j' [CWE-457]
[-Wanalyzer-use-of-uninitialized-value]

   30 |         if (j != NULL) {
      |            ^
  'main': events 1-2
    |
    |   25 |         int *j;
    |      |              ^
    |      |              |
    |      |              (1) region created on stack here
    |......
    |   30 |         if (j != NULL) {
    |      |            ~
    |      |            |
    |      |            (2) use of uninitialized value 'j' here

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-01-25 12:07:27 +01:00
..
app cmake: function to update Zephyr_DIR when loading old Zephyr packages 2022-03-07 16:35:54 +01:00
bintools llext: move all flags to compiler specific cmake files 2024-01-21 10:59:49 +01:00
compiler llext: move all flags to compiler specific cmake files 2024-01-21 10:59:49 +01:00
emu config: qemu: Add QEMU_EXTRA_FLAGS config option 2023-10-20 15:03:55 +02:00
flash west runner: Add exe file to configuration 2023-10-10 15:26:09 +02:00
ide license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
linker cmake: code_relocation: Re-run when relocation_dict.txt changes 2024-01-15 13:20:17 +01:00
linker_script zbus: add priority boost feature 2024-01-04 09:41:54 +01:00
makefile_exports cmake: using zephyr_get_compile_options_for_lang_as_string for export 2020-12-15 08:37:54 -05:00
modules linker: Only use itcm and dtcm snippets if regions exist 2024-01-24 22:10:11 -06:00
reports scripts: size_report: Add support for TF-M and BL2 image size reports 2022-03-09 14:03:52 -05:00
sca security: Add compiler static analysis support 2024-01-25 12:07:27 +01:00
toolchain toolchain: esp32: fix cmake build issue with 'espressif' toolchain 2023-11-22 09:52:29 +01:00
usage cmake: add initlevels to usage 2023-11-24 11:39:21 +01:00
util license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
cfb.cmake scripts: move gen_cfb_font_header.py to scripts/build 2022-07-12 10:03:45 +02:00
extra_flags.cmake cmake: extra_flags: Use zephyr_get 2023-10-24 11:35:27 +02:00
gcc-m-cpu.cmake soc: arm64: Add agilex5 soc folder and its configurations 2023-07-25 16:58:01 +00:00
gcc-m-fpu.cmake cmake: gcc: Fix Cortex-R52 FPU type 2022-10-19 00:28:33 +09:00
gen_version_h.cmake cmake: generalize VERSION infrastructure for better reuse 2023-05-17 13:56:58 +02:00
hex.cmake cmake: hex: deprecate use of to_hex() and from_hex() utility functions 2024-01-22 09:48:33 +00:00
kobj.cmake scripts: move gen_kobject_list.py to scripts/build/gen_kobject_list.py 2022-07-12 10:03:45 +02:00
mcuboot.cmake cmake: mcuboot: set align to 1 for overwrite only mode 2024-01-12 09:59:51 +01:00
package_helper.cmake cmake: stub zephyr_set(... SCOPE ...) function in package helper 2023-10-05 09:43:28 +01:00
pristine.cmake cmake: pristine.cmake requires SOURCE_DIR and BINARY_DIR as arguments 2021-01-23 08:31:13 -05:00
target_toolchain_flags.cmake everywhere: fix typos 2022-03-14 20:22:24 -04:00
verify-toolchain.cmake cmake: rework of host tools and generic toolchain handling 2022-09-01 15:59:43 +02:00
vif.cmake USB-C: genVIF: Cleanup and add support to pick static data from input 2023-05-26 13:54:43 -04:00