Makefile.defs: detect gcc 9.0+
authorDaniel-Constantin Mierla <miconda@gmail.com>
Tue, 28 May 2019 12:27:34 +0000 (14:27 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Tue, 28 May 2019 12:27:34 +0000 (14:27 +0200)
- reported by GH #1965

src/Makefile.defs

index 0577ac0..5ee01b4 100644 (file)
@@ -255,8 +255,10 @@ ifneq (,$(findstring gcc, $(CC_LONGVER)))
                                        -e 's/7\.[0-9]\..*/7.0+/' \
                                        -e 's/7\.[0-9]$$/7.0+/' \
                                        -e 's/8\.[0-9]\..*/8.0+/' \
-                                       -e 's/8\.[0-9]$$/8.0+/')
-ifeq (,$(strip $(filter-out 3.0 3.4 4.x 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+,$(CC_SHORTVER))))
+                                       -e 's/8\.[0-9]$$/8.0+/' \
+                                       -e 's/9\.[0-9]\..*/9.0+/' \
+                                       -e 's/9\.[0-9]$$/9.0+/')
+ifeq (,$(strip $(filter-out 3.0 3.4 4.x 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.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
@@ -876,8 +878,8 @@ ifeq                ($(CC_NAME), gcc)
                                C_DEFS+=-DCC_GCC_LIKE_ASM
                                #common stuff
                                CFLAGS=-g $(CC_OPT) -funroll-loops  -Wcast-align $(PROFILE)
-                       #if gcc 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+,$(CC_SHORTVER))))
+                       #if gcc 9.0+ 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
+ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+,$(CC_SHORTVER))))
 $(call                         set_if_empty,CPUTYPE,generic)
                                        CFLAGS+=-m32 -minline-all-stringops \
                                                        -falign-loops \
@@ -926,7 +928,7 @@ endif                       # CC_SHORTVER, 2.9x
 endif                  # CC_SHORTVER, 3.0
 endif                  # CC_SHORTVER, 3.4
 endif                  # CC_SHORTVER, 4.x
-endif                  # CC_SHORTVER, 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
+endif                  # CC_SHORTVER, 9.0+ 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
 
 else           # CC_NAME, gcc
 ifeq           ($(CC_NAME), clang)
@@ -959,7 +961,7 @@ ifeq                ($(CC_NAME), gcc)
                                #common stuff
                                CFLAGS=-g $(CC_OPT) -funroll-loops  -Wcast-align $(PROFILE)
                        #if gcc 4.5+
-ifeq                   ($(CC_SHORTVER),$(filter $(CC_SHORTVER),4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+))
+ifeq                   ($(CC_SHORTVER),$(filter $(CC_SHORTVER),4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+))
 $(call                         set_if_empty,CPUTYPE,generic)
                                        CFLAGS+=-m64 -minline-all-stringops \
                                                        -falign-loops \
@@ -1008,7 +1010,7 @@ endif                     # CC_SHORTVER, 2.9x
 endif                  # CC_SHORTVER, 3.0
 endif                  # CC_SHORTVER, 3.4
 endif                  # CC_SHORTVER, 4.x
-endif                  # CC_SHORTVER, 8.0+, 7.0+, 6.0+, 5.0+, 4.5+
+endif                  # CC_SHORTVER, 9.0+ 8.0+, 7.0+, 6.0+, 5.0+, 4.5+
 
 else           # CC_NAME, gcc
 ifeq            ($(CC_NAME), clang)
@@ -1043,8 +1045,8 @@ ifeq              ($(CC_NAME), gcc)
                                CFLAGS=-g $(CC_OPT) -funroll-loops  $(PROFILE) \
                                        #-Wcast-align \
                                        #-Wmissing-prototypes
-                               #if gcc 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+,$(CC_SHORTVER))))
+                               #if gcc 9.0+ 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
+ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+,$(CC_SHORTVER))))
 $(call                         set_if_empty,CPUTYPE,ultrasparc)
                                        #use 32bit for now
                                        CFLAGS+=-m64 -mcpu=ultrasparc  \
@@ -1110,7 +1112,7 @@ endif                     #CC_SHORTVER, 2.9x
 endif                  #CC_SHORTVER, 3.0
 endif                  #CC_SHORTVER, 3.4
 endif                  #CC_SHORTVER, 4.x
