Commit Graph

18 Commits

Author SHA1 Message Date
Thomas Petazzoni
aebf199ff0 Add support to generate locale data
In order to use locale support on a Linux system, you need locale data
to be present:

 * on a (e)glibc based system, this data is typically in the
   /usr/lib/locale/locale-archive file, which can be created and
   extended using the localedef program

 * on an uClibc based system, the set of supported locales is defined
   at build time by an uClibc configuration option.

This patch implements generating locale data for the following cases:

 * Internal toolchain

 * External toolchain based on (e)glibc. uClibc external toolchains
   are not supported, because with uClibc, the set of supported
   locales is defined at build time. CodeSourcery and Linaro
   toolchains have been tested, Crosstool-NG toolchains are believed
   to work properly as well.

 * Toolchains built using the Crosstool-NG backend, but only (e)glibc
   toolchains.

This feature was runtime tested with internal uClibc toolchain,
CodeSourcery ARM toolchain and Linaro ARM toolchain, thanks to a
simple C program that shows the data and a gettext translated message.

Note that this option differs from the "purge locales" option, which
is responsible for removing translation files and other locale stuff
installed by packages. At some point in the future, we may want to
clarify the respective roles of those options.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-05-09 00:26:21 +02:00
Thomas De Schampheleire
8f8d414b61 Fix typo buiding -> building
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-01-15 20:47:58 +01:00
Peter Korsgaard
5931db0de9 gdb: fix kconfig dependency handling with !BR_TOOLCHAIN_BUILDROOT
Newer versions of GDB need pthread debugging support if threads are
enabled, which is always the case for glibc but is a configure option
for uClibc.

We have solved this for internal toolchains by selecting the
BR2_PTHREAD_DEBUG option from the GDB selection if needed, but as this
option isn't available when ctng/external toolchains are used, mconf
prints ugly warnings and the build may fail if an external uClibc
toolchain without pthread debugging support is used.

Fix it by introducing 2 more hidden config options:
 - BR2_TOOLCHAIN_HAS_THREADS_DEBUG
 - BR2_TOOLCHAIN_HAS_THREADS_DEBUG_IF_NEEDED

The first tells us if the toolchain HAS pthreads debugging support,
and is checked by check_uclibc_feature in helper.mk for external uClibc
based toolchains.

The second tells us if the toolchain is ABLE TO provide pthreads debugging
support if threads are enabled, either because it's an internal toolchain
where we can force enable it or an external glibc/eglibc toolchain or
uClibc with the option enabled.

Crosstool-ng forcibly enables this support, so those will always work.
The preconfigured uClibc-based toolchains we have also all enable it.

Finally, show a comment if this isn't the case so the (external toolchain)
user knows why. This is placed outside the choice option, as menuconfig
has a bug where it doesn't show choice selections which only contain
comments.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-11-24 14:26:52 +01:00
Peter Korsgaard
4ee9d569f9 uClibc: drop BR2_PROGRAM_INVOCATION option
Remove the BR option and enable the configuration setting in the
uClibc defconfigs.

The BR2_PROGRAM_INVOCATION option only adds very little overhead to
uClibc, and we have a number of packages needing it, so simply always
enable it - Simplifying the kconfig logic and the number of choices
users have to make.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-07-27 11:56:53 +02:00
Baruch Siach
ec8eda419a toolchain: add user defined target LDFLAGS options
Allow the user to specify additional options for the target LDFLAGS.

I use this to pass the -te500v2 option to the linker, when using the
CodeSourcery toolchain for PowerPC. This chooses the correct CRT for e500 hard
float. Otherwise I get errors like

undefined reference to `_save32gpr_31'
undefined reference to `_rest32gpr_31_x'

at final link time.

[Peter: fixup, use qstrip]
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-07-25 08:31:15 +02:00
Thomas Petazzoni
b9882925a4 toolchain: introduce BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
Unfortunately, the official Blackfin toolchains are built without the
shadow password support, so our default Busybox configuration fails to
build.

