diff --git a/src/Makefile.cfg b/src/Makefile.cfg
index 23e6027981a94bcb652c31d68a92cdfb481c4244..4a2c0687be1a4ce7a448ffe47043c0cc25f3e2c9 100644
--- a/src/Makefile.cfg
+++ b/src/Makefile.cfg
@@ -47,7 +47,7 @@ endif
 
 # Automatically set version flag, but not if one was manually set
 ifeq   (,$(filter GCC%,$(.VARIABLES)))
- ifneq (,$(findstring GCC,$(shell $(CC) --version))) # if it's GCC
+ ifneq (,$(findstring gcc,$(shell $(CC) --version))) # if it's GCC
   version:=$(shell $(CC) -dumpversion)
 
   # Turn version into words of major, minor