Browse Source

Merge pull request #4548 from martin-frbg/issue4547

Fix compiler options for Cortex-X1,X2,A710 in gmake builds
tags/v0.3.27
Martin Kroeker GitHub 1 year ago
parent
commit
cc9713aa20
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
2 changed files with 24 additions and 3 deletions
  1. +22
    -2
      Makefile.arm64
  2. +2
    -1
      Makefile.system

+ 22
- 2
Makefile.arm64 View File

@@ -270,9 +270,17 @@ endif

ifeq (1, $(filter 1,$(GCCVERSIONGTEQ11) $(ISCLANG)))
ifeq ($(CORE), CORTEXX1)
CCOMMON_OPT += -march=armv8.2-a -mtune=cortexa72
CCOMMON_OPT += -march=armv8.2-a
ifeq (1, $(filter 1,$(GCCMINORVERSIONGTEQ4) $(GCCVERSIONGTEQ12) $(ISCLANG)))
CCOMMON_OPT += -mtune=cortex-x1
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8.2-a -mtune=cortex-x1
endif
else
CCOMMON_OPT += -mtune=cortex-a72
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8.2-a -mtune=cortexa72
FCOMMON_OPT += -march=armv8.2-a -mtune=cortex-a72
endif
endif
endif
endif
@@ -283,6 +291,12 @@ CCOMMON_OPT += -march=armv8.4-a+sve
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8.4-a+sve
endif
ifeq (1, $(filter 1,$(GCCVERSIONGTEQ12) $(ISCLANG)))
CCOMMON_OPT += -mtune=cortex-x2
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -mtune=cortex-x2
endif
endif
endif
endif

@@ -302,6 +316,12 @@ CCOMMON_OPT += -march=armv8.4-a+sve
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8.4-a+sve
endif
ifeq (1, $(filter 1,$(GCCVERSIONGTEQ12) $(ISCLANG)))
CCOMMON_OPT += -mtune=cortex-a710
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -mtune=cortex-a710
endif
endif
endif
endif



+ 2
- 1
Makefile.system View File

@@ -365,8 +365,9 @@ GCCVERSIONGT5 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \> 5)
GCCVERSIONGTEQ7 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 7)
GCCVERSIONGTEQ8 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 8)
GCCVERSIONGTEQ9 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 9)
GCCVERSIONGTEQ11 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 11)
GCCVERSIONGTEQ10 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 10)
GCCVERSIONGTEQ11 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 11)
GCCVERSIONGTEQ12 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 12)
# Note that the behavior of -dumpversion is compile-time-configurable for
# gcc-7.x and newer. Use -dumpfullversion there
ifeq ($(GCCVERSIONGTEQ7),1)


Loading…
Cancel
Save