Therefore, we introduce a new hidden knob
BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS, which is set to yes for Buildroot
internal toolchain, for toolchains generated by the Crosstool-NG
backend, for Glibc external toolchains and for Uclibc custom external
toolchains. It is left unset by the Blackfin toolchain profile.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-06-12 21:50:20 +02:00
Mike Frysinger
871db074b1 initial support for Blackfin processors
[Peter: don't allow MMU on bfin]
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-02-07 14:29:19 +01:00
Peter Korsgaard
9cce44093b toolchain-common.in: Fix USE_MMU typo
Thanks to Marc Gauthier for noticing.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-01-15 21:21:16 +01:00
Mike Frysinger
e5e5f5d868 toolchain: add a USE_MMU build option
Some packages need to know whether the MMU is in play, so add a toolchain
option to expose the feature to them.

[Peter: only show option on archs where it makes sense]
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-01-15 14:23:36 +01:00
Thomas Petazzoni
f56c5a7619 toolchain: BR2_NEEDS_GETTEXT must be y when uClibc is used
BR2_NEEDS_GETTEXT was already set to y for Buildroot internal
toolchain and external toolchains based on uClibc, but wasn't set for
toolchains based on uClibC built by the Crosstool-NG backend.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-12-13 22:26:51 +01:00
Thomas Petazzoni
9eaad202f1 toolchain: rework thread options
The selection of linuxthreads, linuxthreads old or NPTL doesn't make a
lot of sense for external toolchains. So, instead, we :

 * Introduce an hidden BR2_TOOLCHAIN_HAS_THREADS option, which must be
   selected by toolchain specific options when thread support is
   available. Package needing to test thread support should use this
   option.

 * Move the none/linuxthreads/linuxthreads old/NPTL selection to
   Buildroot internal toolchain configuration.

 * Add an option in external toolchain to tell if thread support is
   available or not in the external toolchain. We assume that glibc
   without threads is not possible, as Ulrich Drepper said in
   http://sourceware.org/ml/libc-alpha/2005-08/msg00091.html

ffmpeg, dmalloc and openvpn are fixed to use the new
BR2_TOOLCHAIN_HAS_THREADS option. For openvpn, --enable-threads=posix
is no longer used, as the configure script doesn't even understand
this option.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-12-13 22:26:41 +01:00
Thomas Petazzoni
ab64b95e4d toolchain: move Stack Protection Support option
The BR2_USE_SSP option is only used inside the uClibc build, so only
meaningful for Buildroot internal toolchains. Therefore, the option is
moved to the right location so that it isn't visible when working with
external toolchains.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-12-13 22:06:15 +01:00
Thomas Petazzoni
6b578c8d73 toolchain: rework C++ options
Instead of having BR2_GCC_CROSS_CXX and BR2_INSTALL_LIBSTDCPP, with
BR2_GCC_CROSS_CXX not being visible (and therefore being useless),
let's just keep BR2_INSTALL_LIBSTDCPP to enable C++ in the toolchain
and install C++ libraries on the target.

We also take that opportunity to make BR2_INSTALL_LIBSTDCPP an hidden
option, which is selected by an option in Buildroot toolchain support
or an option in External toolchain support, just as we did for other
toolchain features.

Some work definitely remains to be done :

 - The name BR2_INSTALL_LIBSTDCPP is ugly, but we keep it for the
   moment in order to avoid changing all packages.

 - We should clarify the other language-related options (Fortran,
   Java, Objective-C, etc.).

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-12-13 22:04:35 +01:00
Thomas Petazzoni
fff711786a toolchain: Improve C library option selection
Turn BR2_LARGEFILE, BR2_INET_IPV6, BR2_INET_RPC, BR2_USE_WCHAR,
BR2_ENABLE_LOCALE and BR2_PROGRAM_INVOCATION into hidden options.

Then, for Buildroot toolchains, external toolchains and Crosstool-NG
toolchains, provide visible options that selects the hidden options.

This allows :

 * To show a different label and help text in the case of Buildroot
   toolchain (do you want to enable feature X ?) and in the case of
   external toolchain (is feature X available in your toolchain ?)

 * To not show any option when a glibc external toolchain is selected
   (since glibc is assumed to support all of largefile, IPv6, RPC,
   WCHAR, locale and program invocation) and have them all selected in
   that case.

There is some amount of duplication between Buildroot toolchain config
options and Crosstool-NG toolchain config options, because kconfig
doesn't allow to source the same Config.in file twice (even if under
mutually exclusive conditions). This duplication is more readable that
the hack that consists in splitting files in multiple pieces.

However, this commit changes the name of the options visible in the
configuration interface, so existing .config files will have to be
updated accordingly.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-12-13 21:54:28 +01:00
Thomas Petazzoni
97d8618c6c Remove code specific to removed architectures
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-08-31 20:28:21 +02:00
Thomas Petazzoni
f4ffc04bbd Prevent C++ + locale + uClibc 0.9.31 + gcc 4.2 to be selected
The problem fixed by 60f945e47a is in
fact not limited to the AVR32 architecture, as reported by Will Newton
on the list. The issue is the combination uClibc 0.9.31 with gcc 4.2,
C++ support and locales.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-08-11 16:03:43 +02:00
Thomas Petazzoni
60f945e47a toolchain: mark uClibc 0.9.31 + locale + C++ as broken
It fails to build with:

ctype_members.cc: In constructor 'std::ctype_byname<_CharT>::ctype_byname(const char*, size_t) [with _CharT = char]':
ctype_members.cc:59: error: invalid use of incomplete type 'struct __uclibc_locale_struct'
/home/test/avr32-br/usr/avr32-unknown-linux-uclibc/sys-include/bits/uClibc_locale.h:85: error: forward declaration of 'struct __uclibc_locale_struct'
ctype_members.cc:60: error: invalid use of incomplete type 'struct __uclibc_locale_struct'
/home/test/avr32-br/usr/avr32-unknown-linux-uclibc/sys-include/bits/uClibc_locale.h:85: error: forward declaration of 'struct __uclibc_locale_struct'
ctype_members.cc:61: error: invalid use of incomplete type 'struct __uclibc_locale_struct'
/home/test/avr32-br/usr/avr32-unknown-linux-uclibc/sys-include/bits/uClibc_locale.h:85: error: forward declaration of 'struct __uclibc_locale_struct'
make[5]: *** [ctype_members.lo] Error 1

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-07-29 22:18:57 +02:00
Yann E. MORIN
2508b16d66 toolchain: move buildroot config files
Handle the internal toolchain backend mechanism the
same way we handle other backends.

Signed-off-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-28 16:20:08 +02:00