[U-Boot] [PATCH 4/7] kconfig: move CONFIG_USE_PRIVATE_LIBGCC to Kconfig

Masahiro Yamada yamada.m at jp.panasonic.com
Fri Sep 26 12:23:25 CEST 2014


The private libgcc is supported only on ARM, MIPS, PowerPC, SH, x86.
Those architectures should "select" HAVE_PRIVATE_LIBGCC and
CONFIG_USE_PRIVATE_LIBGCC should depend on it.

Currently, this option is enabled on Tegra boards and x86 architecture.
Move the definition from header files to Kconfig.

Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>
Cc: Simon Glass <sjg at chromium.org>
Cc: Stephen Warren <swarren at nvidia.com>
Cc: Tom Warren <twarren at nvidia.com>
---

 arch/Kconfig                            |  5 +++++
 arch/arm/cpu/armv7/tegra-common/Kconfig |  3 +++
 arch/x86/Kconfig                        |  3 +++
 arch/x86/include/asm/config.h           |  2 --
 include/configs/tegra-common.h          |  4 ----
 lib/Kconfig                             | 11 +++++++++++
 6 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index bf26764..f63cc5a 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -7,6 +7,7 @@ config ARC
 
 config ARM
 	bool "ARM architecture"
+	select HAVE_PRIVATE_LIBGCC
 	select SUPPORT_OF_CONTROL
 
 config AVR32
@@ -24,6 +25,7 @@ config MICROBLAZE
 
 config MIPS
 	bool "MIPS architecture"
+	select HAVE_PRIVATE_LIBGCC
 
 config NDS32
 	bool "NDS32 architecture"
@@ -36,6 +38,7 @@ config OPENRISC
 
 config PPC
 	bool "PowerPC architecture"
+	select HAVE_PRIVATE_LIBGCC
 
 config SANDBOX
 	bool "Sandbox"
@@ -43,12 +46,14 @@ config SANDBOX
 
 config SH
 	bool "SuperH architecture"
+	select HAVE_PRIVATE_LIBGCC
 
 config SPARC
 	bool "SPARC architecture"
 
 config X86
 	bool "x86 architecture"
+	select HAVE_PRIVATE_LIBGCC
 	select SUPPORT_OF_CONTROL
 
 endchoice
diff --git a/arch/arm/cpu/armv7/tegra-common/Kconfig b/arch/arm/cpu/armv7/tegra-common/Kconfig
index bcae2d6..3ea6d76 100644
--- a/arch/arm/cpu/armv7/tegra-common/Kconfig
+++ b/arch/arm/cpu/armv7/tegra-common/Kconfig
@@ -17,6 +17,9 @@ config TEGRA124
 
 endchoice
 
+config USE_PRIVATE_LIBGCC
+	default y if SPL_BUILD
+
 config SYS_CPU
 	default "arm720t" if SPL_BUILD
 	default "armv7" if !SPL_BUILD
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index ff9935a..0dba8ac 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -4,6 +4,9 @@ menu "x86 architecture"
 config SYS_ARCH
 	default "x86"
 
+config USE_PRIVATE_LIBGCC
+	default y
+
 choice
 	prompt "Target select"
 
diff --git a/arch/x86/include/asm/config.h b/arch/x86/include/asm/config.h
index 6827424..dd1329e 100644
--- a/arch/x86/include/asm/config.h
+++ b/arch/x86/include/asm/config.h
@@ -9,6 +9,4 @@
 
 #define CONFIG_SYS_GENERIC_BOARD
 
-#define CONFIG_USE_PRIVATE_LIBGCC
-
 #endif
diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h
index 834b3d5..c7b2778 100644
--- a/include/configs/tegra-common.h
+++ b/include/configs/tegra-common.h
@@ -152,10 +152,6 @@
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_GPIO_SUPPORT
 
-#ifdef CONFIG_SPL_BUILD
-# define CONFIG_USE_PRIVATE_LIBGCC
-#endif
-
 #define CONFIG_SYS_GENERIC_BOARD
 
 /* Misc utility code */
diff --git a/lib/Kconfig b/lib/Kconfig
index a889c22..8460439 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -8,6 +8,17 @@ config CC_OPTIMIZE_LIBS_FOR_SPEED
 
 	  If unsure, say N.
 
+config HAVE_PRIVATE_LIBGCC
+	bool
+
+config USE_PRIVATE_LIBGCC
+	bool "Use private libgcc"
+	depends on HAVE_PRIVATE_LIBGCC
+	help
+	  This option allows you to use the built-in libgcc implementation
+	  of U-boot instead of the one privided by the compiler.
+	  If unsure, say N.
+
 config SYS_HZ
 	int
 	default 1000
-- 
1.9.1



More information about the U-Boot mailing list