kbuild: remove cc-option-align
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 19 Jun 2017 07:28:22 +0000 (16:28 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sun, 25 Jun 2017 03:43:00 +0000 (12:43 +0900)
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.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Documentation/kbuild/makefiles.txt
arch/x86/Makefile_32.cpu
scripts/Kbuild.include

index 1c49e87cea4f5358691365c5b55a76eef0a3a218..247fb331c4b24c55711aa9489447735b1db234e1 100644 (file)
@@ -486,22 +486,6 @@ more details, with real examples.
        respectively.
        Note: cc-option-yn uses KBUILD_CFLAGS for $(CC) options
 
-    cc-option-align
-       gcc versions >= 3.0 changed the type of options used to specify
-       alignment of functions, loops etc. $(cc-option-align), when used
-       as prefix to the align options, will select the right prefix:
-       gcc < 3.00
-               cc-option-align = -malign
-       gcc >= 3.00
-               cc-option-align = -falign
-
-       Example:
-               KBUILD_CFLAGS += $(cc-option-align)-functions=4
-
-       In the above example, the option -falign-functions=4 is used for
-       gcc >= 3.00. For gcc < 3.00, -malign-functions=4 is used.
-       Note: cc-option-align uses KBUILD_CFLAGS for $(CC) options
-
     cc-disable-warning
        cc-disable-warning checks if gcc supports a given warning and returns
        the commandline switch to disable it. This special function is needed,
index a45eb15b7cf290a176d287c1255b9f9412495831..f3717d36718a5974f9be055dc38ba4a2777f67c4 100644 (file)
@@ -9,7 +9,6 @@ else
 tune           = $(call cc-option,-mcpu=$(1),$(2))
 endif
 
-align := $(cc-option-align)
 cflags-$(CONFIG_M486)          += -march=i486
 cflags-$(CONFIG_M586)          += -march=i586
 cflags-$(CONFIG_M586TSC)       += -march=i586
@@ -24,11 +23,11 @@ cflags-$(CONFIG_MK6)                += -march=k6
 # 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)-functions=0 $(align)-jumps=0 $(align)-loops=0
-cflags-$(CONFIG_MEFFICEON)     += -march=i686 $(call tune,pentium3) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
+cflags-$(CONFIG_MCRUSOE)       += -march=i686 -falign-functions=0 -falign-jumps=0 -falign-loops=0
+cflags-$(CONFIG_MEFFICEON)     += -march=i686 $(call tune,pentium3) -falign-functions=0 -falign-jumps=0 -falign-loops=0
 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)-functions=0 $(align)-jumps=0 $(align)-loops=0
+cflags-$(CONFIG_MCYRIXIII)     += $(call cc-option,-march=c3,-march=i486) -falign-functions=0 -falign-jumps=0 -falign-loops=0
 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)
index 61f87a99bf0a1c512e572d3cbdcf4b4b5d7ae785..53b7d47ce43a350ed4e7028893aaed0fb6b80fa1 100644 (file)
@@ -123,11 +123,6 @@ cc-option = $(call try-run,\
 cc-option-yn = $(call try-run,\
        $(CC) -Werror $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",y,n)
 
-# cc-option-align
-# Prefix align with either -falign or -malign
-cc-option-align = $(subst -functions=0,,\
-       $(call cc-option,-falign-functions=0,-malign-functions=0))
-
 # cc-disable-warning
 # Usage: cflags-y += $(call cc-disable-warning,unused-but-set-variable)
 cc-disable-warning = $(call try-run,\