diff mbox

[v2,01/17] arch/arm: introduce and use BR2_ARM_CPU_ARMV7M

Message ID 1458335299-27409-2-git-send-email-thomas.petazzoni@free-electrons.com
State Accepted
Headers show

Commit Message

Thomas Petazzoni March 18, 2016, 9:08 p.m. UTC
All ARM cores should select a BR2_ARM_CPU_* option. Currently, the
cortex-m3 does not, which this commit fixes by introducing a
BR2_ARM_CPU_ARMV7M option.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 arch/Config.in.arm | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Yann E. MORIN March 18, 2016, 10:30 p.m. UTC | #1
Thomas, All,

On 2016-03-18 22:08 +0100, Thomas Petazzoni spake thusly:
> All ARM cores should select a BR2_ARM_CPU_* option. Currently, the
> cortex-m3 does not, which this commit fixes by introducing a
> BR2_ARM_CPU_ARMV7M option.

Tangentially related: those options are not user to sepcify iany of the
gcc options, but to allow packages that have CPU-specific code todepend
on it or to enable such support it.

> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
>  arch/Config.in.arm | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/Config.in.arm b/arch/Config.in.arm
> index 04f0369..33f763a 100644
> --- a/arch/Config.in.arm
> +++ b/arch/Config.in.arm
> @@ -52,6 +52,9 @@ config BR2_ARM_CPU_ARMV6
>  config BR2_ARM_CPU_ARMV7A
>  	bool
>  
> +config BR2_ARM_CPU_ARMV7M
> +	bool
> +
>  choice
>  	prompt "Target Architecture Variant"
>  	depends on BR2_arm || BR2_armeb
> @@ -171,6 +174,7 @@ config BR2_cortex_m3
>  	bool "cortex-M3"
>  	select BR2_ARM_CPU_HAS_THUMB
>  	select BR2_ARM_CPU_HAS_THUMB2
> +	select BR2_ARM_CPU_ARMV7M
>  config BR2_fa526
>  	bool "fa526/626"
>  	select BR2_ARM_CPU_HAS_ARM
> -- 
> 2.6.4
> 
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Thomas Petazzoni March 19, 2016, 1:33 p.m. UTC | #2
Hello,

On Fri, 18 Mar 2016 23:30:50 +0100, Yann E. MORIN wrote:
> Thomas, All,
> 
> On 2016-03-18 22:08 +0100, Thomas Petazzoni spake thusly:
> > All ARM cores should select a BR2_ARM_CPU_* option. Currently, the
> > cortex-m3 does not, which this commit fixes by introducing a
> > BR2_ARM_CPU_ARMV7M option.
> 
> Tangentially related: those options are not user to sepcify iany of the
> gcc options, but to allow packages that have CPU-specific code todepend
> on it or to enable such support it.

Hum, yes. But I don't understand what I'm supposed to do with your
comment? Are you suggesting that a change is needed?

> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> > Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> 
> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Thanks!

Thomas
Yann E. MORIN March 19, 2016, 1:59 p.m. UTC | #3
Thomas, All,

On 2016-03-19 14:33 +0100, Thomas Petazzoni spake thusly:
> On Fri, 18 Mar 2016 23:30:50 +0100, Yann E. MORIN wrote:
> > Thomas, All,
> > 
> > On 2016-03-18 22:08 +0100, Thomas Petazzoni spake thusly:
> > > All ARM cores should select a BR2_ARM_CPU_* option. Currently, the
> > > cortex-m3 does not, which this commit fixes by introducing a
> > > BR2_ARM_CPU_ARMV7M option.
> > 
> > Tangentially related: those options are not user to sepcify iany of the
> > gcc options, but to allow packages that have CPU-specific code todepend
> > on it or to enable such support it.
> 
> Hum, yes. But I don't understand what I'm supposed to do with your
> comment?

You could fix my many typoes! ;-)

> Are you suggesting that a change is needed?

No, it's OK (hence ny acked-by). However, I had to do a bit of research
in the tree to see ehre such options were used, only to discover that
packages did use them, not the toolchain.

Those variables are specific to ARM, and we have no such counterparts in
any of the others archs. So maybe we could have a little comment at the
top of arch/Config/in.arm that explains what those kconfig variables are
for?

But really, not related to your patch...

Regards,
Yann E. MORIN.

> > > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> > > Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> > 
> > Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> 
> Thanks!
> 
> Thomas
> -- 
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
Thomas Petazzoni March 19, 2016, 2:08 p.m. UTC | #4
Hello,

On Sat, 19 Mar 2016 14:59:46 +0100, Yann E. MORIN wrote:

> > Are you suggesting that a change is needed?
> 
> No, it's OK (hence ny acked-by). However, I had to do a bit of research
> in the tree to see ehre such options were used, only to discover that
> packages did use them, not the toolchain.
> 
> Those variables are specific to ARM, and we have no such counterparts in
> any of the others archs. So maybe we could have a little comment at the
> top of arch/Config/in.arm that explains what those kconfig variables are
> for?

IIRC, we originally added them because some packages were doing
$(BR2_cortex_a8)$(BR2_cortex_a9)$(BR2_cortex_aX)... to find out whether
we're on ARMv7 or not, and it was starting to be a bit annoying.

Or some others were doing similar things to say "I need ARMv5" at
least, etc.

But yes, they are only used by packages. For the toolchain build
process itself, only the BR2_cortex*, BR2_arm* options are useful.

Thomas
diff mbox

Patch

diff --git a/arch/Config.in.arm b/arch/Config.in.arm
index 04f0369..33f763a 100644
--- a/arch/Config.in.arm
+++ b/arch/Config.in.arm
@@ -52,6 +52,9 @@  config BR2_ARM_CPU_ARMV6
 config BR2_ARM_CPU_ARMV7A
 	bool
 
+config BR2_ARM_CPU_ARMV7M
+	bool
+
 choice
 	prompt "Target Architecture Variant"
 	depends on BR2_arm || BR2_armeb
@@ -171,6 +174,7 @@  config BR2_cortex_m3
 	bool "cortex-M3"
 	select BR2_ARM_CPU_HAS_THUMB
 	select BR2_ARM_CPU_HAS_THUMB2
+	select BR2_ARM_CPU_ARMV7M
 config BR2_fa526
 	bool "fa526/626"
 	select BR2_ARM_CPU_HAS_ARM