config/config.mk
author "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
Wed Dec 14 16:55:22 2011 +0100 (2011-12-14)
branch1.13
changeset 2848 1ff89596dab0
parent 2529 7e191964d8f2
child 2981 80151a249b85
permissions -rw-r--r--
libc/eglibc: fix localedef 2.14 build

The localedef of eglibc 2.14 requires NOT_IN_libc to be defined in order to
compile intl/l10nflist.c.

This is because localedef is built separately from eglibc and uses some parts of
eglibc that don't compile in standalone without this preprocessor definition.

This fixes the following error:

[ALL ] gcc -g -O2 -DNO_SYSCONF -DNO_UNCOMPRESS
-DLOCALE_PATH='"/usr/lib/locale:/usr/share/i18n"'
-DLOCALEDIR='"/usr/lib/locale"' -DLOCALE_ALIAS_PATH='"/usr/share/locale"'
-DCHARMAP_PATH='"/usr/share/i18n/charmaps"'
-DREPERTOIREMAP_PATH='"/usr/share/i18n/repertoiremaps"'
-DLOCSRCDIR='"/usr/share/i18n/locales"' -Iglibc/locale/programs -Iglibc/locale
-I/<snip>/.build/src/eglibc-localedef-2_14/include
-I/<snip>/.build/src/eglibc-localedef-2_14 -I.
-include /<snip>/.build/src/eglibc-localedef-2_14/include/always.h -Wall
-Wno-format -c -o locarchive.o glibc/locale/programs/locarchive.c
[ALL ] glibc/locale/programs/locarchive.c: In function 'enlarge_archive':
[ALL ] glibc/locale/programs/locarchive.c:303:21: warning: variable
'oldlocrectab' set but not used [-Wunused-but-set-variable]
[ALL ] In file included from glibc/locale/programs/locarchive.c:651:0:
[ALL ] glibc/locale/programs/../../intl/l10nflist.c: In function
'_nl_normalize_codeset':
[ERROR] glibc/locale/programs/../../intl/l10nflist.c:342:9: error:
'_nl_C_locobj_ptr' undeclared (first use in this function)
[ALL ] glibc/locale/programs/../../intl/l10nflist.c:342:9: note: each
undeclared identifier is reported only once for each function it appears in
[ALL ] glibc/locale/programs/locarchive.c: In function
'add_locales_to_archive':
[ALL ] glibc/locale/programs/locarchive.c:1450:7: warning: passing argument
1 of '__xpg_basename' discards 'const' qualifier from pointer target type
[enabled by default]
[ALL ] /usr/include/libgen.h:35:14: note: expected 'char *' but argument is
of type 'const char *'
[ERROR] make[1]: *** [locarchive.o] Error 1

