mirror of
https://github.com/systemd/systemd
synced 2024-07-09 04:26:06 +00:00
coccinelle: search the system include path for header files as well
Since Coccinelle is originally a kernel tool, it doesn't search the system include path by default for header files. Without this we're missing a lot of types provides by stdlib (and other libraries we make use of).
This commit is contained in:
parent
4d3510d00f
commit
11959eb201
|
@ -66,7 +66,9 @@ for script in "${SCRIPTS[@]}"; do
|
||||||
# at once one spatch process can take around 2.5 GiB of RAM, which can easily eat up all available RAM
|
# at once one spatch process can take around 2.5 GiB of RAM, which can easily eat up all available RAM
|
||||||
# when paired together with parallel
|
# when paired together with parallel
|
||||||
#
|
#
|
||||||
# 2) Make sure spatch can find our includes via -I <dir>, similarly as we do when compiling stuff
|
# 2) Make sure spatch can find our includes via -I <dir>, similarly as we do when compiling stuff.
|
||||||
|
# Also, include the system include path as well, since we're not kernel and we make use of the stdlib
|
||||||
|
# (and other libraries).
|
||||||
#
|
#
|
||||||
# 3) Make sure to include includes from includes (--recursive-includes), but use them only to get type
|
# 3) Make sure to include includes from includes (--recursive-includes), but use them only to get type
|
||||||
# definitions (--include-headers-for-types) - otherwise we'd start formating them as well, which might be
|
# definitions (--include-headers-for-types) - otherwise we'd start formating them as well, which might be
|
||||||
|
@ -81,6 +83,7 @@ for script in "${SCRIPTS[@]}"; do
|
||||||
parallel --halt now,fail=1 --keep-order --noswap --max-args=10 \
|
parallel --halt now,fail=1 --keep-order --noswap --max-args=10 \
|
||||||
spatch --cache-prefix "$CACHE_DIR" \
|
spatch --cache-prefix "$CACHE_DIR" \
|
||||||
-I src \
|
-I src \
|
||||||
|
-I /usr/include \
|
||||||
--recursive-includes \
|
--recursive-includes \
|
||||||
--include-headers-for-types \
|
--include-headers-for-types \
|
||||||
--undefined SD_BOOT \
|
--undefined SD_BOOT \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user