在高版本的 bear 中,需要使用
-- 来表明 command to execute
# bear --help
Usage: bear [--output <arg>] [--verbose] -- ...
--output <arg> path of the result file (default: compile_commands.json)
--verbose run in verbose mode
-- ... command to execute
advanced options
--append append result to an existing output file
--config <arg> path of the config file
--force-preload force to use library preload
--force-wrapper force to use compiler wrappers
developer options
--citnames <arg> path to the citnames executable (default: /usr/bin/citnames)
--interceptor <arg> path to the intercept executable (default: /usr/bin/intercept)
--library <arg> path to the preload library (default: /usr/$LIB/bear/libexec.so)
--wrapper <arg> path to the wrapper executable (default: /usr/lib/x86_64-linux-gnu/bear/wrapper)
--wrapper-dir <arg> path to the wrapper directory (default: /usr/lib/x86_64-linux-gnu/bear/wrapper.d)
query options
--help print help and exit
--version print version and exit
所以你应该执行:
bear -- make zImage -j4