diff options
author | Simon Pasch <fpasch@googlemail.com> | 2009-11-06 20:17:30 +0100 |
---|---|---|
committer | Simon Pasch <fpasch@googlemail.com> | 2009-11-06 20:17:30 +0100 |
commit | a4980248f30e4c16cdbe914b93cb45916b22faae (patch) | |
tree | 82591169eeb264100fdaa0fdd2734659c8148a09 | |
parent | d5eb1f0dcf96e4f0a3bd8eb203de513200d99514 (diff) | |
download | crosstool-ng-a4980248f30e4c16cdbe914b93cb45916b22faae.tar.gz crosstool-ng-a4980248f30e4c16cdbe914b93cb45916b22faae.tar.bz2 crosstool-ng-a4980248f30e4c16cdbe914b93cb45916b22faae.zip |
libc/uClibc: add wchar support
-rw-r--r-- | config/libc/uClibc.in | 10 | ||||
-rw-r--r-- | scripts/build/libc/uClibc.sh | 13 |
2 files changed, 21 insertions, 2 deletions
diff --git a/config/libc/uClibc.in b/config/libc/uClibc.in index d38f83d3..e71abce8 100644 --- a/config/libc/uClibc.in +++ b/config/libc/uClibc.in @@ -136,9 +136,19 @@ config LIBC_UCLIBC_CONFIG_FILE config LIBC_UCLIBC_LOCALES bool + select LIBC_UCLIBC_WCHAR prompt "Add support for locales" default n help Say y if you want uClibc to support localisation. Note that seems to be broken on recent uClibc releases. + +config LIBC_UCLIBC_WCHAR + bool + prompt "Add support for WCHAR" + default n + help + Say y if you want uClibc to support WCHAR. + + Maybe this is needed, if you're building a C++-Compiler diff --git a/scripts/build/libc/uClibc.sh b/scripts/build/libc/uClibc.sh index 1465e012..57ee2919 100644 --- a/scripts/build/libc/uClibc.sh +++ b/scripts/build/libc/uClibc.sh @@ -292,14 +292,23 @@ s/^# UCLIBC_HAS_LOCALE is not set/UCLIBC_HAS_LOCALE=y\\nUCLIBC_PREGENERATED_LOCA ENDSED fi + # WCHAR support + if [ "${CT_LIBC_UCLIBC_WCHAR}" = "y" ] ; then + cat >>"${munge_file}" <<-ENDSED +s/^.*UCLIBC_HAS_WCHAR.*/UCLIBC_HAS_WCHAR=y/ +ENDSED + else + cat >>"${munge_file}" <<-ENDSED +s/^.*UCLIBC_HAS_WCHAR.*/UCLIBC_HAS_WCHAR=n/ +ENDSED + fi + # Force on options needed for C++ if we'll be making a C++ compiler. # I'm not sure locales are a requirement for doing C++... Are they? if [ "${CT_CC_LANG_CXX}" = "y" ]; then cat >>"${munge_file}" <<-ENDSED s/^# DO_C99_MATH is not set/DO_C99_MATH=y/ s/^# UCLIBC_CTOR_DTOR is not set/UCLIBC_CTOR_DTOR=y/ -# Add these three lines when doing C++? -s/^# UCLIBC_HAS_WCHAR is not set/UCLIBC_HAS_WCHAR=y/ #s/^# UCLIBC_HAS_LOCALE is not set/UCLIBC_HAS_LOCALE=y\\nUCLIBC_PREGENERATED_LOCALE_DATA=y\\n\\# UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA is not set\\n\\# UCLIBC_HAS_XLOCALE is not set/ s/^# UCLIBC_HAS_GNU_GETOPT is not set/UCLIBC_HAS_GNU_GETOPT=y/ ENDSED |