kconfig: move CONFIG_USE_PRIVATE_LIBGCC to Kconfig
authorMasahiro Yamada <yamada.m@jp.panasonic.com>
Thu, 23 Oct 2014 16:30:43 +0000 (01:30 +0900)
committerTom Rini <trini@ti.com>
Thu, 23 Oct 2014 17:19:09 +0000 (13:19 -0400)
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@jp.panasonic.com>
Tested-by: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Tom Warren <twarren@nvidia.com>
arch/Kconfig
arch/arm/cpu/armv7/tegra-common/Kconfig
arch/x86/Kconfig
arch/x86/include/asm/config.h
include/configs/tegra-common.h
lib/Kconfig

index bf2676469c7131dd924139cf42dd392b0902bbc3..f63cc5a7e9440416c351e612eb5c8615693aa037 100644 (file)
@@ -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
index bcae2d60334c9f6999073ce96dc1c74b35a1cb6a..3ea6d7651cb7fd87af753248aa91465a8e95863a 100644 (file)
@@ -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
index ff9935acc4fcbe9522ce3b7bd282baf13880fa88..0dba8acbb2b320671541c939c739b98402f100b9 100644 (file)
@@ -4,6 +4,9 @@ menu "x86 architecture"
 config SYS_ARCH
        default "x86"
 
+config USE_PRIVATE_LIBGCC
+       default y
+
 choice
        prompt "Target select"
 
index fedcaeacdab6f792fc9800327421aaf9bcc01a80..ff15828a713de5d1258aada2dc5aa599734ca900 100644 (file)
@@ -11,6 +11,4 @@
 #define CONFIG_LMB
 #define CONFIG_SYS_BOOT_RAMDISK_HIGH
 
-#define CONFIG_USE_PRIVATE_LIBGCC
-
 #endif
index 4719ee10aeeca8810c25bad2392e2dff6875f422..981a8d2adb8b59b08c2ac7e2b75a538f218b02f8 100644 (file)
 #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 */
index a889c229cb52f3e003afc506df418751019ba454..8460439d8e772d4126b78ad616059dd38a7dabff 100644 (file)
@@ -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