[U-Boot] [PATCH 0/8] Kbuild: A collection of trivial refactoring

Masahiro Yamada (8): config.mk: Delete unused variable BCURDIR Makefile: delete unused variable LDSCRIPT_MAKEFILE_DIR nand_spl: simpc8313: move config.mk used only for nand_spl x86: Delete redundant compiler flags sh: Do not define -ffreestanding twice sh: merge compiler flag -ffixed-r13 m68k: merge compile flags -ffixed-d7 -sep-data arm64: Do not double -mstrict-align option
Makefile | 4 ---- arch/arm/cpu/armv8/config.mk | 1 - arch/m68k/config.mk | 3 ++- arch/m68k/cpu/mcf5227x/config.mk | 1 - arch/m68k/cpu/mcf523x/config.mk | 1 - arch/m68k/cpu/mcf52x2/config.mk | 2 -- arch/m68k/cpu/mcf532x/config.mk | 2 -- arch/m68k/cpu/mcf5445x/config.mk | 2 -- arch/m68k/cpu/mcf547x_8x/config.mk | 1 - arch/sh/config.mk | 1 + arch/sh/cpu/sh2/config.mk | 3 +-- arch/sh/cpu/sh3/config.mk | 1 - arch/sh/cpu/sh4/config.mk | 1 - arch/x86/config.mk | 5 +---- config.mk | 2 -- nand_spl/board/sheldon/simpc8313/Makefile | 2 ++ {board => nand_spl/board}/sheldon/simpc8313/config.mk | 0 17 files changed, 7 insertions(+), 25 deletions(-) rename {board => nand_spl/board}/sheldon/simpc8313/config.mk (100%)

This variable was abolished by Kbuild series. I forgot to delete it.
Signed-off-by: Masahiro Yamada yamada.m@jp.panasonic.com ---
config.mk | 2 -- 1 file changed, 2 deletions(-)
diff --git a/config.mk b/config.mk index 9897f20..e59697f 100644 --- a/config.mk +++ b/config.mk @@ -46,7 +46,5 @@ OBJCOPYFLAGS += --gap-fill=0xff CPPFLAGS = $(RELFLAGS) CPPFLAGS += -pipe $(PLATFORM_CPPFLAGS)
-BCURDIR = $(subst $(SRCTREE)/,,$(CURDIR:$(obj)%=%)) - LDFLAGS += $(PLATFORM_LDFLAGS) LDFLAGS_FINAL += -Bstatic

On Wed, Feb 26, 2014 at 02:50:58PM +0900, Masahiro Yamada wrote:
This variable was abolished by Kbuild series. I forgot to delete it.
Signed-off-by: Masahiro Yamada yamada.m@jp.panasonic.com
Applied to u-boot/master, thanks!

LDSCRIPT_MAKEFILE_DIR is not referenced from anywhere. Remove.
Signed-off-by: Masahiro Yamada yamada.m@jp.panasonic.com ---
Makefile | 4 ---- 1 file changed, 4 deletions(-)
diff --git a/Makefile b/Makefile index d3b0afb..fe9e144 100644 --- a/Makefile +++ b/Makefile @@ -489,8 +489,6 @@ endif # that (or fail if absent). Otherwise, search for a linker script in a # standard location.
-LDSCRIPT_MAKEFILE_DIR = $(dir $(LDSCRIPT)) - ifndef LDSCRIPT #LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds.debug ifdef CONFIG_SYS_LDSCRIPT @@ -515,8 +513,6 @@ ifndef LDSCRIPT endif ifeq ($(wildcard $(LDSCRIPT)),) LDSCRIPT := $(TOPDIR)/arch/$(ARCH)/cpu/u-boot.lds - # We don't expect a Makefile here - LDSCRIPT_MAKEFILE_DIR = endif endif

