From 4596c919a60359dfc9e6868b1c9dd2dfeec68a27 Mon Sep 17 00:00:00 2001 From: Federico Di Pierro Date: Tue, 25 Oct 2022 09:42:20 +0200 Subject: [PATCH] fix(scripts): improve gcc skip logic. Signed-off-by: Federico Di Pierro --- scripts/falco-driver-loader | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/falco-driver-loader b/scripts/falco-driver-loader index adf183b4..54329f87 100755 --- a/scripts/falco-driver-loader +++ b/scripts/falco-driver-loader @@ -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