-endif                  #CC_SHORTVER, 8.0+ 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
+endif                  #CC_SHORTVER, 9.0+ 8.0+ 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
 
 else           #CC_NAME, gcc
 ifeq           ($(CC_NAME), suncc)
@@ -1138,7 +1140,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+ 6.0+ 7.0+ 8.0+,$(CC_SHORTVER))))
+ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+,$(CC_SHORTVER))))
 $(call                         set_if_empty,CPUTYPE,v8)
                                        #use 32bit for now
                                        CFLAGS+= -mtune=$(CPUTYPE) \
@@ -1179,7 +1181,7 @@ endif                     #CC_SHORTVER, 2.9x
 endif                  #CC_SHORTVER, 3.0
 endif                  #CC_SHORTVER, 3.4
 endif                  #CC_SHORTVER, 4.x
-endif                  #CC_SHORTVER, 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
+endif                  #CC_SHORTVER, 9.0+ 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
 
 else           #CC_NAME, gcc
 ifeq           ($(CC_NAME), suncc)
@@ -1203,7 +1205,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+ 6.0+ 7.0+ 8.0+,$(CC_SHORTVER))))
+ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+,$(CC_SHORTVER))))
                                        CFLAGS+= -ftree-vectorize -fno-strict-overflow
                                        # not supported on arm: -minline-all-stringops
 else
@@ -1235,7 +1237,7 @@ endif                     # CC_SHORTVER, 2.9x
 endif                  # CC_SHORTVER, 3.0
 endif                  # CC_SHORTVER, 3.4
 endif                  # CC_SHORTVER, 4.x
-endif                  # CC_SHORTVER, 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
+endif                  # CC_SHORTVER, 9.0+ 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
 
 else           # CC_NAME, gcc
                                #other compilers
@@ -1252,7 +1254,7 @@ ifeq              ($(CC_NAME), gcc)
                                CFLAGS=-march=armv6 $(CC_OPT) -funroll-loops -fsigned-char \
                                                $(PROFILE)
                        #if gcc 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+,$(CC_SHORTVER))))
+ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+,$(CC_SHORTVER))))
                                        CFLAGS+= -ftree-vectorize -fno-strict-overflow
 else
                        #if gcc 4.x+
@@ -1282,7 +1284,7 @@ endif                     # CC_SHORTVER, 2.9x
 endif                  # CC_SHORTVER, 3.0
 endif                  # CC_SHORTVER, 3.4
 endif                  # CC_SHORTVER, 4.x
-endif                  # CC_SHORTVER, 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
+endif                  # CC_SHORTVER, 9.0+ 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
 
 else           # CC_NAME, gcc
                                #other compilers
@@ -1297,8 +1299,8 @@ ifeq              ($(CC_NAME), gcc)
                                C_DEFS+=-DCC_GCC_LIKE_ASM
                                #common stuff
                                CFLAGS=$(CC_OPT) -funroll-loops  $(PROFILE)
-                       #if gcc 8.0+, 7.0+, 6.0, 5.0+, 4.5+ or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+,$(CC_SHORTVER))))
+                       #if gcc 9.0+ 8.0+, 7.0+, 6.0, 5.0+, 4.5+ or 4.2+
+ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+,$(CC_SHORTVER))))
                                        CFLAGS+=-mfp32 -march=r3000 \
                                                        -ftree-vectorize -fno-strict-overflow
                        # not supported on mips: -minline-all-stringops
@@ -1331,7 +1333,7 @@ endif                     # CC_SHORTVER, 2.9x
 endif                  # CC_SHORTVER, 3.0
 endif                  # CC_SHORTVER, 3.4
 endif                  # CC_SHORTVER, 4.x
-endif                  # CC_SHORTVER, 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
+endif                  # CC_SHORTVER, 9.0+ 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
 
 else           # CC_NAME, gcc
                                #other compilers
@@ -1346,8 +1348,8 @@ ifeq              ($(CC_NAME), gcc)
                                C_DEFS+=-DCC_GCC_LIKE_ASM
                                #common stuff
                                CFLAGS= $(CC_OPT) -funroll-loops $(PROFILE)
-                       #if gcc 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+,$(CC_SHORTVER))))
+                       #if gcc 9.0+ 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
+ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+,$(CC_SHORTVER))))
                                        CFLAGS+=-ftree-vectorize -fno-strict-overflow
                        # not supported on mips: -minline-all-stringops
 else