On Wed, Feb 26, 2014 at 02:50:59PM +0900, Masahiro Yamada wrote:
LDSCRIPT_MAKEFILE_DIR is not referenced from anywhere. Remove.
Signed-off-by: Masahiro Yamada yamada.m@jp.panasonic.com
Applied to u-boot/master, thanks!

board/sheldon/simpc8313/config.mk is used only for nand_spl. So it should go into nand_spl/board/sheldon/simpc8313/.
Signed-off-by: Masahiro Yamada yamada.m@jp.panasonic.com ---
nand_spl/board/sheldon/simpc8313/Makefile | 2 ++ {board => nand_spl/board}/sheldon/simpc8313/config.mk | 0 2 files changed, 2 insertions(+) rename {board => nand_spl/board}/sheldon/simpc8313/config.mk (100%)
diff --git a/nand_spl/board/sheldon/simpc8313/Makefile b/nand_spl/board/sheldon/simpc8313/Makefile index 32afc27..8b29e97 100644 --- a/nand_spl/board/sheldon/simpc8313/Makefile +++ b/nand_spl/board/sheldon/simpc8313/Makefile @@ -7,6 +7,8 @@ # SPDX-License-Identifier: GPL-2.0+ #
+include $(srctree)/$(src)/config.mk + nandobj := $(OBJTREE)/nand_spl/
LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds diff --git a/board/sheldon/simpc8313/config.mk b/nand_spl/board/sheldon/simpc8313/config.mk similarity index 100% rename from board/sheldon/simpc8313/config.mk rename to nand_spl/board/sheldon/simpc8313/config.mk

On Wed, Feb 26, 2014 at 02:51:00PM +0900, Masahiro Yamada wrote:
board/sheldon/simpc8313/config.mk is used only for nand_spl. So it should go into nand_spl/board/sheldon/simpc8313/.
Signed-off-by: Masahiro Yamada yamada.m@jp.panasonic.com
Applied to u-boot/master, thanks!

-Wstrict-prototypes, -ffreestanding, -fno-stack-protector are defined at the top Makefile for all architectures.
Do not define them twice for x86.
Signed-off-by: Masahiro Yamada yamada.m@jp.panasonic.com Cc: Simon Glass sjg@chromium.org ---
arch/x86/config.mk | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/x86/config.mk b/arch/x86/config.mk index 4a4ad80..58dff14 100644 --- a/arch/x86/config.mk +++ b/arch/x86/config.mk @@ -8,13 +8,10 @@ CONFIG_STANDALONE_LOAD_ADDR ?= 0x40000
PLATFORM_CPPFLAGS += -fno-strict-aliasing -PLATFORM_CPPFLAGS += -Wstrict-prototypes PLATFORM_CPPFLAGS += -mregparm=3 PLATFORM_CPPFLAGS += -fomit-frame-pointer -PF_CPPFLAGS_X86 := $(call cc-option, -ffreestanding) \ - $(call cc-option, -fno-toplevel-reorder, \ +PF_CPPFLAGS_X86 := $(call cc-option, -fno-toplevel-reorder, \ $(call cc-option, -fno-unit-at-a-time)) \ - $(call cc-option, -fno-stack-protector) \ $(call cc-option, -mpreferred-stack-boundary=2) PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_X86) PLATFORM_CPPFLAGS += -fno-dwarf2-cfi-asm

On 25 February 2014 22:51, Masahiro Yamada yamada.m@jp.panasonic.comwrote:
-Wstrict-prototypes, -ffreestanding, -fno-stack-protector are defined at the top Makefile for all architectures.
Do not define them twice for x86.
Signed-off-by: Masahiro Yamada yamada.m@jp.panasonic.com Cc: Simon Glass sjg@chromium.org
Acked-by: Simon Glass sjg@chromium.org

On Wed, Feb 26, 2014 at 02:51:01PM +0900, Masahiro Yamada wrote:
-Wstrict-prototypes, -ffreestanding, -fno-stack-protector are defined at the top Makefile for all architectures.
Do not define them twice for x86.
Signed-off-by: Masahiro Yamada yamada.m@jp.panasonic.com Cc: Simon Glass sjg@chromium.org Acked-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!

