diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2012-11-14 00:28:27 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2012-11-14 00:28:27 +0100 |
commit | 8ae66e50aa659a45dc108433d63917b25cb08cbe (patch) | |
tree | 9dbf20ab2f4e641025b067ca51c6a923f7d8da92 /driver/Makefile | |
parent | 6ec3b1f65cd813a0dba22d6a57d90a1f6ec4157a (diff) | |
download | pcitool-8ae66e50aa659a45dc108433d63917b25cb08cbe.tar.gz pcitool-8ae66e50aa659a45dc108433d63917b25cb08cbe.tar.bz2 pcitool-8ae66e50aa659a45dc108433d63917b25cb08cbe.tar.xz pcitool-8ae66e50aa659a45dc108433d63917b25cb08cbe.zip |
fix gcc version detection
Diffstat (limited to 'driver/Makefile')
-rw-r--r-- | driver/Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/driver/Makefile b/driver/Makefile index 92fa913..13c3310 100644 --- a/driver/Makefile +++ b/driver/Makefile @@ -10,7 +10,7 @@ EXTRA_CFLAGS += -I$(M)/.. default: @KERNEL_GCC_VERSION=`cat /proc/version | head -n1 | cut -d " " -f 7` ;\ - GCC_VERSION=`$(CC) --version | head -n 1 | tr ' ' '\n' | tail -n 1` ;\ + GCC_VERSION=`$(CC) --version | head -n 1 | tr ' ' '\n' | grep -e "[0-9]\+\.[0-9]" | head -n 1` ;\ if [ $$KERNEL_GCC_VERSION != $$GCC_VERSION ]; then \ echo "Kernel is compiled with gcc $$KERNEL_GCC_VERSION, but you are now using $$GCC_VERSION" ;\ GCC_MAJOR=`echo $$KERNEL_GCC_VERSION | cut -d "." -f 1-2` ;\ @@ -20,7 +20,7 @@ default: echo "No compiler of $$GCC_MAJOR series is installed" ;\ exit 1 ;\ fi ;\ - GCC_VERSION=`$$CC --version | head -n 1 | tr ' ' '\n' | tail -n 1` ;\ + GCC_VERSION=`$$CC --version | head -n 1 | tr ' ' '\n' | grep -e "[0-9]\+\.[0-9]" | head -n 1` ;\ if [ $$KERNEL_GCC_VERSION != $$GCC_VERSION ]; then \ echo "The $$GCC_VERSION of $$GCC_MAJOR series is installed" ;\ exit 1 ;\ |