[uClibc] locale support

John Vogel johnv at infoblvd.net
Thu Jul 1 01:34:28 UTC 2004


on Tue, 29 Jun 2004 at 11:56, Seb James wrote:
>Hello,
>
>Has anyone recently done a uclibc buildroot build with the variable =
>
>
>ENABLE_LOCALE:=3Dtrue
>
>to get locale support in uclibc?
>
>(NB, I am doing this on x86/x86 as it's known not to work on other
>arches)
>
>I'm getting a few errors and wondered if uclibc locale support is in
>common use or not.
>
>Seb James

This is a fragment out of my modified toolchain build makefiles:

# The recursive make into $(UCLIBC_SRC)/extra/locale depends on the
# system being set up for a en_US.UTF-8 locale. To do this, you'll
# need to be on a glibc based system or some other that has the
# en_US locale and the UTF-8 charmap, then issue (AS ROOT):
#	localedef -i en_US -f UTF-8 en_US.UTF-8
$(UCLIBC_SRC)/.uclibc_pregen_installed: $(UCLIBC_SRC)/Rules.make
	if [ -f $(UCLIBC_SRC)/.config ]; then $(rm_prog) $(UCLIBC_SRC)/.config ; fi
	$(MAKE) -C $(UCLIBC_SRC) defconfig
	$(sed_prog) -e 's|@@path_to_kernel_src@@|$(KERNEL_SRC)|' \
		$(SCRIPTS)/uclibcconf.sed.in > uclibcconf.sed
	$(sed_prog) -f uclibcconf.sed $(UCLIBC_SRC)/.config > config.new
	$(mv_prog) config.new $(UCLIBC_SRC)/.config
	$(rm_prog) -f uclibcconf.sed
	$(cp_prog) $(ETC)/locales.txt $(UCLIBC_SRC)/extra/locale/
	$(cp_prog) $(ETC)/codesets.txt $(UCLIBC_SRC)/extra/locale/
	$(MAKE) -C $(UCLIBC_SRC) oldconfig
	$(MAKE) -C $(UCLIBC_SRC) headers
	$(MAKE) -C $(UCLIBC_SRC)/extra/locale
	$(MAKE) -C $(UCLIBC_SRC) \
		PREFIX=$(TOOLCHAIN)/ \
		DEVEL_PREFIX=$(CROSSMACHINE)/ \
		RUNTIME_PREFIX=$(CROSSMACHINE)/ \
		pregen install_dev
	$(touch_prog) $@

This is how I do get the locales setup when I build. I works for me, though
your mileage may vary. The makefiles and patches I use are modified from
the toolchain by Erik. Currently my toolchain uses:

uClibc-20040619
binutils-2.15.91.0.1
gcc-3.3.4 (core & g++ modules only)
flex (to get libfl.a as a cross tool library)
ncurses-5.4-20040605 (no c++ enabled)

This is what my uClibc .config file looks like for the build:

#
# Automatically generated make config: don't edit
#
# TARGET_alpha is not set
# TARGET_arm is not set
# TARGET_cris is not set
# TARGET_e1 is not set
# TARGET_frv is not set
# TARGET_h8300 is not set
TARGET_i386=y
# TARGET_i960 is not set
# TARGET_m68k is not set
# TARGET_microblaze is not set
# TARGET_mips is not set
# TARGET_powerpc is not set
# TARGET_sh is not set
# TARGET_sparc is not set
# TARGET_v850 is not set

#
# Target Architecture Features and Options
#
HAVE_ELF=y
ARCH_SUPPORTS_LITTLE_ENDIAN=y
TARGET_ARCH="i386"
CONFIG_GENERIC_386=y
# CONFIG_386 is not set
# CONFIG_486 is not set
# CONFIG_586 is not set
# CONFIG_586MMX is not set
# CONFIG_686 is not set
# CONFIG_PENTIUMII is not set
# CONFIG_PENTIUMIII is not set
# CONFIG_PENTIUM4 is not set
# CONFIG_K6 is not set
# CONFIG_K7 is not set
# CONFIG_ELAN is not set
# CONFIG_CRUSOE is not set
# CONFIG_WINCHIPC6 is not set
# CONFIG_WINCHIP2 is not set
# CONFIG_CYRIXIII is not set
# CONFIG_NEHEMIAH is not set
ARCH_LITTLE_ENDIAN=y
# ARCH_BIG_ENDIAN is not set
# ARCH_HAS_NO_MMU is not set
ARCH_HAS_MMU=y
UCLIBC_HAS_FLOATS=y
HAS_FPU=y
# DO_C99_MATH is not set
WARNINGS="-Wall"
KERNEL_SOURCE="/toolchain/builds/linux-2.4.26"
C_SYMBOL_PREFIX=""
HAVE_DOT_CONFIG=y