-ffreestanding is defined at the top Makefile for all architectures. Do not define it twice for SH2A.
Signed-off-by: Masahiro Yamada yamada.m@jp.panasonic.com Cc: Nobuhiro Iwamatsu nobuhiro.iwamatsu.yj@renesas.com ---
arch/sh/cpu/sh2/config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sh/cpu/sh2/config.mk b/arch/sh/cpu/sh2/config.mk index 69273b4..25abcdd 100644 --- a/arch/sh/cpu/sh2/config.mk +++ b/arch/sh/cpu/sh2/config.mk @@ -8,7 +8,7 @@ ENDIANNESS += -EB
ifdef CONFIG_SH2A -PLATFORM_CPPFLAGS += -m2a -m2a-nofpu -mb -ffreestanding +PLATFORM_CPPFLAGS += -m2a -m2a-nofpu -mb else # SH2 PLATFORM_CPPFLAGS += -m3e -mb endif

Applied, thanks.
Best regards, Nobuhiro
2014-02-26 14:51 GMT+09:00 Masahiro Yamada yamada.m@jp.panasonic.com:
-ffreestanding is defined at the top Makefile for all architectures. Do not define it twice for SH2A.
Signed-off-by: Masahiro Yamada yamada.m@jp.panasonic.com Cc: Nobuhiro Iwamatsu nobuhiro.iwamatsu.yj@renesas.com
arch/sh/cpu/sh2/config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sh/cpu/sh2/config.mk b/arch/sh/cpu/sh2/config.mk index 69273b4..25abcdd 100644 --- a/arch/sh/cpu/sh2/config.mk +++ b/arch/sh/cpu/sh2/config.mk @@ -8,7 +8,7 @@ ENDIANNESS += -EB
ifdef CONFIG_SH2A -PLATFORM_CPPFLAGS += -m2a -m2a-nofpu -mb -ffreestanding +PLATFORM_CPPFLAGS += -m2a -m2a-nofpu -mb else # SH2 PLATFORM_CPPFLAGS += -m3e -mb endif -- 1.8.3.2
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Hello Nobihiro,
Thanks.
I want this and 6/8 on u-boot/master.
Can you please send pull-request now?
Best Regards Masahiro Yamada

Hi,
These were already applied to u-boot/master. Thanks, Tom,.
Nobuhiro
2014-03-05 5:37 GMT+09:00 Tom Rini trini@ti.com:
On Fri, Feb 28, 2014 at 12:39:35PM +0900, Masahiro Yamada wrote:
Hello Nobihiro,
Thanks.
I want this and 6/8 on u-boot/master.
Can you please send pull-request now?
Yes, soon please :)
-- Tom
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

On Wed, Mar 05, 2014 at 09:45:26AM +0900, Nobuhiro Iwamatsu wrote:
Hi,
These were already applied to u-boot/master. Thanks, Tom,.
Bah, I was intending to not apply them, but I guess dropped them too late. So long as u-boot-sh ends up being sane, oh well :)
Nobuhiro
2014-03-05 5:37 GMT+09:00 Tom Rini trini@ti.com:
On Fri, Feb 28, 2014 at 12:39:35PM +0900, Masahiro Yamada wrote:
Hello Nobihiro,
Thanks.
I want this and 6/8 on u-boot/master.
Can you please send pull-request now?
Yes, soon please :)
-- Tom
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
-- Nobuhiro Iwamatsu _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

