summaryrefslogtreecommitdiffstats
path: root/driver/Makefile
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2014-04-09 15:45:50 +0200
committerSuren A. Chilingaryan <csa@suren.me>2014-04-09 15:45:50 +0200
commit7339d1a748bdbc7a41abd456238a5a66aac64c53 (patch)
tree0c4f768d318cd156184abfef49d6a46ec6a3266d /driver/Makefile
parent2a483fb01a9a60287d6c555a6cdf61213021c3cb (diff)
downloadpcitool-7339d1a748bdbc7a41abd456238a5a66aac64c53.tar.gz
pcitool-7339d1a748bdbc7a41abd456238a5a66aac64c53.tar.bz2
pcitool-7339d1a748bdbc7a41abd456238a5a66aac64c53.tar.xz
pcitool-7339d1a748bdbc7a41abd456238a5a66aac64c53.zip
Fix detection of gcc version on Ubuntu (by Uros)
Diffstat (limited to 'driver/Makefile')
-rw-r--r--driver/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/driver/Makefile b/driver/Makefile
index 13c3310..e353228 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' | grep -e "[0-9]\+\.[0-9]" | head -n 1` ;\
+ GCC_VERSION=`$(CC) --version | head -n 1 | tr ' ' '\n' | grep -e "[0-9]\+\.[0-9]" | tail -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` ;\