config/config.mk
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Mon Dec 30 19:08:37 2013 +0100 (2013-12-30)
changeset 3257 7b7d953f9cfb
parent 3123 6a5946fbc728
child 3325 069f43a215cc
permissions -rw-r--r--
binutils/binutils: 2.23.2 is a 2_23_or_later (ie. has gold)

Thus spake Niels:
This commit adds support for binutils 2.23.2

http://crosstool-ng.org/hg/crosstool-ng/rev/bc4b36e3df0c

However, in 'config/binutils/binutils.in <http://binutils.in>' the
Kconfig option to select this version of binutils does not automatically
select the symbol 'BINUTILS_2_23_or_later'. This makes gold unavailable
for the latest version of binutils. I'm not sure whether this is on
purpose or not, my impression is that you forgot to add the line "select
BINUTILS_2_23_or_later".

The problem still persists in the latest version in the repository
(032ebcc89c96).

Reported-by: Niels Penneman <niels@penneman.org>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
     1 # ===========================================================================
     2 # crosstool-NG genererated config files
     3 # These targets are used from top-level makefile
     4 
     5 #-----------------------------------------------------------
     6 # List all config files, wether sourced or generated
     7 
     8 # The top-level config file to be used be configurators
     9 # We need it to savedefconfig in scripts/saveSample.sh
    10 export KCONFIG_TOP = config/config.in
    11 
    12 # Build the list of all source config files
    13 STATIC_CONFIG_FILES = $(patsubst $(CT_LIB_DIR)/%,%,$(shell find $(CT_LIB_DIR)/config -type f \( -name '*.in' -o -name '*.in.2' \) 2>/dev/null))
    14 # ... and how to access them:
    15 $(STATIC_CONFIG_FILES): config
    16 
    17 # Build a list of per-component-type source config files
    18 ARCH_CONFIG_FILES       = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/arch/*.in))
    19 ARCH_CONFIG_FILES_2     = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/arch/*.in.2))
    20 KERNEL_CONFIG_FILES     = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/kernel/*.in))
    21 KERNEL_CONFIG_FILES_2   = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/kernel/*.in.2))
    22 CC_CONFIG_FILES         = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/cc/*.in))
    23 CC_CONFIG_FILES_2       = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/cc/*.in.2))
    24 BINUTILS_CONFIG_FILES   = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/binutils/*.in))
    25 BINUTILS_CONFIG_FILES_2 = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/binutils/*.in.2))
    26 LIBC_CONFIG_FILES       = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/libc/*.in))
    27 LIBC_CONFIG_FILES_2     = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/libc/*.in.2))
    28 DEBUG_CONFIG_FILES      = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/debug/*.in))
    29 
    30 # Build the list of generated config files
    31 GEN_CONFIG_FILES = config.gen/arch.in     \
    32                    config.gen/kernel.in   \
    33                    config.gen/cc.in       \
    34                    config.gen/binutils.in \
    35                    config.gen/libc.in     \
    36                    config.gen/debug.in
    37 # ... and how to access them:
    38 # Generated files depends on the gen_in_frags script because it has the
    39 # functions needed to build the genrated files, and thus they might need
    40 # re-generation if it changes.
    41 # They also depends on config.mk (this file) because it has the dependency
    42 # rules, and thus they might need re-generation if the deps change.
    43 $(GEN_CONFIG_FILES): config.gen                             \
    44                      $(CT_LIB_DIR)/scripts/gen_in_frags.sh  \
    45                      $(CT_LIB_DIR)/config/config.mk
    46 
    47 # Helper entry for the configurators
    48 PHONY += config_files
    49 config_files: $(STATIC_CONFIG_FILES) $(GEN_CONFIG_FILES)
    50 
    51 # Where to access to the source config files from
    52 config:
    53 	@$(ECHO) "  LN    config"
    54 	$(SILENT)ln -s $(CT_LIB_DIR)/config config
    55 
    56 # Where to store the generated config files into
    57 config.gen:
    58 	@$(ECHO) "  MKDIR config.gen"
    59 	$(SILENT)mkdir -p config.gen
    60 
    61 #-----------------------------------------------------------
    62 # Build list of per-component-type items to easily build generated files
    63 
    64 ARCHS     = $(patsubst config/arch/%.in,%,$(ARCH_CONFIG_FILES))
    65 KERNELS   = $(patsubst config/kernel/%.in,%,$(KERNEL_CONFIG_FILES))
    66 CCS       = $(patsubst config/cc/%.in,%,$(CC_CONFIG_FILES))
    67 BINUTILSS = $(patsubst config/binutils/%.in,%,$(BINUTILS_CONFIG_FILES))
    68 LIBCS     = $(patsubst config/libc/%.in,%,$(LIBC_CONFIG_FILES))
    69 DEBUGS    = $(patsubst config/debug/%.in,%,$(DEBUG_CONFIG_FILES))
    70 
    71 #-----------------------------------------------------------
    72 # The rules for the generated config files
    73 
    74 # WARNING! If a .in file disapears between two runs, that will NOT be detected!
    75 
    76 config.gen/arch.in: $(ARCH_CONFIG_FILES) $(ARCH_CONFIG_FILES_2)
    77 	@$(ECHO) '  IN    $(@)'
    78 	$(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh choice "$@" "Target Architecture" "ARCH" "config/arch" "Y" $(ARCHS)
    79 
    80 config.gen/kernel.in: $(KERNEL_CONFIG_FILES) $(KERNEL_CONFIG_FILES_2)
    81 	@$(ECHO) '  IN    $(@)'
    82 	$(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh choice "$@" "Target OS" "KERNEL" "config/kernel" "Y" $(KERNELS)
    83 
    84 config.gen/cc.in: $(CC_CONFIG_FILES) $(CC_CONFIG_FILES_2)
    85 	@$(ECHO) '  IN    $(@)'
    86 	$(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh choice "$@" "C compiler" "CC" "config/cc" "N" $(CCS)
    87 
    88 config.gen/binutils.in: $(CC_BINUTILS_FILES) $(CC_BINUTILS_FILES_2)
    89 	@$(ECHO) '  IN    $(@)'
    90 	$(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh choice "$@" "Binutils" "BINUTILS" "config/binutils" "N" $(BINUTILSS)
    91 
    92 config.gen/libc.in: $(LIBC_CONFIG_FILES) $(LIBC_CONFIG_FILES_2)
    93 	@$(ECHO) '  IN    $(@)'
    94 	$(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh choice "$@" "C library" "LIBC" "config/libc" "Y" $(LIBCS)
    95 
    96 config.gen/debug.in: $(DEBUG_CONFIG_FILES)
    97 	@$(ECHO) '  IN    $(@)'
    98 	$(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh menu "$@" "Debug facilities" "DEBUG" "config/debug" $(DEBUGS)
    99 
   100 #-----------------------------------------------------------
   101 # Cleaning up the mess...
   102 
   103 clean::
   104 	@$(ECHO) "  CLEAN config"
   105 	$(SILENT)rm -f config 2>/dev/null || true
   106 	@$(ECHO) "  CLEAN config.gen"
   107 	$(SILENT)rm -rf config.gen