-ffixed-r13 is defined commonly for sh2, sh3, sh4. Move it to arch/sh/config.mk
Signed-off-by: Masahiro Yamada yamada.m@jp.panasonic.com Cc: Nobuhiro Iwamatsu nobuhiro.iwamatsu.yj@renesas.com ---
arch/sh/config.mk | 1 + arch/sh/cpu/sh2/config.mk | 1 - arch/sh/cpu/sh3/config.mk | 1 - arch/sh/cpu/sh4/config.mk | 1 - 4 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/sh/config.mk b/arch/sh/config.mk index 758c070..eefcbcd 100644 --- a/arch/sh/config.mk +++ b/arch/sh/config.mk @@ -15,3 +15,4 @@ endif PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__ PLATFORM_LDFLAGS += -e $(CONFIG_SYS_TEXT_BASE) --defsym reloc_dst=$(CONFIG_SYS_TEXT_BASE) LDFLAGS_FINAL = --gc-sections +PLATFORM_RELFLAGS += -ffixed-r13 diff --git a/arch/sh/cpu/sh2/config.mk b/arch/sh/cpu/sh2/config.mk index 25abcdd..4904d76 100644 --- a/arch/sh/cpu/sh2/config.mk +++ b/arch/sh/cpu/sh2/config.mk @@ -14,5 +14,4 @@ PLATFORM_CPPFLAGS += -m3e -mb endif PLATFORM_CPPFLAGS += -DCONFIG_SH2 $(call cc-option,-mno-fdpic)
-PLATFORM_RELFLAGS += -ffixed-r13 PLATFORM_LDFLAGS += $(ENDIANNESS) diff --git a/arch/sh/cpu/sh3/config.mk b/arch/sh/cpu/sh3/config.mk index abd4b8d..24b5c47 100644 --- a/arch/sh/cpu/sh3/config.mk +++ b/arch/sh/cpu/sh3/config.mk @@ -12,4 +12,3 @@ # # PLATFORM_CPPFLAGS += -DCONFIG_SH3 -m3 -PLATFORM_RELFLAGS += -ffixed-r13 diff --git a/arch/sh/cpu/sh4/config.mk b/arch/sh/cpu/sh4/config.mk index 753580b..5773d4f 100644 --- a/arch/sh/cpu/sh4/config.mk +++ b/arch/sh/cpu/sh4/config.mk @@ -9,4 +9,3 @@ # # PLATFORM_CPPFLAGS += -DCONFIG_SH4 -m4-nofpu -PLATFORM_RELFLAGS += -ffixed-r13

Applied, thanks.
Best regards, Nobuhiro
2014-02-26 14:51 GMT+09:00 Masahiro Yamada yamada.m@jp.panasonic.com:
-ffixed-r13 is defined commonly for sh2, sh3, sh4. Move it to arch/sh/config.mk
Signed-off-by: Masahiro Yamada yamada.m@jp.panasonic.com Cc: Nobuhiro Iwamatsu nobuhiro.iwamatsu.yj@renesas.com
arch/sh/config.mk | 1 + arch/sh/cpu/sh2/config.mk | 1 - arch/sh/cpu/sh3/config.mk | 1 - arch/sh/cpu/sh4/config.mk | 1 - 4 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/sh/config.mk b/arch/sh/config.mk index 758c070..eefcbcd 100644 --- a/arch/sh/config.mk +++ b/arch/sh/config.mk @@ -15,3 +15,4 @@ endif PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__ PLATFORM_LDFLAGS += -e $(CONFIG_SYS_TEXT_BASE) --defsym reloc_dst=$(CONFIG_SYS_TEXT_BASE) LDFLAGS_FINAL = --gc-sections +PLATFORM_RELFLAGS += -ffixed-r13 diff --git a/arch/sh/cpu/sh2/config.mk b/arch/sh/cpu/sh2/config.mk index 25abcdd..4904d76 100644 --- a/arch/sh/cpu/sh2/config.mk +++ b/arch/sh/cpu/sh2/config.mk @@ -14,5 +14,4 @@ PLATFORM_CPPFLAGS += -m3e -mb endif PLATFORM_CPPFLAGS += -DCONFIG_SH2 $(call cc-option,-mno-fdpic)
-PLATFORM_RELFLAGS += -ffixed-r13 PLATFORM_LDFLAGS += $(ENDIANNESS) diff --git a/arch/sh/cpu/sh3/config.mk b/arch/sh/cpu/sh3/config.mk index abd4b8d..24b5c47 100644 --- a/arch/sh/cpu/sh3/config.mk +++ b/arch/sh/cpu/sh3/config.mk @@ -12,4 +12,3 @@ # # PLATFORM_CPPFLAGS += -DCONFIG_SH3 -m3 -PLATFORM_RELFLAGS += -ffixed-r13 diff --git a/arch/sh/cpu/sh4/config.mk b/arch/sh/cpu/sh4/config.mk index 753580b..5773d4f 100644 --- a/arch/sh/cpu/sh4/config.mk +++ b/arch/sh/cpu/sh4/config.mk @@ -9,4 +9,3 @@ # # PLATFORM_CPPFLAGS += -DCONFIG_SH4 -m4-nofpu
-PLATFORM_RELFLAGS += -ffixed-r13
1.8.3.2
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

