patches/uClibc/0.9.32/140-ARM-reorder-Use-BX-option.patch
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
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 commit d64b91a6d4fa1a3ac1d01fa7593d67c5e5ed5101
     2 Author: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
     3 Date:   Sun Jan 9 01:45:04 2011 +0100
     4 
     5     ARM: reorder "Use BX" option
     6     
     7     "Use BX" is not available on all CPUs, so the option depends on
     8     a correct CPU to be chosen . It is weird that e BX" then appears
     9     _above_ the CPU selection, not below.
    10     
    11     Move the "Use BX" after the CPU selection.
    12     
    13     Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
    14     Cc: Khem Raj <raj.khem@gmail.com>
    15     Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
    16     Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
    17     Signed-off-by: Khem Raj <raj.khem@gmail.com>
    18     Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
    19 
    20 diff --git a/extra/Configs/Config.arm b/extra/Configs/Config.arm
    21 index eb27a33..dd63b80 100644
    22 --- a/extra/Configs/Config.arm
    23 +++ b/extra/Configs/Config.arm
    24 @@ -30,13 +30,6 @@ config CONFIG_ARM_EABI
    25  
    26  endchoice
    27  
    28 -config USE_BX
    29 -	bool "Use BX in function return"
    30 -	default y
    31 -	depends on !CONFIG_GENERIC_ARM && !CONFIG_ARM610 && !CONFIG_ARM710
    32 -	help
    33 -	  Use BX instruction for THUMB aware architectures.
    34 -
    35  choice
    36  	prompt "Target Processor Type"
    37  	default CONFIG_GENERIC_ARM
    38 @@ -131,3 +124,10 @@ config CONFIG_ARM_IWMMXT
    39  	select ARCH_HAS_MMU
    40  
    41  endchoice
    42 +
    43 +config USE_BX
    44 +	bool "Use BX in function return"
    45 +	default y
    46 +	depends on !CONFIG_GENERIC_ARM && !CONFIG_ARM610 && !CONFIG_ARM710
    47 +	help
    48 +	  Use BX instruction for THUMB aware architectures.