1ifneq ($(C_COMPILER), PGI)
2
3ifneq ($(GCCVERSIONGT4), 1)
4CCOMMON_OPT += -march=armv8-a
5ifneq ($(F_COMPILER), NAG)
6FCOMMON_OPT += -march=armv8-a
7endif
8
9
10else
11
12
13ifeq ($(CORE), ARMV8)
14CCOMMON_OPT += -march=armv8-a
15ifneq ($(F_COMPILER), NAG)
16FCOMMON_OPT += -march=armv8-a
17endif
18endif
19
20ifeq ($(CORE), CORTEXA53)
21CCOMMON_OPT += -march=armv8-a -mtune=cortex-a53
22ifneq ($(F_COMPILER), NAG)
23FCOMMON_OPT += -march=armv8-a -mtune=cortex-a53
24endif
25endif
26
27ifeq ($(CORE), CORTEXA57)
28CCOMMON_OPT += -march=armv8-a -mtune=cortex-a57
29ifneq ($(F_COMPILER), NAG)
30FCOMMON_OPT += -march=armv8-a -mtune=cortex-a57
31endif
32endif
33
34ifeq ($(CORE), CORTEXA72)
35CCOMMON_OPT += -march=armv8-a -mtune=cortex-a72
36ifneq ($(F_COMPILER), NAG)
37FCOMMON_OPT += -march=armv8-a -mtune=cortex-a72
38endif
39endif
40
41ifeq ($(CORE), CORTEXA73)
42CCOMMON_OPT += -march=armv8-a -mtune=cortex-a73
43ifneq ($(F_COMPILER), NAG)
44FCOMMON_OPT += -march=armv8-a -mtune=cortex-a73
45endif
46endif
47
48# Use a72 tunings because Neoverse-N1 is only available
49# in GCC>=9
50ifeq ($(CORE), NEOVERSEN1)
51ifeq ($(GCCVERSIONGTEQ7), 1)
52ifeq ($(GCCVERSIONGTEQ9), 1)
53CCOMMON_OPT += -march=armv8.2-a -mtune=neoverse-n1
54ifneq ($(F_COMPILER), NAG)
55FCOMMON_OPT += -march=armv8.2-a -mtune=neoverse-n1
56endif
57else
58CCOMMON_OPT += -march=armv8.2-a -mtune=cortex-a72
59ifneq ($(F_COMPILER), NAG)
60FCOMMON_OPT += -march=armv8.2-a -mtune=cortex-a72
61endif
62endif
63else
64CCOMMON_OPT += -march=armv8-a -mtune=cortex-a72
65ifneq ($(F_COMPILER), NAG)
66FCOMMON_OPT += -march=armv8-a -mtune=cortex-a72
67endif
68endif
69endif
70
71# Use a53 tunings because a55 is only available in GCC>=8.1
72ifeq ($(CORE), CORTEXA55)
73ifeq ($(GCCVERSIONGTEQ7), 1)
74ifeq ($(GCCVERSIONGTEQ8), 1)
75CCOMMON_OPT += -march=armv8.2-a -mtune=cortex-a55
76ifneq ($(F_COMPILER), NAG)
77FCOMMON_OPT += -march=armv8.2-a -mtune=cortex-a55
78endif
79else
80CCOMMON_OPT += -march=armv8.2-a -mtune=cortex-a53
81ifneq ($(F_COMPILER), NAG)
82FCOMMON_OPT += -march=armv8.2-a -mtune=cortex-a53
83endif
84endif
85else
86CCOMMON_OPT += -march=armv8-a -mtune=cortex-a53
87ifneq ($(F_COMPILER), NAG)
88FCOMMON_OPT += -march=armv8-a -mtune=cortex-a53
89endif
90endif
91endif
92
93ifeq ($(CORE), THUNDERX)
94CCOMMON_OPT += -march=armv8-a -mtune=thunderx
95ifneq ($(F_COMPILER), NAG)
96FCOMMON_OPT += -march=armv8-a -mtune=thunderx
97endif
98endif
99
100ifeq ($(CORE), FALKOR)
101CCOMMON_OPT += -march=armv8-a -mtune=falkor
102ifneq ($(F_COMPILER), NAG)
103FCOMMON_OPT += -march=armv8-a -mtune=falkor
104endif
105endif
106
107ifeq ($(CORE), THUNDERX2T99)
108CCOMMON_OPT += -march=armv8.1-a -mtune=thunderx2t99
109ifneq ($(F_COMPILER), NAG)
110FCOMMON_OPT += -march=armv8.1-a -mtune=thunderx2t99
111endif
112endif
113
114ifeq ($(CORE), THUNDERX3T110)
115ifeq ($(GCCVERSIONGTEQ10), 1)
116CCOMMON_OPT += -march=armv8.3-a -mtune=thunderx3t110
117ifneq ($(F_COMPILER), NAG)
118FCOMMON_OPT += -march=armv8.3-a -mtune=thunderx3t110
119endif
120else
121CCOMMON_OPT += -march=armv8.1-a -mtune=thunderx2t99
122ifneq ($(F_COMPILER), NAG)
123FCOMMON_OPT += -march=armv8.1-a -mtune=thunderx2t99
124endif
125endif
126endif
127
128ifeq ($(CORE), VORTEX)
129CCOMMON_OPT += -march=armv8.3-a
130ifneq ($(F_COMPILER), NAG)
131FCOMMON_OPT += -march=armv8.3-a
132endif
133endif
134
135ifeq ($(GCCVERSIONGTEQ9), 1)
136ifeq ($(CORE), TSV110)
137CCOMMON_OPT += -march=armv8.2-a -mtune=tsv110
138ifneq ($(F_COMPILER), NAG)
139FCOMMON_OPT += -march=armv8.2-a -mtune=tsv110
140endif
141endif
142endif
143
144ifeq ($(GCCVERSIONGTEQ9), 1)
145ifeq ($(CORE), EMAG8180)
146CCOMMON_OPT += -march=armv8-a -mtune=emag
147ifneq ($(F_COMPILER), NAG)
148FCOMMON_OPT += -march=armv8-a -mtune=emag
149endif
150endif
151endif
152
153endif
154
155endif