diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-06-27 17:29:25 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-07-04 08:29:52 +0200 |
commit | 5c13a96f367564678b2759d8a89744340bb6099d (patch) | |
tree | 7ce5e0858e548949cbab5b71512d00f123075ddb /spec/build | |
parent | gcov: Add wrapper to dump the gcov info (diff) | |
download | rtems-5c13a96f367564678b2759d8a89744340bb6099d.tar.bz2 |
build: Add RTEMS_GCOV_COVERAGE option
Update #4670.
Diffstat (limited to '')
-rw-r--r-- | spec/build/bsps/optcflags.yml | 2 | ||||
-rw-r--r-- | spec/build/cpukit/cpuopts.yml | 10 | ||||
-rw-r--r-- | spec/build/cpukit/grp.yml | 2 | ||||
-rw-r--r-- | spec/build/cpukit/optcoverage.yml | 16 | ||||
-rw-r--r-- | spec/build/cpukit/optcoveragecflags.yml | 20 | ||||
-rw-r--r-- | spec/build/cpukit/optcoverageldflags.yml | 25 | ||||
-rw-r--r-- | spec/build/cpukit/optnocoveragecflags.yml | 18 | ||||
-rw-r--r-- | spec/build/cpukit/optnocoverageldflags.yml | 18 | ||||
-rw-r--r-- | spec/build/testsuites/grp.yml | 3 |
9 files changed, 112 insertions, 2 deletions
diff --git a/spec/build/bsps/optcflags.yml b/spec/build/bsps/optcflags.yml index ef03940bff..302f1723a6 100644 --- a/spec/build/bsps/optcflags.yml +++ b/spec/build/bsps/optcflags.yml @@ -1,7 +1,7 @@ SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause actions: - set-value: | - ${BSP_OPTIMIZATION_FLAGS} + ${BSP_OPTIMIZATION_FLAGS} ${COVERAGE_COMPILER_FLAGS} - substitute: null - split: null - env-assign: null diff --git a/spec/build/cpukit/cpuopts.yml b/spec/build/cpukit/cpuopts.yml index 301d49ccea..86cc7f676a 100644 --- a/spec/build/cpukit/cpuopts.yml +++ b/spec/build/cpukit/cpuopts.yml @@ -68,6 +68,16 @@ links: - role: build-dependency uid: optsztime - role: build-dependency + uid: optcoverage +- role: build-dependency + uid: optcoveragecflags +- role: build-dependency + uid: optnocoveragecflags +- role: build-dependency + uid: optcoverageldflags +- role: build-dependency + uid: optnocoverageldflags +- role: build-dependency uid: optversion target: cpukit/include/rtems/score/cpuopts.h type: build diff --git a/spec/build/cpukit/grp.yml b/spec/build/cpukit/grp.yml index ec9cab2167..76e57aed96 100644 --- a/spec/build/cpukit/grp.yml +++ b/spec/build/cpukit/grp.yml @@ -2,11 +2,13 @@ SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause build-type: group cflags: - ${CPUKIT_OPTIMIZATION_FLAGS} +- ${COVERAGE_COMPILER_FLAGS} copyrights: - Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) cppflags: [] cxxflags: - ${CPUKIT_OPTIMIZATION_FLAGS} +- ${COVERAGE_COMPILER_FLAGS} enabled-by: true includes: [] install: [] diff --git a/spec/build/cpukit/optcoverage.yml b/spec/build/cpukit/optcoverage.yml new file mode 100644 index 0000000000..7c7013fe43 --- /dev/null +++ b/spec/build/cpukit/optcoverage.yml @@ -0,0 +1,16 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +actions: +- get-boolean: null +- env-enable: null +- define-condition: null +build-type: option +copyrights: +- Copyright (C) 2022 embedded brains GmbH (http://www.embedded-brains.de) +default: false +default-by-variant: [] +description: | + Enable the code and branch coverage support. +enabled-by: true +links: [] +name: RTEMS_GCOV_COVERAGE +type: build diff --git a/spec/build/cpukit/optcoveragecflags.yml b/spec/build/cpukit/optcoveragecflags.yml new file mode 100644 index 0000000000..08cc79eb6c --- /dev/null +++ b/spec/build/cpukit/optcoveragecflags.yml @@ -0,0 +1,20 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +actions: +- get-string: null +- split: null +- env-assign: null +build-type: option +copyrights: +- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) +default: +- --coverage +- -fprofile-info-section=.rtemsroset.gcov_info.content +- -fprofile-update=atomic +default-by-variant: [] +description: | + Compiler flags recommended for components which should generate coverage + information. +enabled-by: RTEMS_GCOV_COVERAGE +links: [] +name: COVERAGE_COMPILER_FLAGS +type: build diff --git a/spec/build/cpukit/optcoverageldflags.yml b/spec/build/cpukit/optcoverageldflags.yml new file mode 100644 index 0000000000..600c89e770 --- /dev/null +++ b/spec/build/cpukit/optcoverageldflags.yml @@ -0,0 +1,25 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +actions: +- get-string: null +- split: null +- env-assign: null +build-type: option +copyrights: +- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) +default: +- -Wl,--wrap=_CPU_Fatal_halt +- -Wl,--wrap=bsp_reset +- -Wl,--start-group +- -lrtemsbsp +- -lrtemscpu +- -lrtemstest +- -lgcov +- -Wl,--end-group +default-by-variant: [] +description: | + Linker flags recommended for executables which contain modules with coverage + information. +enabled-by: RTEMS_GCOV_COVERAGE +links: [] +name: COVERAGE_LINKER_FLAGS +type: build diff --git a/spec/build/cpukit/optnocoveragecflags.yml b/spec/build/cpukit/optnocoveragecflags.yml new file mode 100644 index 0000000000..4cdb245f3e --- /dev/null +++ b/spec/build/cpukit/optnocoveragecflags.yml @@ -0,0 +1,18 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +actions: +- get-string: null +- split: null +- env-assign: null +build-type: option +copyrights: +- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) +default: [] +default-by-variant: [] +description: | + Compiler flags recommended for components which should generate coverage + information. +enabled-by: + not: RTEMS_GCOV_COVERAGE +links: [] +name: COVERAGE_COMPILER_FLAGS +type: build diff --git a/spec/build/cpukit/optnocoverageldflags.yml b/spec/build/cpukit/optnocoverageldflags.yml new file mode 100644 index 0000000000..247b171d26 --- /dev/null +++ b/spec/build/cpukit/optnocoverageldflags.yml @@ -0,0 +1,18 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +actions: +- get-string: null +- split: null +- env-assign: null +build-type: option +copyrights: +- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) +default: [] +default-by-variant: [] +description: | + Linker flags recommended for executables which contain modules which generate + coverage information. +enabled-by: + not: RTEMS_GCOV_COVERAGE +links: [] +name: COVERAGE_LINKER_FLAGS +type: build diff --git a/spec/build/testsuites/grp.yml b/spec/build/testsuites/grp.yml index 18c8ccd4d8..cb06fd6ae7 100644 --- a/spec/build/testsuites/grp.yml +++ b/spec/build/testsuites/grp.yml @@ -11,7 +11,8 @@ enabled-by: true includes: - ${BSP_INCLUDES} install: [] -ldflags: [] +ldflags: +- ${COVERAGE_LINKER_FLAGS} links: - role: build-dependency uid: optada |