Signed-off-by: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
(transplanted from 4cd9134739b594451794cf61a6e1b137422cdafd)
     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 KCONFIG_TOP = config/config.in
    10 
    11 # Build the list of all source config files
    12 STATIC_CONFIG_FILES = $(patsubst $(CT_LIB_DIR)/%,%,$(shell find $(CT_LIB_DIR)/config -type f \( -name '*.in' -o -name '*.in.2' \) 2>/dev/null))
    13 # ... and how to access them:
    14 $(STATIC_CONFIG_FILES): config
    15 
    16 # Build a list of per-component-type source config files
    17 ARCH_CONFIG_FILES     = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/arch/*.in))
    18 ARCH_CONFIG_FILES_2   = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/arch/*.in.2))
    19 KERNEL_CONFIG_FILES   = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/kernel/*.in))
    20 KERNEL_CONFIG_FILES_2 = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/kernel/*.in.2))
    21 CC_CONFIG_FILES       = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/cc/*.in))
    22 CC_CONFIG_FILES_2     = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/cc/*.in.2))
    23 LIBC_CONFIG_FILES     = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/libc/*.in))
    24 LIBC_CONFIG_FILES_2   = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/libc/*.in.2))
    25 DEBUG_CONFIG_FILES    = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/debug/*.in))
    26 
    27 # Build the list of generated config files
    28 GEN_CONFIG_FILES = config.gen/arch.in     \
    29                    config.gen/kernel.in   \
    30                    config.gen/cc.in       \
    31                    config.gen/libc.in     \
    32                    config.gen/debug.in
    33 # ... and how to access them:
    34 # Generated files depends on the gen_in_frags script because it has the
    35 # functions needed to build the genrated files, and thus they might need
    36 # re-generation if it changes.
    37 # They also depends on config.mk (this file) because it has the dependency
    38 # rules, and thus they might need re-generation if the deps change.
    39 $(GEN_CONFIG_FILES): config.gen                             \
    40                      $(CT_LIB_DIR)/scripts/gen_in_frags.sh  \
    41                      $(CT_LIB_DIR)/config/config.mk
    42 
    43 # Helper entry for the configurators
    44 PHONY += config_files
    45 config_files: $(STATIC_CONFIG_FILES) $(GEN_CONFIG_FILES)
    46 
    47 # Where to access to the source config files from
    48 config:
    49 	@$(ECHO) "  LN    config"
    50 	$(SILENT)ln -s $(CT_LIB_DIR)/config config
    51 
    52 # Where to store the generated config files into
    53 config.gen:
    54 	@$(ECHO) "  MKDIR config.gen"
    55 	$(SILENT)mkdir -p config.gen
    56 
    57 #-----------------------------------------------------------
    58 # Build list of per-component-type items to easily build generated files
    59 
    60 ARCHS   = $(patsubst config/arch/%.in,%,$(ARCH_CONFIG_FILES))
    61 KERNELS = $(patsubst config/kernel/%.in,%,$(KERNEL_CONFIG_FILES))
    62 CCS     = $(patsubst config/cc/%.in,%,$(CC_CONFIG_FILES))
    63 LIBCS   = $(patsubst config/libc/%.in,%,$(LIBC_CONFIG_FILES))
    64 DEBUGS  = $(patsubst config/debug/%.in,%,$(DEBUG_CONFIG_FILES))
    65 
    66 #-----------------------------------------------------------
    67 # The rules for the generated config files
    68 
    69 # WARNING! If a .in file disapears between two runs, that will NOT be detected!
    70 
    71 config.gen/arch.in: $(ARCH_CONFIG_FILES) $(ARCH_CONFIG_FILES_2)
    72 	@$(ECHO) '  IN    $(@)'
    73 	$(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh choice "$@" "Target Architecture" "ARCH" "config/arch" "Y" $(ARCHS)
    74 
    75 config.gen/kernel.in: $(KERNEL_CONFIG_FILES) $(KERNEL_CONFIG_FILES_2)
    76 	@$(ECHO) '  IN    $(@)'
    77 	$(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh choice "$@" "Target OS" "KERNEL" "config/kernel" "Y" $(KERNELS)
    78 
    79 config.gen/cc.in: $(CC_CONFIG_FILES) $(CC_CONFIG_FILES_2)
    80 	@$(ECHO) '  IN    $(@)'
    81 	$(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh choice "$@" "C compiler" "CC" "config/cc" "N" $(CCS)
    82 
    83 config.gen/libc.in: $(LIBC_CONFIG_FILES) $(LIBC_CONFIG_FILES_2)
    84 	@$(ECHO) '  IN    $(@)'
    85 	$(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh choice "$@" "C library" "LIBC" "config/libc" "Y" $(LIBCS)
    86 
    87 config.gen/debug.in: $(DEBUG_CONFIG_FILES)
    88 	@$(ECHO) '  IN    $(@)'
    89 	$(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh menu "$@" "Debug facilities" "DEBUG" "config/debug" $(DEBUGS)
    90 
    91 #-----------------------------------------------------------
    92 # Cleaning up the mess...
    93 
    94 clean::
    95 	@$(ECHO) "  CLEAN config"
    96 	$(SILENT)rm -f config 2>/dev/null || true
    97 	@$(ECHO) "  CLEAN config.gen"
    98 	$(SILENT)rm -rf config.gen