mirror of
https://github.com/falcosecurity/falco.git
synced 2025-07-31 06:01:52 +00:00
fix(scripts): improve gcc skip logic.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
This commit is contained in:
parent
4e57670599
commit
4596c919a6
@ -216,9 +216,8 @@ load_kernel_module_compile() {
|
||||
# Try to compile using all the available gcc versions
|
||||
for CURRENT_GCC in $(ls "$(dirname "$(which gcc)")"/gcc*); do
|
||||
# Filter away gcc-{ar,nm,...}
|
||||
# first line of gcc --version output is always like:
|
||||
# "gcc (GCC) 12.2.0"
|
||||
${CURRENT_GCC} --version 2>&1 | grep GCC
|
||||
# Only gcc compiler has `-print-search-dirs` option.
|
||||
${CURRENT_GCC} -print-search-dirs 2>&1 | grep "install:"
|
||||
if [ "$?" -ne "0" ]; then
|
||||
continue
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user