1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
|
From 5c644592c98154fa48fca64b8e4cf27af855ef89 Mon Sep 17 00:00:00 2001
From: Alexandre Frade <kernel@xanmod.org>
Date: Sat, 25 Feb 2023 19:58:52 +0000
Subject: [PATCH 2/2] XANMOD: Makefile: Move ARM and x86 instruction set selection
to kernel-wide build
Signed-off-by: Alexandre Frade <kernel@xanmod.org>
---
Makefile | 152 +++++++++++++++++++++++++++++++++++++++
arch/arm/Makefile | 56 +--------------
arch/x86/Makefile | 55 --------------
arch/x86/Makefile_32.cpu | 41 -----------
4 files changed, 155 insertions(+), 149 deletions(-)
diff --git a/Makefile b/Makefile
index 35a5ae1ede42..ec354040212d 100644
--- a/Makefile
+++ b/Makefile
@@ -831,6 +831,158 @@ KBUILD_CFLAGS += $(call cc-disable-warning, format-truncation)
KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow)
KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
+# This selects which ARM instruction set is used.
+arch-$(CONFIG_CPU_32v7M) :=-march=armv7-m
+arch-$(CONFIG_CPU_32v7) :=-march=armv7-a
+arch-$(CONFIG_CPU_32v6) :=-march=armv6
+# Only override the compiler option if ARMv6. The ARMv6K extensions are
+# always available in ARMv7
+ifeq ($(CONFIG_CPU_32v6),y)
+arch-$(CONFIG_CPU_32v6K) :=-march=armv6k
+endif
+arch-$(CONFIG_CPU_32v5) :=-march=armv5te
+arch-$(CONFIG_CPU_32v4T) :=-march=armv4t
+arch-$(CONFIG_CPU_32v4) :=-march=armv4
+arch-$(CONFIG_CPU_32v3) :=-march=armv3m
+
+# Note that GCC does not numerically define an architecture version
+# macro, but instead defines a whole series of macros which makes
+# testing for a specific architecture or later rather impossible.
+cpp-$(CONFIG_CPU_32v7M) :=-D__LINUX_ARM_ARCH__=7
+cpp-$(CONFIG_CPU_32v7) :=-D__LINUX_ARM_ARCH__=7
+cpp-$(CONFIG_CPU_32v6) :=-D__LINUX_ARM_ARCH__=6
+# Only override the compiler option if ARMv6. The ARMv6K extensions are
+# always available in ARMv7
+ifeq ($(CONFIG_CPU_32v6),y)
+cpp-$(CONFIG_CPU_32v6K) :=-D__LINUX_ARM_ARCH__=6
+endif
+cpp-$(CONFIG_CPU_32v5) :=-D__LINUX_ARM_ARCH__=5
+cpp-$(CONFIG_CPU_32v4T) :=-D__LINUX_ARM_ARCH__=4
+cpp-$(CONFIG_CPU_32v4) :=-D__LINUX_ARM_ARCH__=4
+cpp-$(CONFIG_CPU_32v3) :=-D__LINUX_ARM_ARCH__=3
+
+# This selects how we optimise for the processor.
+tune-$(CONFIG_CPU_ARM7TDMI) :=-mtune=arm7tdmi
+tune-$(CONFIG_CPU_ARM720T) :=-mtune=arm7tdmi
+tune-$(CONFIG_CPU_ARM740T) :=-mtune=arm7tdmi
+tune-$(CONFIG_CPU_ARM9TDMI) :=-mtune=arm9tdmi
+tune-$(CONFIG_CPU_ARM940T) :=-mtune=arm9tdmi
+tune-$(CONFIG_CPU_ARM946E) :=-mtune=arm9e
+tune-$(CONFIG_CPU_ARM920T) :=-mtune=arm9tdmi
+tune-$(CONFIG_CPU_ARM922T) :=-mtune=arm9tdmi
+tune-$(CONFIG_CPU_ARM925T) :=-mtune=arm9tdmi
+tune-$(CONFIG_CPU_ARM926T) :=-mtune=arm9tdmi
+tune-$(CONFIG_CPU_FA526) :=-mtune=arm9tdmi
+tune-$(CONFIG_CPU_SA110) :=-mtune=strongarm110
+tune-$(CONFIG_CPU_SA1100) :=-mtune=strongarm1100
+tune-$(CONFIG_CPU_XSCALE) :=-mtune=xscale
+tune-$(CONFIG_CPU_XSC3) :=-mtune=xscale
+tune-$(CONFIG_CPU_FEROCEON) :=-mtune=xscale
+tune-$(CONFIG_CPU_V6) :=-mtune=arm1136j-s
+tune-$(CONFIG_CPU_V6K) :=-mtune=arm1136j-s
+
+KBUILD_CPPFLAGS +=$(cpp-y)
+KBUILD_CFLAGS +=$(arch-y) $(tune-y)
+KBUILD_AFLAGS +=$(arch-y) $(tune-y)
+
+# This selects which x86 instruction set is used.
+cflags-$(CONFIG_M486SX) += -march=i486
+cflags-$(CONFIG_M486) += -march=i486
+cflags-$(CONFIG_M586) += -march=i586
+cflags-$(CONFIG_M586TSC) += -march=i586
+cflags-$(CONFIG_M586MMX) += -march=pentium-mmx
+cflags-$(CONFIG_M686) += -march=i686
+cflags-$(CONFIG_MPENTIUMII) += -march=i686 $(call tune,pentium2)
+cflags-$(CONFIG_MPENTIUMIII) += -march=i686 $(call tune,pentium3)
+cflags-$(CONFIG_MPENTIUMM) += -march=i686 $(call tune,pentium3)
+cflags-$(CONFIG_MPENTIUM4) += -march=i686 $(call tune,pentium4)
+cflags-$(CONFIG_MK6) += -march=k6
+# Please note, that patches that add -march=athlon-xp and friends are pointless.
+# They make zero difference whatsosever to performance at this time.
+cflags-$(CONFIG_MK7) += -march=athlon
+cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8,-march=athlon)
+cflags-$(CONFIG_MCRUSOE) += -march=i686 $(align)
+cflags-$(CONFIG_MEFFICEON) += -march=i686 $(call tune,pentium3) $(align)
+cflags-$(CONFIG_MWINCHIPC6) += $(call cc-option,-march=winchip-c6,-march=i586)
+cflags-$(CONFIG_MWINCHIP3D) += $(call cc-option,-march=winchip2,-march=i586)
+cflags-$(CONFIG_MCYRIXIII) += $(call cc-option,-march=c3,-march=i486) $(align)
+cflags-$(CONFIG_MVIAC3_2) += $(call cc-option,-march=c3-2,-march=i686)
+cflags-$(CONFIG_MVIAC7) += -march=i686
+cflags-$(CONFIG_MCORE2) += -march=i686 $(call tune,core2)
+cflags-$(CONFIG_MATOM) += $(call cc-option,-march=atom,$(call cc-option,-march=core2,-march=i686)) \
+$(call cc-option,-mtune=atom,$(call cc-option,-mtune=generic))
+
+# AMD Elan support
+cflags-$(CONFIG_MELAN) += -march=i486
+
+# Geode GX1 support
+cflags-$(CONFIG_MGEODEGX1) += -march=pentium-mmx
+cflags-$(CONFIG_MGEODE_LX) += $(call cc-option,-march=geode,-march=pentium-mmx)
+# add at the end to overwrite eventual tuning options from earlier
+# cpu entries
+cflags-$(CONFIG_X86_GENERIC) += $(call tune,generic,$(call tune,i686))
+
+# Bug fix for binutils: this option is required in order to keep
+# binutils from generating NOPL instructions against our will.
+ifneq ($(CONFIG_X86_P6_NOP),y)
+cflags-y += $(call cc-option,-Wa$(comma)-mtune=generic32,)
+endif
+
+# x86_64 instruction set
+cflags64-$(CONFIG_MK8) += -march=k8
+cflags64-$(CONFIG_MPSC) += -march=nocona
+cflags64-$(CONFIG_MK8SSE3) += -march=k8-sse3
+cflags64-$(CONFIG_MK10) += -march=amdfam10
+cflags64-$(CONFIG_MBARCELONA) += -march=barcelona
+cflags64-$(CONFIG_MBOBCAT) += -march=btver1
+cflags64-$(CONFIG_MJAGUAR) += -march=btver2
+cflags64-$(CONFIG_MBULLDOZER) += -march=bdver1
+cflags64-$(CONFIG_MPILEDRIVER) += -march=bdver2 -mno-tbm
+cflags64-$(CONFIG_MSTEAMROLLER) += -march=bdver3 -mno-tbm
+cflags64-$(CONFIG_MEXCAVATOR) += -march=bdver4 -mno-tbm
+cflags64-$(CONFIG_MZEN) += -march=znver1
+cflags64-$(CONFIG_MZEN2) += -march=znver2
+cflags64-$(CONFIG_MZEN3) += -march=znver3
+cflags64-$(CONFIG_MZEN4) += -march=znver4
+cflags64-$(CONFIG_MNATIVE_INTEL) += -march=native
+cflags64-$(CONFIG_MNATIVE_AMD) += -march=native
+cflags64-$(CONFIG_MATOM) += -march=bonnell
+cflags64-$(CONFIG_MCORE2) += -march=core2
+cflags64-$(CONFIG_MNEHALEM) += -march=nehalem
+cflags64-$(CONFIG_MWESTMERE) += -march=westmere
+cflags64-$(CONFIG_MSILVERMONT) += -march=silvermont
+cflags64-$(CONFIG_MGOLDMONT) += -march=goldmont
+cflags64-$(CONFIG_MGOLDMONTPLUS) += -march=goldmont-plus
+cflags64-$(CONFIG_MSANDYBRIDGE) += -march=sandybridge
+cflags64-$(CONFIG_MIVYBRIDGE) += -march=ivybridge
+cflags64-$(CONFIG_MHASWELL) += -march=haswell
+cflags64-$(CONFIG_MBROADWELL) += -march=broadwell
+cflags64-$(CONFIG_MSKYLAKE) += -march=skylake
+cflags64-$(CONFIG_MSKYLAKEX) += -march=skylake-avx512
+cflags64-$(CONFIG_MCANNONLAKE) += -march=cannonlake
+cflags64-$(CONFIG_MICELAKE) += -march=icelake-client
+cflags64-$(CONFIG_MCASCADELAKE) += -march=cascadelake
+cflags64-$(CONFIG_MCOOPERLAKE) += -march=cooperlake
+cflags64-$(CONFIG_MTIGERLAKE) += -march=tigerlake
+cflags64-$(CONFIG_MSAPPHIRERAPIDS) += -march=sapphirerapids
+cflags64-$(CONFIG_MROCKETLAKE) += -march=rocketlake
+cflags64-$(CONFIG_MALDERLAKE) += -march=alderlake
+cflags64-$(CONFIG_MRAPTORLAKE) += -march=raptorlake
+cflags64-$(CONFIG_MMETEORLAKE) += -march=meteorlake
+cflags64-$(CONFIG_MEMERALDRAPIDS) += -march=emeraldrapids
+cflags64-$(CONFIG_GENERIC_CPU2) += -march=x86-64-v2
+cflags64-$(CONFIG_GENERIC_CPU3) += -march=x86-64-v3
+cflags64-$(CONFIG_GENERIC_CPU4) += -march=x86-64-v4
+cflags64-$(CONFIG_GENERIC_CPU) += -mtune=generic
+KBUILD_CFLAGS += $(cflags64-y)
+
+rustflags64-$(CONFIG_MK8) += -Ctarget-cpu=k8
+rustflags64-$(CONFIG_MPSC) += -Ctarget-cpu=nocona
+rustflags64-$(CONFIG_MCORE2) += -Ctarget-cpu=core2
+rustflags64-$(CONFIG_MATOM) += -Ctarget-cpu=atom
+rustflags64-$(CONFIG_GENERIC_CPU) += -Ztune-cpu=generic
+KBUILD_RUSTFLAGS += $(rustflags64-y)
+
ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
KBUILD_CFLAGS += -O2
KBUILD_RUSTFLAGS += -Copt-level=2
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 955b0362cdfb..3218004f95b7 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -59,56 +59,6 @@ endif
#
KBUILD_CFLAGS += $(call cc-option,-fno-ipa-sra)
-# This selects which instruction set is used.
-arch-$(CONFIG_CPU_32v7M) :=-march=armv7-m
-arch-$(CONFIG_CPU_32v7) :=-march=armv7-a
-arch-$(CONFIG_CPU_32v6) :=-march=armv6
-# Only override the compiler option if ARMv6. The ARMv6K extensions are
-# always available in ARMv7
-ifeq ($(CONFIG_CPU_32v6),y)
-arch-$(CONFIG_CPU_32v6K) :=-march=armv6k
-endif
-arch-$(CONFIG_CPU_32v5) :=-march=armv5te
-arch-$(CONFIG_CPU_32v4T) :=-march=armv4t
-arch-$(CONFIG_CPU_32v4) :=-march=armv4
-arch-$(CONFIG_CPU_32v3) :=-march=armv3m
-
-# Note that GCC does not numerically define an architecture version
-# macro, but instead defines a whole series of macros which makes
-# testing for a specific architecture or later rather impossible.
-cpp-$(CONFIG_CPU_32v7M) :=-D__LINUX_ARM_ARCH__=7
-cpp-$(CONFIG_CPU_32v7) :=-D__LINUX_ARM_ARCH__=7
-cpp-$(CONFIG_CPU_32v6) :=-D__LINUX_ARM_ARCH__=6
-# Only override the compiler option if ARMv6. The ARMv6K extensions are
-# always available in ARMv7
-ifeq ($(CONFIG_CPU_32v6),y)
-cpp-$(CONFIG_CPU_32v6K) :=-D__LINUX_ARM_ARCH__=6
-endif
-cpp-$(CONFIG_CPU_32v5) :=-D__LINUX_ARM_ARCH__=5
-cpp-$(CONFIG_CPU_32v4T) :=-D__LINUX_ARM_ARCH__=4
-cpp-$(CONFIG_CPU_32v4) :=-D__LINUX_ARM_ARCH__=4
-cpp-$(CONFIG_CPU_32v3) :=-D__LINUX_ARM_ARCH__=3
-
-# This selects how we optimise for the processor.
-tune-$(CONFIG_CPU_ARM7TDMI) :=-mtune=arm7tdmi
-tune-$(CONFIG_CPU_ARM720T) :=-mtune=arm7tdmi
-tune-$(CONFIG_CPU_ARM740T) :=-mtune=arm7tdmi
-tune-$(CONFIG_CPU_ARM9TDMI) :=-mtune=arm9tdmi
-tune-$(CONFIG_CPU_ARM940T) :=-mtune=arm9tdmi
-tune-$(CONFIG_CPU_ARM946E) :=-mtune=arm9e
-tune-$(CONFIG_CPU_ARM920T) :=-mtune=arm9tdmi
-tune-$(CONFIG_CPU_ARM922T) :=-mtune=arm9tdmi
-tune-$(CONFIG_CPU_ARM925T) :=-mtune=arm9tdmi
-tune-$(CONFIG_CPU_ARM926T) :=-mtune=arm9tdmi
-tune-$(CONFIG_CPU_FA526) :=-mtune=arm9tdmi
-tune-$(CONFIG_CPU_SA110) :=-mtune=strongarm110
-tune-$(CONFIG_CPU_SA1100) :=-mtune=strongarm1100
-tune-$(CONFIG_CPU_XSCALE) :=-mtune=xscale
-tune-$(CONFIG_CPU_XSC3) :=-mtune=xscale
-tune-$(CONFIG_CPU_FEROCEON) :=-mtune=xscale
-tune-$(CONFIG_CPU_V6) :=-mtune=arm1136j-s
-tune-$(CONFIG_CPU_V6K) :=-mtune=arm1136j-s
-
ifeq ($(CONFIG_AEABI),y)
CFLAGS_ABI :=-mabi=aapcs-linux -mfpu=vfp
else
@@ -140,9 +90,9 @@ AFLAGS_ISA :=$(CFLAGS_ISA)
endif
# Need -Uarm for gcc < 3.x
-KBUILD_CPPFLAGS +=$(cpp-y)
-KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm
-KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) -Wa,$(arch-y) $(tune-y) -include asm/unified.h -msoft-float
+
+KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm
+KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) -Wa,-include asm/unified.h -msoft-float
CHECKFLAGS += -D__arm__
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index eb4a04be4403..4f130a8b2476 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -149,61 +149,6 @@ else
# Use -mskip-rax-setup if supported.
KBUILD_CFLAGS += $(call cc-option,-mskip-rax-setup)
- # FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu)
- cflags-$(CONFIG_MK8) += -march=k8
- cflags-$(CONFIG_MPSC) += -march=nocona
- cflags-$(CONFIG_MK8SSE3) += -march=k8-sse3
- cflags-$(CONFIG_MK10) += -march=amdfam10
- cflags-$(CONFIG_MBARCELONA) += -march=barcelona
- cflags-$(CONFIG_MBOBCAT) += -march=btver1
- cflags-$(CONFIG_MJAGUAR) += -march=btver2
- cflags-$(CONFIG_MBULLDOZER) += -march=bdver1
- cflags-$(CONFIG_MPILEDRIVER) += -march=bdver2 -mno-tbm
- cflags-$(CONFIG_MSTEAMROLLER) += -march=bdver3 -mno-tbm
- cflags-$(CONFIG_MEXCAVATOR) += -march=bdver4 -mno-tbm
- cflags-$(CONFIG_MZEN) += -march=znver1
- cflags-$(CONFIG_MZEN2) += -march=znver2
- cflags-$(CONFIG_MZEN3) += -march=znver3
- cflags-$(CONFIG_MZEN4) += -march=znver4
- cflags-$(CONFIG_MNATIVE_INTEL) += -march=native
- cflags-$(CONFIG_MNATIVE_AMD) += -march=native
- cflags-$(CONFIG_MATOM) += -march=bonnell
- cflags-$(CONFIG_MCORE2) += -march=core2
- cflags-$(CONFIG_MNEHALEM) += -march=nehalem
- cflags-$(CONFIG_MWESTMERE) += -march=westmere
- cflags-$(CONFIG_MSILVERMONT) += -march=silvermont
- cflags-$(CONFIG_MGOLDMONT) += -march=goldmont
- cflags-$(CONFIG_MGOLDMONTPLUS) += -march=goldmont-plus
- cflags-$(CONFIG_MSANDYBRIDGE) += -march=sandybridge
- cflags-$(CONFIG_MIVYBRIDGE) += -march=ivybridge
- cflags-$(CONFIG_MHASWELL) += -march=haswell
- cflags-$(CONFIG_MBROADWELL) += -march=broadwell
- cflags-$(CONFIG_MSKYLAKE) += -march=skylake
- cflags-$(CONFIG_MSKYLAKEX) += -march=skylake-avx512
- cflags-$(CONFIG_MCANNONLAKE) += -march=cannonlake
- cflags-$(CONFIG_MICELAKE) += -march=icelake-client
- cflags-$(CONFIG_MCASCADELAKE) += -march=cascadelake
- cflags-$(CONFIG_MCOOPERLAKE) += -march=cooperlake
- cflags-$(CONFIG_MTIGERLAKE) += -march=tigerlake
- cflags-$(CONFIG_MSAPPHIRERAPIDS) += -march=sapphirerapids
- cflags-$(CONFIG_MROCKETLAKE) += -march=rocketlake
- cflags-$(CONFIG_MALDERLAKE) += -march=alderlake
- cflags-$(CONFIG_MRAPTORLAKE) += -march=raptorlake
- cflags-$(CONFIG_MMETEORLAKE) += -march=meteorlake
- cflags-$(CONFIG_MEMERALDRAPIDS) += -march=emeraldrapids
- cflags-$(CONFIG_GENERIC_CPU2) += -march=x86-64-v2
- cflags-$(CONFIG_GENERIC_CPU3) += -march=x86-64-v3
- cflags-$(CONFIG_GENERIC_CPU4) += -march=x86-64-v4
- cflags-$(CONFIG_GENERIC_CPU) += -mtune=generic
- KBUILD_CFLAGS += $(cflags-y)
-
- rustflags-$(CONFIG_MK8) += -Ctarget-cpu=k8
- rustflags-$(CONFIG_MPSC) += -Ctarget-cpu=nocona
- rustflags-$(CONFIG_MCORE2) += -Ctarget-cpu=core2
- rustflags-$(CONFIG_MATOM) += -Ctarget-cpu=atom
- rustflags-$(CONFIG_GENERIC_CPU) += -Ztune-cpu=generic
- KBUILD_RUSTFLAGS += $(rustflags-y)
-
KBUILD_CFLAGS += -mno-red-zone
KBUILD_CFLAGS += -mcmodel=kernel
KBUILD_RUSTFLAGS += -Cno-redzone=y
diff --git a/arch/x86/Makefile_32.cpu b/arch/x86/Makefile_32.cpu
index 94834c4b5e5e..81923b4afdf8 100644
--- a/arch/x86/Makefile_32.cpu
+++ b/arch/x86/Makefile_32.cpu
@@ -10,44 +10,3 @@ else
align := -falign-functions=0 -falign-jumps=0 -falign-loops=0
endif
-cflags-$(CONFIG_M486SX) += -march=i486
-cflags-$(CONFIG_M486) += -march=i486
-cflags-$(CONFIG_M586) += -march=i586
-cflags-$(CONFIG_M586TSC) += -march=i586
-cflags-$(CONFIG_M586MMX) += -march=pentium-mmx
-cflags-$(CONFIG_M686) += -march=i686
-cflags-$(CONFIG_MPENTIUMII) += -march=i686 $(call tune,pentium2)
-cflags-$(CONFIG_MPENTIUMIII) += -march=i686 $(call tune,pentium3)
-cflags-$(CONFIG_MPENTIUMM) += -march=i686 $(call tune,pentium3)
-cflags-$(CONFIG_MPENTIUM4) += -march=i686 $(call tune,pentium4)
-cflags-$(CONFIG_MK6) += -march=k6
-# Please note, that patches that add -march=athlon-xp and friends are pointless.
-# They make zero difference whatsosever to performance at this time.
-cflags-$(CONFIG_MK7) += -march=athlon
-cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8,-march=athlon)
-cflags-$(CONFIG_MCRUSOE) += -march=i686 $(align)
-cflags-$(CONFIG_MEFFICEON) += -march=i686 $(call tune,pentium3) $(align)
-cflags-$(CONFIG_MWINCHIPC6) += $(call cc-option,-march=winchip-c6,-march=i586)
-cflags-$(CONFIG_MWINCHIP3D) += $(call cc-option,-march=winchip2,-march=i586)
-cflags-$(CONFIG_MCYRIXIII) += $(call cc-option,-march=c3,-march=i486) $(align)
-cflags-$(CONFIG_MVIAC3_2) += $(call cc-option,-march=c3-2,-march=i686)
-cflags-$(CONFIG_MVIAC7) += -march=i686
-cflags-$(CONFIG_MCORE2) += -march=i686 $(call tune,core2)
-cflags-$(CONFIG_MATOM) += $(call cc-option,-march=atom,$(call cc-option,-march=core2,-march=i686)) \
- $(call cc-option,-mtune=atom,$(call cc-option,-mtune=generic))
-
-# AMD Elan support
-cflags-$(CONFIG_MELAN) += -march=i486
-
-# Geode GX1 support
-cflags-$(CONFIG_MGEODEGX1) += -march=pentium-mmx
-cflags-$(CONFIG_MGEODE_LX) += $(call cc-option,-march=geode,-march=pentium-mmx)
-# add at the end to overwrite eventual tuning options from earlier
-# cpu entries
-cflags-$(CONFIG_X86_GENERIC) += $(call tune,generic,$(call tune,i686))
-
-# Bug fix for binutils: this option is required in order to keep
-# binutils from generating NOPL instructions against our will.
-ifneq ($(CONFIG_X86_P6_NOP),y)
-cflags-y += $(call cc-option,-Wa$(comma)-mtune=generic32,)
-endif
--
2.39.1
|