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
486 respectively.486 respectively.
487 Note: cc-option-yn uses KBUILD_CFLAGS for $(CC) options487 Note: cc-option-yn uses KBUILD_CFLAGS for $(CC) options
488 488
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
505 cc-disable-warning489 cc-disable-warning
506 cc-disable-warning checks if gcc supports a given warning and returns490 cc-disable-warning checks if gcc supports a given warning and returns
507 the commandline switch to disable it. This special function is needed,491 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
9tune = $(call cc-option,-mcpu=$(1),$(2))9tune = $(call cc-option,-mcpu=$(1),$(2))
10endif10endif
11 11
12align := $(cc-option-align)
13cflags-$(CONFIG_M486) += -march=i48612cflags-$(CONFIG_M486) += -march=i486
14cflags-$(CONFIG_M586) += -march=i58613cflags-$(CONFIG_M586) += -march=i586
15cflags-$(CONFIG_M586TSC) += -march=i58614cflags-$(CONFIG_M586TSC) += -march=i586
@@ -24,11 +23,11 @@ cflags-$(CONFIG_MK6) += -march=k6 · 8 unmodified lines
24# They make zero difference whatsosever to performance at this time.23# They make zero difference whatsosever to performance at this time.
25cflags-$(CONFIG_MK7) += -march=athlon24cflags-$(CONFIG_MK7) += -march=athlon
26cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8,-march=athlon)25cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8,-march=athlon)
27cflags-$(CONFIG_MCRUSOE) += -march=i686 $(align)-functions=0 $(align)-jumps=0 $(align)-loops=026cflags-$(CONFIG_MCRUSOE) += -march=i686 -falign-functions=0 -falign-jumps=0 -falign-loops=0
28cflags-$(CONFIG_MEFFICEON) += -march=i686 $(call tune,pentium3) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=027cflags-$(CONFIG_MEFFICEON) += -march=i686 $(call tune,pentium3) -falign-functions=0 -falign-jumps=0 -falign-loops=0
29cflags-$(CONFIG_MWINCHIPC6) += $(call cc-option,-march=winchip-c6,-march=i586)28cflags-$(CONFIG_MWINCHIPC6) += $(call cc-option,-march=winchip-c6,-march=i586)
30cflags-$(CONFIG_MWINCHIP3D) += $(call cc-option,-march=winchip2,-march=i586)29cflags-$(CONFIG_MWINCHIP3D) += $(call cc-option,-march=winchip2,-march=i586)
31cflags-$(CONFIG_MCYRIXIII) += $(call cc-option,-march=c3,-march=i486) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=030cflags-$(CONFIG_MCYRIXIII) += $(call cc-option,-march=c3,-march=i486) -falign-functions=0 -falign-jumps=0 -falign-loops=0
32cflags-$(CONFIG_MVIAC3_2) += $(call cc-option,-march=c3-2,-march=i686)31cflags-$(CONFIG_MVIAC3_2) += $(call cc-option,-march=c3-2,-march=i686)
33cflags-$(CONFIG_MVIAC7) += -march=i68632cflags-$(CONFIG_MVIAC7) += -march=i686
34cflags-$(CONFIG_MCORE2) += -march=i686 $(call tune,core2)33cflags-$(CONFIG_MCORE2) += -march=i686 $(call tune,core2)
scripts/Kbuild.include+0−5
@@ -123,11 +123,6 @@ cc-option = $(call try-run,\ · 122 unmodified lines
123cc-option-yn = $(call try-run,\123cc-option-yn = $(call try-run,\
124 $(CC) -Werror $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",y,n)124 $(CC) -Werror $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",y,n)
125 125
126# cc-option-align
127# Prefix align with either -falign or -malign
128cc-option-align = $(subst -functions=0,,\
129 $(call cc-option,-falign-functions=0,-malign-functions=0))
130
131# cc-disable-warning126# cc-disable-warning
132# Usage: cflags-y += $(call cc-disable-warning,unused-but-set-variable)127# Usage: cflags-y += $(call cc-disable-warning,unused-but-set-variable)
133cc-disable-warning = $(call try-run,\128cc-disable-warning = $(call try-run,\