Skip to content

Commit 0135803

Browse files
committed
csgcca: introduce a simple man page
1 parent 3306ca4 commit 0135803

6 files changed

Lines changed: 117 additions & 43 deletions

File tree

README

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ csclng
1616
csclng is a compiler wrapper that runs the Clang analyzer in background.
1717

1818

19+
csgcca
20+
------
21+
csgcca is a compiler wrapper that runs the GCC analyzer in background.
22+
23+
1924
csmatch
2025
-------
2126
csmatch is an experimental compiler wrapper that runs smatch in background.

doc/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ macro(add_man_page tool)
2121
-D ${CMAKE_CURRENT_BINARY_DIR}
2222
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${tool}.adoc
2323
COMMENT "Generating ${tool}.1 man page...")
24+
set(man_pages ${man_pages} ${CMAKE_CURRENT_BINARY_DIR}/${tool}.1)
2425
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${tool}.1
2526
DESTINATION share/man/man1)
2627
endmacro()
@@ -30,7 +31,6 @@ find_program(A2X a2x)
3031
if(A2X)
3132
add_man_page(csclng)
3233
add_man_page(cscppc)
33-
add_custom_target(doc ALL DEPENDS
34-
${CMAKE_CURRENT_BINARY_DIR}/csclng.1
35-
${CMAKE_CURRENT_BINARY_DIR}/cscppc.1)
34+
add_man_page(csgcca)
35+
add_custom_target(doc ALL DEPENDS ${man_pages})
3636
endif()

doc/csclng.adoc

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ The following parameters are passed to clang from compiler's command line:
4242

4343
* -m64
4444

45+
* -fexceptions
46+
4547
* -fno-exceptions
4648

4749
* -O...
@@ -60,26 +62,6 @@ The following file extensions are recognized as C/C++ source files:
6062

6163
* cxx
6264

63-
The following path substrings are black-listed from being scanned by clang:
64-
65-
* conftest.c
66-
67-
* _configtest.c
68-
69-
* /CMakeTmp/
70-
71-
* ../test.c
72-
73-
* ../../test.c
74-
75-
* config-temp/qemu-conf.c
76-
77-
* scripts/kconfig/conf.c
78-
79-
* scripts/kconfig/zconf.tab.c
80-
81-
* /tmp/cov-mockbuild/
82-
8365
If csclng is installed on system, the following command activates the wrapper:
8466
-------------------------------------------------
8567
export PATH="`csclng --print-path-to-wrap`:$PATH"

doc/cscppc.adoc

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -58,26 +58,6 @@ The following file extensions are recognized as C/C++ source files:
5858

5959
* cxx
6060

61-
The following path substrings are black-listed from being scanned by cppcheck:
62-
63-
* conftest.c
64-
65-
* _configtest.c
66-
67-
* /CMakeTmp/
68-
69-
* ../test.c
70-
71-
* ../../test.c
72-
73-
* config-temp/qemu-conf.c
74-
75-
* scripts/kconfig/conf.c
76-
77-
* scripts/kconfig/zconf.tab.c
78-
79-
* /tmp/cov-mockbuild/
80-
8161
If cscppc is installed on system, the following command activates the wrapper:
8262
-------------------------------------------------
8363
export PATH="`cscppc --print-path-to-wrap`:$PATH"

doc/csgcca.adoc

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
csgcca(1)
2+
=========
3+
:doctype: manpage
4+
5+
NAME
6+
----
7+
csgcca - a compiler wrapper that runs the GCC analyzer in background
8+
9+
10+
SYNOPSIS
11+
--------
12+
*csgcca* ['--help' | '--print-path-to-wrap']
13+
14+
15+
DESCRIPTION
16+
-----------
17+
csgcca is a compiler wrapper that runs 'gcc -fanalyzer' in background. Create
18+
a symbolic link to csgcca named as your compiler and put it to your $PATH.
19+
20+
The following parameters are given to the GCC analyzer by default:
21+
22+
* -fanalyzer
23+
24+
* -fdiagnostics-path-format=separate-events
25+
26+
* -fno-diagnostics-show-caret
27+
28+
* -c -o /dev/null
29+
30+
The following parameters are passed to the GCC analyzer from compiler's command
31+
line:
32+
33+
* -D...
34+
35+
* -I...
36+
37+
* -include ...
38+
39+
* -iquote ...
40+
41+
* -isystem ...
42+
43+
* -m16
44+
45+
* -m32
46+
47+
* -m64
48+
49+
* -fexceptions
50+
51+
* -fno-exceptions
52+
53+
* -O...
54+
55+
* -std...
56+
57+
If csgcca is installed on system, the following command activates the wrapper:
58+
-------------------------------------------------
59+
export PATH="`csgcca --print-path-to-wrap`:$PATH"
60+
-------------------------------------------------
61+
62+
63+
OPTIONS
64+
-------
65+
*--help*::
66+
Prints basic usage information.
67+
68+
*--print-path-to-wrap*::
69+
Prints path to the directory with symlinks to the csgcca executable.
70+
71+
72+
EXIT STATUS
73+
-----------
74+
csgcca propagates the exit status returned by the compiler (in case csgcca
75+
succeeds to run the compiler). The exit status returned by the GCC analyzer
76+
does not affect the resulting exit status.
77+
78+
79+
ENVIRONMENT VARIABLES
80+
---------------------
81+
*DEBUG_CSGCCA*::
82+
If set to a non-empty string, csgcca outputs the list of parameters given
83+
to the GCC analyzer to the standard output.
84+
85+
*CSGCCA_ADD_OPTS*::
86+
csgcca expects a colon-separated list of GCC options that should be
87+
appended to command line prior to invoking the GCC analyzer. The options
88+
are appended even if they already appear in the command line and they are
89+
always appended at the end of the command line.
90+
91+
92+
BUGS
93+
----
94+
Please report bugs and feature requests at https://github.com/kdudka/cscppc .
95+
96+
97+
AUTHOR
98+
------
99+
Written by Kamil Dudka.
100+
101+
102+
COPYING
103+
-------
104+
Copyright \(C) 2020-2021 Red Hat, Inc. Free use of this software is granted
105+
under the terms of the GNU General Public License (GPL). See the COPYING file
106+
for details.

make-srpm.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ done
200200
%files -n csgcca
201201
%{_bindir}/csgcca
202202
%{_libdir}/csgcca
203+
%{_mandir}/man1/csgcca.1*
203204
%doc COPYING
204205
205206
%files -n csmatch

0 commit comments

Comments
 (0)