Makefile.defs: detect gcc 6.x
authorDaniel-Constantin Mierla <miconda@gmail.com>
Mon, 23 May 2016 22:00:34 +0000 (00:00 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Mon, 23 May 2016 22:00:34 +0000 (00:00 +0200)
- reported by Anthony Messina, GH #633

Makefile.defs

index 232b975..6db7c5f 100644 (file)
@@ -239,8 +239,10 @@ ifneq (,$(findstring gcc, $(CC_LONGVER)))
                                        -e 's/4\.[5-9]\..*/4.5+/' \
                                        -e 's/4\.[5-9]$$/4.5+/' \
                                        -e 's/5\.[0-9]\..*/5.0+/' \
-                                       -e 's/5\.[0-9]$$/5.0+/')
-ifeq (,$(strip $(filter-out 3.0 3.4 4.x 4.2+ 4.5+ 5.0+,$(CC_SHORTVER))))
+                                       -e 's/5\.[0-9]$$/5.0+/' \
+                                       -e 's/6\.[0-9]\..*/6.0+/' \
+                                       -e 's/6\.[0-9]$$/6.0+/')
+ifeq (,$(strip $(filter-out 3.0 3.4 4.x 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER))))
        # dependencies can be generated on-the-fly while compiling *.c
        CC_MKDEP_OPTS=-MMD -MP
 endif # 3.0 <= $(CC_SHORTVER) <= 4.x
@@ -842,8 +844,8 @@ ifeq                ($(CC_NAME), gcc)
                                C_DEFS+=-DCC_GCC_LIKE_ASM
                                #common stuff
                                CFLAGS=-g $(CC_OPT) -funroll-loops  -Wcast-align $(PROFILE)
-                       #if gcc 5.0+, 4.5+ or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER))))
+                       #if gcc 6.0+, 5.0+, 4.5+ or 4.2+
+ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER))))
 $(call                         set_if_empty,CPUTYPE,athlon64)
                                        CFLAGS+=-m32 -minline-all-stringops \
                                                        -falign-loops \
@@ -892,7 +894,7 @@ endif                       # CC_SHORTVER, 2.9x
 endif                  # CC_SHORTVER, 3.0
 endif                  # CC_SHORTVER, 3.4
 endif                  # CC_SHORTVER, 4.x
-endif                  # CC_SHORTVER, 5.0+, 4.5+ or 4.2+
+endif                  # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
 
 else           # CC_NAME, gcc
 ifeq           ($(CC_NAME), clang)
@@ -926,7 +928,7 @@ ifeq                ($(CC_NAME), gcc)
                                CFLAGS=-g $(CC_OPT) -funroll-loops  -Wcast-align $(PROFILE)
                        #if gcc 4.5+
                        # don't add '-mtune=$(CPUTYPE)' - gcc failure
-ifeq                   ($(CC_SHORTVER),$(filter $(CC_SHORTVER),4.5+ 5.0+))
+ifeq                   ($(CC_SHORTVER),$(filter $(CC_SHORTVER),4.5+ 5.0+ 6.0+))
 $(call                         set_if_empty,CPUTYPE,opteron)
                                        CFLAGS+=-m64 -minline-all-stringops \
                                                        -falign-loops \
@@ -985,7 +987,7 @@ endif                       # CC_SHORTVER, 3.0
 endif                  # CC_SHORTVER, 3.4
 endif                  # CC_SHORTVER, 4.x
 endif                  # CC_SHORTVER, 4.2+
-endif                  # CC_SHORTVER, 5.0+, 4.5+
+endif                  # CC_SHORTVER, 6.0+, 5.0+, 4.5+
 
 else           # CC_NAME, gcc
 ifeq            ($(CC_NAME), clang)
@@ -1020,8 +1022,8 @@ ifeq              ($(CC_NAME), gcc)
                                CFLAGS=-g $(CC_OPT) -funroll-loops  $(PROFILE) \
                                        #-Wcast-align \
                                        #-Wmissing-prototypes 
-                               #if gcc 5.0+, 4.5+ or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER))))
+                               #if gcc 6.0+, 5.0+, 4.5+ or 4.2+
+ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER))))
 $(call                         set_if_empty,CPUTYPE,ultrasparc)
                                        #use 32bit for now
                                        CFLAGS+=-m64 -mcpu=ultrasparc  \
@@ -1087,7 +1089,7 @@ endif                     #CC_SHORTVER, 2.9x
 endif                  #CC_SHORTVER, 3.0
 endif                  #CC_SHORTVER, 3.4
 endif                  #CC_SHORTVER, 4.x
