History

kbuild: remove cc-option-align

Documentation/kbuild/makefiles.txt says the change for align options occurred at GCC 3.0, and Documentation/process/changes.rst says the minimal supported GCC version is 3.2, so it should be safe to hard-code -falign* options. Fix the only user arch/x86/Makefile_32.cpu and remove cc-option-align.

Masahiro Yamada committed 9 years ago

Commit 39a33ff1 parent ae3f4153 files · +3 −25Browse files

Unified · Split

3 files
  1. Documentation/kbuild/makefiles.txt +0 −16
  2. arch/x86/Makefile_32.cpu +3 −4
  3. scripts/Kbuild.include +0 −5
Documentation/kbuild/makefiles.txt+0−16
@@ -486,22 +486,6 @@ more details, with real examples. · 485 unmodified lines
486486 respectively.
487487 Note: cc-option-yn uses KBUILD_CFLAGS for $(CC) options
488488
489− cc-option-align
490− gcc versions >= 3.0 changed the type of options used to specify
491− alignment of functions, loops etc. $(cc-option-align), when used
492− as prefix to the align options, will select the right prefix:
493− gcc < 3.00
494− cc-option-align = -malign
495− gcc >= 3.00
496− cc-option-align = -falign
497−
498− Example:
499− KBUILD_CFLAGS += $(cc-option-align)-functions=4
500−
501− In the above example, the option -falign-functions=4 is used for
502− gcc >= 3.00. For gcc < 3.00, -malign-functions=4 is used.
503− Note: cc-option-align uses KBUILD_CFLAGS for $(CC) options
504−
505489 cc-disable-warning
506490 cc-disable-warning checks if gcc supports a given warning and returns
507491 the commandline switch to disable it. This special function is needed,
arch/x86/Makefile_32.cpu+3−4
@@ -9,7 +9,6 @@ else · 8 unmodified lines
99 tune = $(call cc-option,-mcpu=$(1),$(2))
1010 endif
1111
12−align := $(cc-option-align)
1312 cflags-$(CONFIG_M486) += -march=i486
1413 cflags-$(CONFIG_M586) += -march=i586
1514 cflags-$(CONFIG_M586TSC) += -march=i586
@@ -24,11 +23,11 @@ cflags-$(CONFIG_MK6) += -march=k6 · 8 unmodified lines
2423 # They make zero difference whatsosever to performance at this time.
2524 cflags-$(CONFIG_MK7) += -march=athlon
2625 cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8,-march=athlon)
27−cflags-$(CONFIG_MCRUSOE) += -march=i686 $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
28−cflags-$(CONFIG_MEFFICEON) += -march=i686 $(call tune,pentium3) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
26+cflags-$(CONFIG_MCRUSOE) += -march=i686 -falign-functions=0 -falign-jumps=0 -falign-loops=0
27+cflags-$(CONFIG_MEFFICEON) += -march=i686 $(call tune,pentium3) -falign-functions=0 -falign-jumps=0 -falign-loops=0
2928 cflags-$(CONFIG_MWINCHIPC6) += $(call cc-option,-march=winchip-c6,-march=i586)
3029 cflags-$(CONFIG_MWINCHIP3D) += $(call cc-option,-march=winchip2,-march=i586)
31−cflags-$(CONFIG_MCYRIXIII) += $(call cc-option,-march=c3,-march=i486) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
30+cflags-$(CONFIG_MCYRIXIII) += $(call cc-option,-march=c3,-march=i486) -falign-functions=0 -falign-jumps=0 -falign-loops=0
3231 cflags-$(CONFIG_MVIAC3_2) += $(call cc-option,-march=c3-2,-march=i686)
3332 cflags-$(CONFIG_MVIAC7) += -march=i686
3433 cflags-$(CONFIG_MCORE2) += -march=i686 $(call tune,core2)
scripts/Kbuild.include+0−5
@@ -123,11 +123,6 @@ cc-option = $(call try-run,\ · 122 unmodified lines
123123 cc-option-yn = $(call try-run,\
124124 $(CC) -Werror $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",y,n)
125125
126−# cc-option-align
127−# Prefix align with either -falign or -malign
128−cc-option-align = $(subst -functions=0,,\
129− $(call cc-option,-falign-functions=0,-malign-functions=0))
130−
131126 # cc-disable-warning
132127 # Usage: cflags-y += $(call cc-disable-warning,unused-but-set-variable)
133128 cc-disable-warning = $(call try-run,\