diff mbox

[U-Boot,8/8] arm64: Do not double -mstrict-align option

Message ID 1393393865-11608-9-git-send-email-yamada.m@jp.panasonic.com
State Deferred
Delegated to: Tom Rini
Headers show

Commit Message

Masahiro Yamada Feb. 26, 2014, 5:51 a.m. UTC
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(-)

Comments

Tom Rini Feb. 26, 2014, 1:55 p.m. UTC | #1
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.
Albert ARIBAUD Feb. 26, 2014, 9:58 p.m. UTC | #2
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,
Tom Rini Feb. 26, 2014, 10:03 p.m. UTC | #3
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.
Albert ARIBAUD Feb. 26, 2014, 10:08 p.m. UTC | #4
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,
diff mbox

Patch

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)