-endif                  #CC_SHORTVER, 5.0+, 4.5+ or 4.2+
+endif                  #CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
        
 else           #CC_NAME, gcc
 ifeq           ($(CC_NAME), suncc)
@@ -1112,7 +1114,7 @@ ifeq              ($(CC_NAME), gcc)
                                        #-Wcast-align \
                                        #-Wmissing-prototypes 
                                #if gcc 5.0+, 4.5+ or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER))))
+ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER))))
 $(call                         set_if_empty,CPUTYPE,v8)
                                        #use 32bit for now
                                        CFLAGS+= -mtune=$(CPUTYPE) \
@@ -1153,7 +1155,7 @@ endif                     #CC_SHORTVER, 2.9x
 endif                  #CC_SHORTVER, 3.0
 endif                  #CC_SHORTVER, 3.4
 endif                  #CC_SHORTVER, 4.x
-endif                  #CC_SHORTVER, 5.0+, 4.5+ or 4.2+
+endif                  #CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
        
 else           #CC_NAME, gcc
 ifeq           ($(CC_NAME), suncc)
@@ -1175,7 +1177,7 @@ ifeq              ($(CC_NAME), gcc)
                                #common stuff
                                CFLAGS=-marm -march=armv5t $(CC_OPT) -funroll-loops -fsigned-char $(PROFILE)
                        #if gcc 4.5+ or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER))))
+ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER))))
                                        CFLAGS+= -ftree-vectorize -fno-strict-overflow
                                        # not supported on arm: -minline-all-stringops 
 else
@@ -1207,7 +1209,7 @@ endif                     # CC_SHORTVER, 2.9x
 endif                  # CC_SHORTVER, 3.0
 endif                  # CC_SHORTVER, 3.4
 endif                  # CC_SHORTVER, 4.x
-endif                  # CC_SHORTVER, 5.0+, 4.5+ or 4.2+
+endif                  # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
        
 else           # CC_NAME, gcc
                                #other compilers
@@ -1223,8 +1225,8 @@ ifeq              ($(CC_NAME), gcc)
                                #common stuff
                                CFLAGS=-march=armv6 $(CC_OPT) -funroll-loops -fsigned-char \
                                                $(PROFILE)
-                       #if gcc 5.0+, 4.5+ or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER))))
+                       #if gcc 6.0+, 5.0+, 4.5+ or 4.2+
+ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER))))
                                        CFLAGS+= -ftree-vectorize -fno-strict-overflow
 else
                        #if gcc 4.x+
@@ -1254,7 +1256,7 @@ endif                     # CC_SHORTVER, 2.9x
 endif                  # CC_SHORTVER, 3.0
 endif                  # CC_SHORTVER, 3.4
 endif                  # CC_SHORTVER, 4.x
-endif                  # CC_SHORTVER, 5.0+, 4.5+ or 4.2+
+endif                  # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
        
 else           # CC_NAME, gcc
                                #other compilers
@@ -1269,8 +1271,8 @@ ifeq              ($(CC_NAME), gcc)
                                C_DEFS+=-DCC_GCC_LIKE_ASM
                                #common stuff
                                CFLAGS=$(CC_OPT) -funroll-loops  $(PROFILE)
-                       #if gcc 5.0+, 4.5+ or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER))))
+                       #if gcc 6.0, 5.0+, 4.5+ or 4.2+
+ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER))))
                                        CFLAGS+=-mfp32 -march=r3000 \
                                                        -ftree-vectorize -fno-strict-overflow
                        # not supported on mips: -minline-all-stringops
@@ -1303,7 +1305,7 @@ endif                     # CC_SHORTVER, 2.9x
 endif                  # CC_SHORTVER, 3.0
 endif                  # CC_SHORTVER, 3.4
 endif                  # CC_SHORTVER, 4.x
-endif                  # CC_SHORTVER, 5.0+, 4.5+ or 4.2+
+endif                  # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
        
 else           # CC_NAME, gcc
                                #other compilers
@@ -1318,8 +1320,8 @@ ifeq              ($(CC_NAME), gcc)
                                C_DEFS+=-DCC_GCC_LIKE_ASM
                                #common stuff
                                CFLAGS= -mips2 $(CC_OPT) -funroll-loops $(PROFILE)