All arch/m68k/cpu/*/config.mk define the same flags PLAGFORM_REFLFLAGS += -ffixed-d7 -msep-data Move it to arch/m68k/config.mk
Signed-off-by: Masahiro Yamada yamada.m@jp.panasonic.com Cc: Jason Jin Jason.jin@freescale.com ---
arch/m68k/config.mk | 3 ++- arch/m68k/cpu/mcf5227x/config.mk | 1 - arch/m68k/cpu/mcf523x/config.mk | 1 - arch/m68k/cpu/mcf52x2/config.mk | 2 -- arch/m68k/cpu/mcf532x/config.mk | 2 -- arch/m68k/cpu/mcf5445x/config.mk | 2 -- arch/m68k/cpu/mcf547x_8x/config.mk | 1 - 7 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/arch/m68k/config.mk b/arch/m68k/config.mk index 9c3e24f..79ae298 100644 --- a/arch/m68k/config.mk +++ b/arch/m68k/config.mk @@ -11,5 +11,6 @@ CONFIG_STANDALONE_LOAD_ADDR ?= 0x20000
PLATFORM_CPPFLAGS += -DCONFIG_M68K -D__M68K__ PLATFORM_LDFLAGS += -n -PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections +PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections +PLATFORM_RELFLAGS += -ffixed-d7 -msep-data LDFLAGS_FINAL += --gc-sections diff --git a/arch/m68k/cpu/mcf5227x/config.mk b/arch/m68k/cpu/mcf5227x/config.mk index 2681171..b5c26e4 100644 --- a/arch/m68k/cpu/mcf5227x/config.mk +++ b/arch/m68k/cpu/mcf5227x/config.mk @@ -7,5 +7,4 @@ # SPDX-License-Identifier: GPL-2.0+ #
-PLATFORM_RELFLAGS += -ffixed-d7 -msep-data PLATFORM_CPPFLAGS += -mcpu=52277 -fPIC diff --git a/arch/m68k/cpu/mcf523x/config.mk b/arch/m68k/cpu/mcf523x/config.mk index 620769f..c9435ab 100644 --- a/arch/m68k/cpu/mcf523x/config.mk +++ b/arch/m68k/cpu/mcf523x/config.mk @@ -7,5 +7,4 @@ # SPDX-License-Identifier: GPL-2.0+ #
-PLATFORM_RELFLAGS += -ffixed-d7 -msep-data PLATFORM_CPPFLAGS += -mcpu=5235 -fPIC diff --git a/arch/m68k/cpu/mcf52x2/config.mk b/arch/m68k/cpu/mcf52x2/config.mk index d0be46f..25f98de 100644 --- a/arch/m68k/cpu/mcf52x2/config.mk +++ b/arch/m68k/cpu/mcf52x2/config.mk @@ -7,8 +7,6 @@ # SPDX-License-Identifier: GPL-2.0+ #
-PLATFORM_RELFLAGS += -ffixed-d7 -msep-data - cfg=$(shell grep configs $(OBJTREE)/include/config.h | sed 's/.*<(configs.*)>/\1/') is5208:=$(shell grep CONFIG_M5208 $(TOPDIR)/include/$(cfg)) is5249:=$(shell grep CONFIG_M5249 $(TOPDIR)/include/$(cfg)) diff --git a/arch/m68k/cpu/mcf532x/config.mk b/arch/m68k/cpu/mcf532x/config.mk index be12203..0604ab0 100644 --- a/arch/m68k/cpu/mcf532x/config.mk +++ b/arch/m68k/cpu/mcf532x/config.mk @@ -7,8 +7,6 @@ # SPDX-License-Identifier: GPL-2.0+ #
-PLATFORM_RELFLAGS += -ffixed-d7 -msep-data - cfg=$(shell grep configs $(OBJTREE)/include/config.h | sed 's/.*<(configs.*)>/\1/') is5301x:=$(shell grep CONFIG_MCF5301x $(TOPDIR)/include/$(cfg)) is532x:=$(shell grep CONFIG_MCF532x $(TOPDIR)/include/$(cfg)) diff --git a/arch/m68k/cpu/mcf5445x/config.mk b/arch/m68k/cpu/mcf5445x/config.mk index d546b22..6da08d5 100644 --- a/arch/m68k/cpu/mcf5445x/config.mk +++ b/arch/m68k/cpu/mcf5445x/config.mk @@ -9,8 +9,6 @@ # SPDX-License-Identifier: GPL-2.0+ #
-PLATFORM_RELFLAGS += -ffixed-d7 -msep-data - cfg=$(shell grep configs $(OBJTREE)/include/config.h | sed 's/.*<(configs.*)>/\1/') is5441x:=$(shell grep CONFIG_MCF5441x $(TOPDIR)/include/$(cfg))
diff --git a/arch/m68k/cpu/mcf547x_8x/config.mk b/arch/m68k/cpu/mcf547x_8x/config.mk index 345f584..825f6cc 100644 --- a/arch/m68k/cpu/mcf547x_8x/config.mk +++ b/arch/m68k/cpu/mcf547x_8x/config.mk @@ -7,7 +7,6 @@ # SPDX-License-Identifier: GPL-2.0+ #
-PLATFORM_RELFLAGS += -ffixed-d7 -msep-data PLATFORM_CPPFLAGS += -mcpu=5485 -fPIC
ifneq (,$(findstring -linux-,$(shell $(CC) --version)))

On Wed, Feb 26, 2014 at 02:51:04PM +0900, Masahiro Yamada wrote:
All arch/m68k/cpu/*/config.mk define the same flags PLAGFORM_REFLFLAGS += -ffixed-d7 -msep-data Move it to arch/m68k/config.mk
Signed-off-by: Masahiro Yamada yamada.m@jp.panasonic.com Cc: Jason Jin Jason.jin@freescale.com
Applied to u-boot/master, thanks!

