Patchwork arch/arm: fix-up the ARM Kconfig warning

login
register
mail settings
Submitter Yann E. MORIN
Date Feb. 7, 2013, 7:04 p.m.
Message ID <1360263888-5806-1-git-send-email-yann.morin.1998@free.fr>
Download mbox | patch
Permalink /patch/218976/
State Accepted
Headers show

Comments

Yann E. MORIN - Feb. 7, 2013, 7:04 p.m.
Kconfig does not accepts that a symbol that is part of a choice
be affected a default value.

Fix this by introducing a dummy EABI symbol., and nake the real
EABI symbol a prompt-less option that depends on !OABI.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Peter Korsgaard <jacmet@uclibc.org>
Cc: Arnout Vandecappelle <arnout@mind.be>
---
 arch/Config.in.arm |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
Peter Korsgaard - Feb. 7, 2013, 7:43 p.m.
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 Yann> Kconfig does not accepts that a symbol that is part of a choice
 Yann> be affected a default value.

 Yann> Fix this by introducing a dummy EABI symbol., and nake the real
 Yann> EABI symbol a prompt-less option that depends on !OABI.

Thanks, committed with small fixups (s/nake/make and below).


 Yann> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
 Yann> Cc: Peter Korsgaard <jacmet@uclibc.org>
 Yann> Cc: Arnout Vandecappelle <arnout@mind.be>
 Yann> ---
 Yann>  arch/Config.in.arm |    7 ++++---
 Yann>  1 files changed, 4 insertions(+), 3 deletions(-)

 Yann> diff --git a/arch/Config.in.arm b/arch/Config.in.arm
 Yann> index 37152c0..ecb45ab 100644
 Yann> --- a/arch/Config.in.arm
 Yann> +++ b/arch/Config.in.arm
 Yann> @@ -76,7 +76,7 @@ choice
 Yann>  	  Note:
 Yann>  	    Using OABI is discouraged.
 
 Yann> -config BR2_ARM_EABI
 Yann> +config BR2_ARM_EABI_DUMMY

I renamed this to BR2_ARM_EABI_CHOICE

 Yann>  	bool "EABI"
 Yann>  config BR2_ARM_OABI
 Yann>  	bool "OABI"
 Yann> @@ -84,8 +84,9 @@ config BR2_ARM_OABI
 Yann>  endchoice
 
 Yann>  config BR2_ARM_EABI
 Yann> -	default y
 Yann> -	depends on !BR2_DEPRECATED
 Yann> +	def_bool y
 Yann> +	depends on BR2_arm || BR2_armeb

The entire file is only sourced for arm || armeb, so this can be
dropped.
Arnout Vandecappelle - Feb. 7, 2013, 10:10 p.m.
On 07/02/13 20:04, Yann E. MORIN wrote:
> Kconfig does not accepts that a symbol that is part of a choice
> be affected a default value.

  Weird, I thought I tested this...

  Regards,
  Arnout

Patch

diff --git a/arch/Config.in.arm b/arch/Config.in.arm
index 37152c0..ecb45ab 100644
--- a/arch/Config.in.arm
+++ b/arch/Config.in.arm
@@ -76,7 +76,7 @@  choice
 	  Note:
 	    Using OABI is discouraged.
 
-config BR2_ARM_EABI
+config BR2_ARM_EABI_DUMMY
 	bool "EABI"
 config BR2_ARM_OABI
 	bool "OABI"
@@ -84,8 +84,9 @@  config BR2_ARM_OABI
 endchoice
 
 config BR2_ARM_EABI
-	default y
-	depends on !BR2_DEPRECATED
+	def_bool y
+	depends on BR2_arm || BR2_armeb
+	depends on !BR2_ARM_OABI
 
 config BR2_ARM_ENABLE_NEON
 	bool "Enable NEON SIMD extension support"