diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-03-09 13:50:55 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-07-25 10:48:14 +0200 |
commit | a94c5904255ed02c5469af2874cc1105f74c87b8 (patch) | |
tree | 19c94379d8370922395c2b959f84dbae694b885a | |
parent | ef8bcaa431b04bec803ab587f121576636a7964f (diff) |
build: Add RTEMS_CLANG_STATIC_ANALYZER option
-rw-r--r-- | spec/build/bsps/sparc/leon3/abi.yml | 4 | ||||
-rw-r--r-- | spec/build/bsps/sparc/leon3/abiclang.yml | 4 | ||||
-rw-r--r-- | spec/build/bsps/sparc/leon3/abiclanganalyzer.yml | 18 | ||||
-rw-r--r-- | spec/build/bsps/sparc/leon3/grp.yml | 4 | ||||
-rw-r--r-- | spec/build/cpukit/cpuopts.yml | 2 | ||||
-rw-r--r-- | spec/build/cpukit/optclanganalyzer.yml | 19 | ||||
-rw-r--r-- | testsuites/validation/tc-mem-rtems-malloc.c | 2 |
7 files changed, 49 insertions, 4 deletions
diff --git a/spec/build/bsps/sparc/leon3/abi.yml b/spec/build/bsps/sparc/leon3/abi.yml index f4f1628093..a4c4153e94 100644 --- a/spec/build/bsps/sparc/leon3/abi.yml +++ b/spec/build/bsps/sparc/leon3/abi.yml @@ -25,7 +25,9 @@ default: description: | ABI flags enabled-by: -- gcc + and: + - gcc + - not: RTEMS_CLANG_STATIC_ANALYZER links: [] name: ABI_FLAGS type: build diff --git a/spec/build/bsps/sparc/leon3/abiclang.yml b/spec/build/bsps/sparc/leon3/abiclang.yml index 577129762c..1235baf789 100644 --- a/spec/build/bsps/sparc/leon3/abiclang.yml +++ b/spec/build/bsps/sparc/leon3/abiclang.yml @@ -27,7 +27,9 @@ default: description: | ABI flags enabled-by: -- clang + and: + - clang + - not: RTEMS_CLANG_STATIC_ANALYZER links: [] name: ABI_FLAGS type: build diff --git a/spec/build/bsps/sparc/leon3/abiclanganalyzer.yml b/spec/build/bsps/sparc/leon3/abiclanganalyzer.yml new file mode 100644 index 0000000000..437fdaccf0 --- /dev/null +++ b/spec/build/bsps/sparc/leon3/abiclanganalyzer.yml @@ -0,0 +1,18 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +actions: +- get-string: null +- split: null +- env-append: null +build-type: option +copyrights: +- Copyright (C) 2021 embedded brains GmbH & Co. KG +default: +- enabled-by: true + value: + - -mcpu=leon3 +description: | + ABI flags +enabled-by: RTEMS_CLANG_STATIC_ANALYZER +links: [] +name: ABI_FLAGS +type: build diff --git a/spec/build/bsps/sparc/leon3/grp.yml b/spec/build/bsps/sparc/leon3/grp.yml index d708a65735..da37e907b4 100644 --- a/spec/build/bsps/sparc/leon3/grp.yml +++ b/spec/build/bsps/sparc/leon3/grp.yml @@ -23,9 +23,11 @@ links: - role: build-dependency uid: ../grp - role: build-dependency + uid: abi +- role: build-dependency uid: abiclang - role: build-dependency - uid: abi + uid: abiclanganalyzer - role: build-dependency uid: obj - role: build-dependency diff --git a/spec/build/cpukit/cpuopts.yml b/spec/build/cpukit/cpuopts.yml index 49dfc26e4b..01fc648ced 100644 --- a/spec/build/cpukit/cpuopts.yml +++ b/spec/build/cpukit/cpuopts.yml @@ -20,6 +20,8 @@ links: - role: build-dependency uid: optclang - role: build-dependency + uid: optclanganalyzer +- role: build-dependency uid: optarflags - role: build-dependency uid: optwarn diff --git a/spec/build/cpukit/optclanganalyzer.yml b/spec/build/cpukit/optclanganalyzer.yml new file mode 100644 index 0000000000..4404a09b21 --- /dev/null +++ b/spec/build/cpukit/optclanganalyzer.yml @@ -0,0 +1,19 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +actions: +- get-boolean: null +- env-enable: null +- define-condition: null +- set-value: -D_Atomic= +- env-append: CFLAGS +build-type: option +copyrights: +- Copyright (C) 2021 embedded brains GmbH & Co. KG +default: +- enabled-by: true + value: false +description: | + Enable the Clang Static Analyzer support. +enabled-by: true +links: [] +name: RTEMS_CLANG_STATIC_ANALYZER +type: build diff --git a/testsuites/validation/tc-mem-rtems-malloc.c b/testsuites/validation/tc-mem-rtems-malloc.c index c4ba0bc170..9f611ae150 100644 --- a/testsuites/validation/tc-mem-rtems-malloc.c +++ b/testsuites/validation/tc-mem-rtems-malloc.c @@ -261,7 +261,7 @@ static void RtemsMallocReqMalloc_Post_Size_Check( case RtemsMallocReqMalloc_Post_Size_Valid: { /* * The size of the allocated memory area shall greater than or equal to - * the ``size` parameter. + * the ``size`` parameter. */ /* Assume that the next allocation is done from adjacent memory */ ptr = ctx->ptr; |