@@ -1377,7 +1379,7 @@ endif                     # CC_SHORTVER, 2.9x
 endif                  # CC_SHORTVER, 3.0
 endif                  # CC_SHORTVER, 3.4
 endif                  # CC_SHORTVER, 4.x
-endif                  # CC_SHORTVER, 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
+endif                  # CC_SHORTVER, 9.0+ 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
 
 else           # CC_NAME, gcc
                                #other compilers
@@ -1392,8 +1394,8 @@ ifeq              ($(CC_NAME), gcc)
                                C_DEFS+=-DCC_GCC_LIKE_ASM
                                #common stuff
                                CFLAGS= $(CC_OPT) -funroll-loops $(PROFILE)
-                       #if gcc 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+,$(CC_SHORTVER))))
+                       #if gcc 9.0+ 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
+ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+,$(CC_SHORTVER))))
                                        CFLAGS+=-ftree-vectorize -fno-strict-overflow
                        # not supported on mips: -minline-all-stringops
 
@@ -1424,7 +1426,7 @@ endif                     # CC_SHORTVER, 2.9x
 endif                  # CC_SHORTVER, 3.0
 endif                  # CC_SHORTVER, 3.4
 endif                  # CC_SHORTVER, 4.x
-endif                  # CC_SHORTVER, 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
+endif                  # CC_SHORTVER, 9.0+ 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
 
 else           # CC_NAME, gcc
                                #other compilers
@@ -1440,7 +1442,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+ 6.0+ 7.0+ 8.0+,$(CC_SHORTVER))))
+ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+,$(CC_SHORTVER))))
                                        CFLAGS+= -fno-strict-overflow
                                        # not supported: -minline-all-stringops
 else
@@ -1470,7 +1472,7 @@ endif                     # CC_SHORTVER, 2.9x
 endif                  # CC_SHORTVER, 3.0
 endif                  # CC_SHORTVER, 3.4
 endif                  # CC_SHORTVER, 4.x
-endif                  # CC_SHORTVER, 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
+endif                  # CC_SHORTVER, 9.0+ 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
 
 else           # CC_NAME, gcc
                                #other compilers
@@ -1485,8 +1487,8 @@ ifeq              ($(CC_NAME), gcc)
                                C_DEFS+=-DCC_GCC_LIKE_ASM
                                #common stuff
                                CFLAGS=
-                       #if gcc 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+,$(CC_SHORTVER))))
+                       #if gcc 9.0+ 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
+ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+,$(CC_SHORTVER))))
 $(call                         set_if_empty,CPUTYPE,powerpc)
 ifeq                           ($(NOALTIVEC),)
                                                CFLAGS += $(CC_OPT) -funroll-loops -fsigned-char $(PROFILE)
@@ -1527,7 +1529,7 @@ endif                     # CC_SHORTVER, 2.9x
 endif                  # CC_SHORTVER, 3.0
 endif                  # CC_SHORTVER, 3.4
 endif                  # CC_SHORTVER, 4.x
-endif                  # CC_SHORTVER, 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
+endif                  # CC_SHORTVER, 9.0+ 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
 
 else           # CC_NAME, gcc
                                #other compilers
@@ -1542,8 +1544,8 @@ ifeq              ($(CC_NAME), gcc)
                                C_DEFS+=-DCC_GCC_LIKE_ASM
                                #common stuff
                                CFLAGS= $(CC_OPT) -funroll-loops -fsigned-char $(PROFILE)
-                       #if gcc 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+,$(CC_SHORTVER))))
+                       #if gcc 9.0+ 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
+ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+,$(CC_SHORTVER))))
 $(call                         set_if_empty,CPUTYPE,powerpc64)
                                        CFLAGS+=-ftree-vectorize \
                                                        -fno-strict-overflow \
@@ -1576,7 +1578,7 @@ endif                     # CC_SHORTVER, 2.9x
 endif                  # CC_SHORTVER, 3.0
 endif                  # CC_SHORTVER, 3.4
 endif                  # CC_SHORTVER, 4.x
-endif                  # CC_SHORTVER, 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
+endif                  # CC_SHORTVER, 9.0+ 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
 
 else           # CC_NAME, gcc
                                #other compilers