Patchwork [maverick/ti-omap4,SRU] UBUNTU: [Config] Fix FTBS caused by new binutils

login
register
mail settings
Submitter Paolo Pisati
Date June 8, 2011, 9:18 a.m.
Message ID <4DEF3E5A.1050503@canonical.com>
Download mbox | patch
Permalink /patch/99385/
State New
Headers show

Comments

Paolo Pisati - June 8, 2011, 9:18 a.m.
SRU Justification:

BugLink: http://bugs.launchpad.net/bugs/669912

Impact: since natty the default toolchain for arm went from 4.4 to 4.5, 
and the switch broke maverick/ti-omap4 compilation

Fix: cherry-picked from natty - 1ebe13dea156358f1044a7a755f02945ad3890e4

Test case: try to compile maverick/ti-omap4 on a natty box and you will get:

arch/arm/mach-omap2/omap-headsmp.S: Assembler messages:
arch/arm/mach-omap2/omap-headsmp.S:36: Error: selected processor does 
not support ARM mode `smc #0'
make[3]: *** [arch/arm/mach-omap2/omap-headsmp.o] Error 1
make[2]: *** [arch/arm/mach-omap2] Error 2
make[2]: *** Waiting for unfinished jobs....
Tim Gardner - June 8, 2011, 12:54 p.m.
On 06/08/2011 03:18 AM, Paolo Pisati wrote:
> SRU Justification:
>
> BugLink: http://bugs.launchpad.net/bugs/669912
>
> Impact: since natty the default toolchain for arm went from 4.4 to 4.5,
> and the switch broke maverick/ti-omap4 compilation
>
> Fix: cherry-picked from natty - 1ebe13dea156358f1044a7a755f02945ad3890e4
>
> Test case: try to compile maverick/ti-omap4 on a natty box and you will
> get:
>
> arch/arm/mach-omap2/omap-headsmp.S: Assembler messages:
> arch/arm/mach-omap2/omap-headsmp.S:36: Error: selected processor does
> not support ARM mode `smc #0'
> make[3]: *** [arch/arm/mach-omap2/omap-headsmp.o] Error 1
> make[2]: *** [arch/arm/mach-omap2] Error 2
> make[2]: *** Waiting for unfinished jobs....
>

You're wanting to build a Maverick kernel using a Natty compiler and 
binutils, right? I believe this is purely for developer convenience and 
does not meet SRU criteria. Why not use a Maverick chroot ?

rtg
Paolo Pisati - June 8, 2011, 1:17 p.m.
On 06/08/2011 02:54 PM, Tim Gardner wrote:
>
> You're wanting to build a Maverick kernel using a Natty compiler and
> binutils, right? I believe this is purely for developer convenience and
> does not meet SRU criteria. Why not use a Maverick chroot ?

because it's easier to do it not in a chroot.

anyway, if it doesn't meet SRU criteria it's not a big deal, i'll keep 
it in my local tree.

Patch

From d1aff9273c1e3e4f0163b96548df2c83aa52db07 Mon Sep 17 00:00:00 2001
From: Tim Gardner <tim.gardner@canonical.com>
Date: Thu, 9 Dec 2010 08:16:52 -0700
Subject: [PATCH] UBUNTU: [Config] Fix FTBS caused by new binutils

BugLink: http://bugs.launchpad.net/bugs/669912

New assemblers need -march=armv7-a+sec on command line or
.arch_extension sec inline to enable use of the smc instruction.

This patch uses as-instr to check the latter to conditionally
enable the former in AFLAGS for files that use smc.

Checked on both old and new binutils to verify that it does
not break old versions.

Signed-off-by: John Rigby <john.rigby@linaro.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
---
 arch/arm/mach-omap2/Makefile |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 6047329..2a84f34 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -29,7 +29,9 @@  obj-$(CONFIG_HOTPLUG_CPU)		+= omap-hotplug.o
 obj-$(CONFIG_ARCH_OMAP4)		+= omap44xx-smc.o omap4-common.o \
 					   omap4-wakeupgen.o
 
-AFLAGS_omap44xx-smc.o			:=-Wa,-march=armv7-a
+plus_sec := $(call as-instr,.arch_extension sec,+sec)
+AFLAGS_omap-headsmp.o                  :=-Wa,-march=armv7-a$(plus_sec)
+AFLAGS_omap44xx-smc.o                  :=-Wa,-march=armv7-a$(plus_sec)
 
 # Functions loaded to SRAM
 obj-$(CONFIG_ARCH_OMAP2420)		+= sram242x.o
-- 
1.7.5.3