Seeing arch/arm/cpu/armv8/config.mk, -mstrict-align option was added to both PLATFORM_NO_UNALIGNED and PLATFORM_CPPFLAGS.
$(PLATFORM_CPPFLAGS) is given to all compiled objects. Adding the same option to also PLATFORM_NO_UNALIGNED is redundant.
For example, common/hush.o was compiled with double -mstrict-align. You can comfirm it by checking common/.hush.o.cmd file.
Signed-off-by: Masahiro Yamada yamada.m@jp.panasonic.com Cc: David Feng fenghua@phytium.com.cn Cc: Albert ARIBAUD albert.u.boot@aribaud.net Cc: Tom Rini trini@ti.com ---
arch/arm/cpu/armv8/config.mk | 1 - 1 file changed, 1 deletion(-)
diff --git a/arch/arm/cpu/armv8/config.mk b/arch/arm/cpu/armv8/config.mk index 027a68c..7e59b4d 100644 --- a/arch/arm/cpu/armv8/config.mk +++ b/arch/arm/cpu/armv8/config.mk @@ -8,7 +8,6 @@ PLATFORM_RELFLAGS += -fno-common -ffixed-x18
# SEE README.arm-unaligned-accesses PF_NO_UNALIGNED := $(call cc-option, -mstrict-align) -PLATFORM_NO_UNALIGNED := $(PF_NO_UNALIGNED)
PF_CPPFLAGS_ARMV8 := $(call cc-option, -march=armv8-a) PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_ARMV8)