-                       #if gcc 5.0+, 4.5+ or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER))))
+                       #if gcc 6.0+, 5.0+, 4.5+ or 4.2+
+ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER))))
                                        CFLAGS+=-ftree-vectorize -fno-strict-overflow
                        # not supported on mips: -minline-all-stringops
 else
@@ -1349,7 +1351,7 @@ endif                     # CC_SHORTVER, 2.9x
 endif                  # CC_SHORTVER, 3.0
 endif                  # CC_SHORTVER, 3.4
 endif                  # CC_SHORTVER, 4.x
-endif                  # CC_SHORTVER, 5.0+, 4.5+ or 4.2+
+endif                  # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
        
 else           # CC_NAME, gcc
                                #other compilers
@@ -1364,8 +1366,8 @@ ifeq              ($(CC_NAME), gcc)
                                C_DEFS+=-DCC_GCC_LIKE_ASM
                                #common stuff
                                CFLAGS= -mips64 $(CC_OPT) -funroll-loops $(PROFILE)
-                       #if gcc 5.0+, 4.5+ or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER))))
+                       #if gcc 6.0+, 5.0+, 4.5+ or 4.2+
+ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER))))
                                        CFLAGS+=-ftree-vectorize -fno-strict-overflow
                        # not supported on mips: -minline-all-stringops
 
@@ -1396,7 +1398,7 @@ endif                     # CC_SHORTVER, 2.9x
 endif                  # CC_SHORTVER, 3.0
 endif                  # CC_SHORTVER, 3.4
 endif                  # CC_SHORTVER, 4.x
-endif                  # CC_SHORTVER, 5.0+, 4.5+ or 4.2+
+endif                  # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
        
 else           # CC_NAME, gcc
                                #other compilers
@@ -1412,7 +1414,7 @@ ifeq              ($(CC_NAME), gcc)
                                #common stuff
                                CFLAGS= $(CC_OPT) -funroll-loops $(PROFILE)
                        #if gcc 5.0+, 4.5 or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER))))
+ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER))))
                                        CFLAGS+= -fno-strict-overflow
                                        # not supported: -minline-all-stringops
 else
@@ -1442,7 +1444,7 @@ endif                     # CC_SHORTVER, 2.9x
 endif                  # CC_SHORTVER, 3.0
 endif                  # CC_SHORTVER, 3.4
 endif                  # CC_SHORTVER, 4.x
-endif                  # CC_SHORTVER, 5.0+, 4.5+ or 4.2+
+endif                  # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
        
 else           # CC_NAME, gcc
                                #other compilers
@@ -1457,8 +1459,8 @@ ifeq              ($(CC_NAME), gcc)
                                C_DEFS+=-DCC_GCC_LIKE_ASM
                                #common stuff
                                CFLAGS=
-                       #if gcc 5.0+, 4.5+ or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER))))
+                       #if gcc 6.0+, 5.0+, 4.5+ or 4.2+
+ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER))))
 $(call                         set_if_empty,CPUTYPE,powerpc)
 ifeq                           ($(NOALTIVEC),)
                                                CFLAGS += $(CC_OPT) -funroll-loops -fsigned-char $(PROFILE)
@@ -1499,7 +1501,7 @@ endif                     # CC_SHORTVER, 2.9x
 endif                  # CC_SHORTVER, 3.0
 endif                  # CC_SHORTVER, 3.4
 endif                  # CC_SHORTVER, 4.x
-endif                  # CC_SHORTVER, 5.0+, 4.5+ or 4.2+
+endif                  # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
        
 else           # CC_NAME, gcc
                                #other compilers
@@ -1514,8 +1516,8 @@ ifeq              ($(CC_NAME), gcc)
                                C_DEFS+=-DCC_GCC_LIKE_ASM
                                #common stuff
                                CFLAGS= $(CC_OPT) -funroll-loops -fsigned-char $(PROFILE)
-                       #if gcc 5.0+, 4.5+ or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER))))
+                       #if gcc 6.0+, 5.0+, 4.5+ or 4.2+
+ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER))))
 $(call                         set_if_empty,CPUTYPE,powerpc64)
                                        CFLAGS+=-ftree-vectorize \
                                                        -fno-strict-overflow \
@@ -1548,7 +1550,7 @@ endif                     # CC_SHORTVER, 2.9x
 endif                  # CC_SHORTVER, 3.0
 endif                  # CC_SHORTVER, 3.4
 endif                  # CC_SHORTVER, 4.x
-endif                  # CC_SHORTVER, 5.0+, 4.5+ or 4.2+
+endif                  # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
        
 else           # CC_NAME, gcc
                                #other compilers