Generate the choice menu for C compilers, the same way arch, kernels and C libraries are generated.
/trunk/kconfig/kconfig.mk | 6 6 0 0 ++++++
/trunk/config/cc/gcc.in | 13 13 0 0 +++++++++++++
/trunk/config/cc.in | 31 3 28 0 +++----------------------------
3 files changed, 22 insertions(+), 28 deletions(-)
1.1 --- a/config/cc.in Mon Oct 13 11:23:51 2008 +0000
1.2 +++ b/config/cc.in Mon Oct 13 16:58:52 2008 +0000
1.3 @@ -2,38 +2,13 @@
1.4
1.5 menu "C compiler"
1.6
1.7 -choice
1.8 - bool
1.9 - prompt "C compiler flavour"
1.10 - default CC_GCC
1.11 -
1.12 -config CC_GCC
1.13 - bool
1.14 - prompt "gcc"
1.15 - select CC_SUPPORT_CXX
1.16 - select CC_SUPPORT_FORTRAN
1.17 - select CC_SUPPORT_JAVA
1.18 - select CC_SUPPORT_ADA
1.19 - select CC_SUPPORT_OBJC
1.20 - select CC_SUPPORT_OBJCXX
1.21 - help
1.22 - gcc is the full-blown GNU compiler. This is what most people will choose.
1.23 -
1.24 - gcc supports many languages, a powerful code parser, optimised binary
1.25 - output, and lots of other features.
1.26 -
1.27 -endchoice
1.28 +config CC
1.29 + string
1.30
1.31 config CC_VERSION
1.32 string
1.33
1.34 -config CC
1.35 - string
1.36 - default "gcc" if CC_GCC
1.37 -
1.38 -if CC_GCC
1.39 -source config/cc/gcc.in
1.40 -endif
1.41 +source config.gen/cc.in
1.42
1.43 config CC_SUPPORT_CXX
1.44 bool
2.1 --- a/config/cc/gcc.in Mon Oct 13 11:23:51 2008 +0000
2.2 +++ b/config/cc/gcc.in Mon Oct 13 16:58:52 2008 +0000
2.3 @@ -1,5 +1,18 @@
2.4 # Compiler options
2.5
2.6 +config CC_gcc
2.7 + select CC_SUPPORT_CXX
2.8 + select CC_SUPPORT_FORTRAN
2.9 + select CC_SUPPORT_JAVA
2.10 + select CC_SUPPORT_ADA
2.11 + select CC_SUPPORT_OBJC
2.12 + select CC_SUPPORT_OBJCXX
2.13 + help
2.14 + gcc is the full-blown GNU compiler. This is what most people will choose.
2.15 +
2.16 + gcc supports many languages, a powerful code parser, optimised binary
2.17 + output, and lots of other features.
2.18 +
2.19 choice
2.20 bool
2.21 prompt "gcc version"
3.1 --- a/kconfig/kconfig.mk Mon Oct 13 11:23:51 2008 +0000
3.2 +++ b/kconfig/kconfig.mk Mon Oct 13 16:58:52 2008 +0000
3.3 @@ -21,6 +21,7 @@
3.4 # Build a list of all config files
3.5 ARCH_CONFIG_FILES = $(wildcard $(CT_LIB_DIR)/config/arch/*.in)
3.6 KERNEL_CONFIG_FILES = $(wildcard $(CT_LIB_DIR)/config/kernel/*.in)
3.7 +CC_CONFIG_FILES = $(wildcard $(CT_LIB_DIR)/config/cc/*.in)
3.8 LIBC_CONFIG_FILES = $(wildcard $(CT_LIB_DIR)/config/libc/*.in)
3.9 DEBUG_CONFIG_FILES = $(wildcard $(CT_LIB_DIR)/config/debug/*.in)
3.10 TOOL_CONFIG_FILES = $(wildcard $(CT_LIB_DIR)/config/tools/*.in)
3.11 @@ -28,6 +29,7 @@
3.12 STATIC_CONFIG_FILES = $(shell find $(CT_LIB_DIR)/config -type f -name '*.in')
3.13 GEN_CONFIG_FILES=$(CT_TOP_DIR)/config.gen/arch.in \
3.14 $(CT_TOP_DIR)/config.gen/kernel.in \
3.15 + $(CT_TOP_DIR)/config.gen/cc.in \
3.16 $(CT_TOP_DIR)/config.gen/libc.in \
3.17 $(CT_TOP_DIR)/config.gen/tools.in \
3.18 $(CT_TOP_DIR)/config.gen/debug.in
3.19 @@ -37,6 +39,7 @@
3.20 # Build list of items
3.21 ARCHS = $(patsubst $(CT_LIB_DIR)/config/arch/%.in,%,$(ARCH_CONFIG_FILES))
3.22 KERNELS = $(patsubst $(CT_LIB_DIR)/config/kernel/%.in,%,$(KERNEL_CONFIG_FILES))
3.23 +CCS = $(patsubst $(CT_LIB_DIR)/config/cc/%.in,%,$(CC_CONFIG_FILES))
3.24 LIBCS = $(patsubst $(CT_LIB_DIR)/config/libc/%.in,%,$(LIBC_CONFIG_FILES))
3.25 DEBUGS = $(patsubst $(CT_LIB_DIR)/config/debug/%.in,%,$(DEBUG_CONFIG_FILES))
3.26 TOOLS = $(patsubst $(CT_LIB_DIR)/config/tools/%.in,%,$(TOOL_CONFIG_FILES))
3.27 @@ -99,6 +102,9 @@
3.28 $(CT_TOP_DIR)/config.gen/kernel.in: $(KERNEL_CONFIG_FILES)
3.29 $(call build_gen_choice_in,$(patsubst $(CT_TOP_DIR)/%,%,$@),Target OS,KERNEL,config/kernel,$(KERNELS))
3.30
3.31 +$(CT_TOP_DIR)/config.gen/cc.in: $(CC_CONFIG_FILES)
3.32 + $(call build_gen_choice_in,$(patsubst $(CT_TOP_DIR)/%,%,$@),C compiler,CC,config/cc,$(CCS))
3.33 +
3.34 $(CT_TOP_DIR)/config.gen/libc.in: $(LIBC_CONFIG_FILES)
3.35 $(call build_gen_choice_in,$(patsubst $(CT_TOP_DIR)/%,%,$@),C library,LIBC,config/libc,$(LIBCS))
3.36