#
# General Library Settings
#
# HAVE_NO_PIC is not set
DOPIC=y
# HAVE_NO_SHARED is not set
HAVE_SHARED=y
# ARCH_HAS_NO_LDSO is not set
BUILD_UCLIBC_LDSO=y
# FORCE_SHAREABLE_TEXT_SEGMENTS is not set
# UCLIBC_PIE_SUPPORT is not set
LDSO_LDD_SUPPORT=y
UCLIBC_CTOR_DTOR=y
# UCLIBC_PROPOLICE is not set
# UCLIBC_PROFILING is not set
# HAS_NO_THREADS is not set
UCLIBC_HAS_THREADS=y
# PTHREADS_DEBUG_SUPPORT is not set
UCLIBC_HAS_LFS=y
# MALLOC is not set
# MALLOC_SIMPLE is not set
MALLOC_STANDARD=y
MALLOC_GLIBC_COMPAT=y
UCLIBC_DYNAMIC_ATEXIT=y
HAS_SHADOW=y
# UNIX98PTY_ONLY is not set
ASSUME_DEVPTS=y
UCLIBC_HAS_TM_EXTENSIONS=y
UCLIBC_HAS_TZ_CACHING=y
UCLIBC_HAS_TZ_FILE=y
UCLIBC_HAS_TZ_FILE_READ_MANY=y
UCLIBC_TZ_FILE_PATH="/etc/TZ"

#
# Networking Support
#
UCLIBC_HAS_IPV6=y
UCLIBC_HAS_RPC=y
UCLIBC_HAS_FULL_RPC=y

#
# String and Stdio Support
#
UCLIBC_HAS_CTYPE_TABLES=y
UCLIBC_HAS_CTYPE_SIGNED=y
# UCLIBC_HAS_CTYPE_UNSAFE is not set
UCLIBC_HAS_CTYPE_CHECKED=y
# UCLIBC_HAS_CTYPE_ENFORCED is not set
UCLIBC_HAS_WCHAR=y
UCLIBC_HAS_LOCALE=y
# UCLIBC_PREGENERATED_LOCALE_DATA is not set
UCLIBC_HAS_XLOCALE=y
UCLIBC_HAS_HEXADECIMAL_FLOATS=y
UCLIBC_HAS_GLIBC_DIGIT_GROUPING=y
UCLIBC_HAS_SCANF_LENIENT_DIGIT_GROUPING=y
UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y
UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9
UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y
# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set
# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set
# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set
# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set
# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set
UCLIBC_HAS_STDIO_BUFSIZ_4096=y
# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set
UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y
# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set
# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set
UCLIBC_HAS_STDIO_GETC_MACRO=y
UCLIBC_HAS_STDIO_PUTC_MACRO=y
UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y
# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set
UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y
UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
UCLIBC_HAS_PRINTF_M_SPEC=y
UCLIBC_HAS_ERRNO_MESSAGES=y
UCLIBC_HAS_SYS_ERRLIST=y
UCLIBC_HAS_SIGNUM_MESSAGES=y
UCLIBC_HAS_SYS_SIGLIST=y
UCLIBC_HAS_GETTEXT_AWARENESS=y
UCLIBC_HAS_GNU_GETOPT=y

#
# Big and Tall
#
UCLIBC_HAS_REGEX=y
# UCLIBC_HAS_WORDEXP is not set
UCLIBC_HAS_FTW=y
UCLIBC_HAS_GLOB=y

#
# Library Installation Options
#
SHARED_LIB_LOADER_PREFIX="/lib"
RUNTIME_PREFIX="/"
DEVEL_PREFIX="/usr"

#
# uClibc development/debugging options
#
# DODEBUG is not set
# DOASSERTS is not set
# SUPPORT_LD_DEBUG is not set
# SUPPORT_LD_DEBUG_EARLY is not set
# UCLIBC_MJN3_ONLY is not set

Hope this helps.
John Vogel <johnv at infoblvd.net>



More information about the uClibc mailing list