On Wed, Feb 26, 2014 at 02:51:05PM +0900, Masahiro Yamada wrote:
Seeing arch/arm/cpu/armv8/config.mk, -mstrict-align option was added to both PLATFORM_NO_UNALIGNED and PLATFORM_CPPFLAGS.
$(PLATFORM_CPPFLAGS) is given to all compiled objects. Adding the same option to also PLATFORM_NO_UNALIGNED is redundant.
For example, common/hush.o was compiled with double -mstrict-align. You can comfirm it by checking common/.hush.o.cmd file.
Signed-off-by: Masahiro Yamada yamada.m@jp.panasonic.com Cc: David Feng fenghua@phytium.com.cn Cc: Albert ARIBAUD albert.u.boot@aribaud.net Cc: Tom Rini trini@ti.com
With the v3 series about unaligned bits this patch should no longer be needed.

Hi Tom,
On Wed, 26 Feb 2014 08:55:43 -0500, Tom Rini trini@ti.com wrote:
On Wed, Feb 26, 2014 at 02:51:05PM +0900, Masahiro Yamada wrote:
Seeing arch/arm/cpu/armv8/config.mk, -mstrict-align option was added to both PLATFORM_NO_UNALIGNED and PLATFORM_CPPFLAGS.
$(PLATFORM_CPPFLAGS) is given to all compiled objects. Adding the same option to also PLATFORM_NO_UNALIGNED is redundant.
For example, common/hush.o was compiled with double -mstrict-align. You can comfirm it by checking common/.hush.o.cmd file.
Signed-off-by: Masahiro Yamada yamada.m@jp.panasonic.com Cc: David Feng fenghua@phytium.com.cn Cc: Albert ARIBAUD albert.u.boot@aribaud.net Cc: Tom Rini trini@ti.com
With the v3 series about unaligned bits this patch should no longer be needed.
Hmm... This patch is about not repeating -mstrict-align twice, which is a bug unrelated with switching to -mno-unaligned-access.
Besides, -mstrict-align means "Don't assume that unaligned accesses are handled", which I think is for aarch64 what -mno-unaligned-access is for arm(32), so it *should* be specified.
Amicalement,

On Wed, Feb 26, 2014 at 10:58:10PM +0100, Albert ARIBAUD wrote:
Hi Tom,
On Wed, 26 Feb 2014 08:55:43 -0500, Tom Rini trini@ti.com wrote:
On Wed, Feb 26, 2014 at 02:51:05PM +0900, Masahiro Yamada wrote:
Seeing arch/arm/cpu/armv8/config.mk, -mstrict-align option was added to both PLATFORM_NO_UNALIGNED and PLATFORM_CPPFLAGS.
$(PLATFORM_CPPFLAGS) is given to all compiled objects. Adding the same option to also PLATFORM_NO_UNALIGNED is redundant.
For example, common/hush.o was compiled with double -mstrict-align. You can comfirm it by checking common/.hush.o.cmd file.
Signed-off-by: Masahiro Yamada yamada.m@jp.panasonic.com Cc: David Feng fenghua@phytium.com.cn Cc: Albert ARIBAUD albert.u.boot@aribaud.net Cc: Tom Rini trini@ti.com
With the v3 series about unaligned bits this patch should no longer be needed.
Hmm... This patch is about not repeating -mstrict-align twice, which is a bug unrelated with switching to -mno-unaligned-access.
Besides, -mstrict-align means "Don't assume that unaligned accesses are handled", which I think is for aarch64 what -mno-unaligned-access is for arm(32), so it *should* be specified.
Yes, but my patch cleaned up the places that set PLATFORM_NO_UNALIGNED so this duplication was dropped.

