summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-03-09 13:50:55 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2023-09-26 09:40:21 +0200
commit35f75b5553ffa4d8554f3ea4016feb804fd73b66 (patch)
tree1afa5f919ac802eeaabdbc01cd761c0be118859b
parentfc556011e8cc3198ad8cf8dc5a848073eb16a3e4 (diff)
build: Add RTEMS_CLANG_STATIC_ANALYZER option
-rw-r--r--spec/build/bsps/sparc/leon3/abi.yml4
-rw-r--r--spec/build/bsps/sparc/leon3/abiclang.yml4
-rw-r--r--spec/build/bsps/sparc/leon3/abiclanganalyzer.yml18
-rw-r--r--spec/build/bsps/sparc/leon3/grp.yml4
-rw-r--r--spec/build/cpukit/cpuopts.yml2
-rw-r--r--spec/build/cpukit/optclanganalyzer.yml19
-rw-r--r--testsuites/validation/tc-mem-rtems-malloc.c2
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 a995ccc60a..c2d187e44f 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 1d28ace552..9ab3e0d298 100644
--- a/spec/build/cpukit/cpuopts.yml
+++ b/spec/build/cpukit/cpuopts.yml
@@ -16,6 +16,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;