diff --git a/scripts/falco-driver-loader b/scripts/falco-driver-loader index a9395bc9..09184a12 100755 --- a/scripts/falco-driver-loader +++ b/scripts/falco-driver-loader @@ -154,7 +154,7 @@ load_kernel_module_compile() { fi # Try to compile using all the available gcc versions - for CURRENT_GCC in $(which gcc) $(ls "$(dirname "$(which gcc)")"/gcc-* | grep 'gcc-[0-9]\+' | sort -r); do + for CURRENT_GCC in $(which gcc) $(ls "$(dirname "$(which gcc)")"/gcc-* | grep 'gcc-[0-9]\+' | sort -n -r -k 2 -t -); do echo "* Trying to dkms install ${DRIVER_NAME} module with GCC ${CURRENT_GCC}" echo "#!/usr/bin/env bash" > /tmp/falco-dkms-make echo "make CC=${CURRENT_GCC} \$@" >> /tmp/falco-dkms-make