Hi Tom,
On Wed, 26 Feb 2014 17:03:08 -0500, Tom Rini trini@ti.com wrote:
On Wed, Feb 26, 2014 at 10:58:10PM +0100, Albert ARIBAUD wrote:
Hi Tom,
On Wed, 26 Feb 2014 08:55:43 -0500, Tom Rini trini@ti.com wrote:
On Wed, Feb 26, 2014 at 02:51:05PM +0900, Masahiro Yamada wrote:
Seeing arch/arm/cpu/armv8/config.mk, -mstrict-align option was added to both PLATFORM_NO_UNALIGNED and PLATFORM_CPPFLAGS.
$(PLATFORM_CPPFLAGS) is given to all compiled objects. Adding the same option to also PLATFORM_NO_UNALIGNED is redundant.
For example, common/hush.o was compiled with double -mstrict-align. You can comfirm it by checking common/.hush.o.cmd file.
Signed-off-by: Masahiro Yamada yamada.m@jp.panasonic.com Cc: David Feng fenghua@phytium.com.cn Cc: Albert ARIBAUD albert.u.boot@aribaud.net Cc: Tom Rini trini@ti.com
With the v3 series about unaligned bits this patch should no longer be needed.
Hmm... This patch is about not repeating -mstrict-align twice, which is a bug unrelated with switching to -mno-unaligned-access.
Besides, -mstrict-align means "Don't assume that unaligned accesses are handled", which I think is for aarch64 what -mno-unaligned-access is for arm(32), so it *should* be specified.
Yes, but my patch cleaned up the places that set PLATFORM_NO_UNALIGNED so this duplication was dropped.
Oh, ok. My bad, then.
Amicalement,

On Wed, Feb 26, 2014 at 02:50:57PM +0900, Masahiro Yamada wrote:
Masahiro Yamada (8): config.mk: Delete unused variable BCURDIR Makefile: delete unused variable LDSCRIPT_MAKEFILE_DIR nand_spl: simpc8313: move config.mk used only for nand_spl x86: Delete redundant compiler flags sh: Do not define -ffreestanding twice sh: merge compiler flag -ffixed-r13 m68k: merge compile flags -ffixed-d7 -sep-data arm64: Do not double -mstrict-align option
Makefile | 4 ---- arch/arm/cpu/armv8/config.mk | 1 - arch/m68k/config.mk | 3 ++- arch/m68k/cpu/mcf5227x/config.mk | 1 - arch/m68k/cpu/mcf523x/config.mk | 1 - arch/m68k/cpu/mcf52x2/config.mk | 2 -- arch/m68k/cpu/mcf532x/config.mk | 2 -- arch/m68k/cpu/mcf5445x/config.mk | 2 -- arch/m68k/cpu/mcf547x_8x/config.mk | 1 - arch/sh/config.mk | 1 + arch/sh/cpu/sh2/config.mk | 3 +-- arch/sh/cpu/sh3/config.mk | 1 - arch/sh/cpu/sh4/config.mk | 1 - arch/x86/config.mk | 5 +---- config.mk | 2 -- nand_spl/board/sheldon/simpc8313/Makefile | 2 ++ {board => nand_spl/board}/sheldon/simpc8313/config.mk | 0 17 files changed, 7 insertions(+), 25 deletions(-) rename {board => nand_spl/board}/sheldon/simpc8313/config.mk (100%)
Patches 1 through 7 look good and I'll pick them up soon, commented on 8.
participants (5)
-
Albert ARIBAUD
-
Masahiro Yamada
-
Nobuhiro Iwamatsu
-
Simon Glass
-
Tom Rini