Commit graph

6 commits

Author SHA1 Message Date
Peter Korsgaard a181d5de36 toolchain: move glibc nsswitch.conf handling to a post-target hook
nsswitch.conf is processed both by the toolchain, nss-mdns and
nss-myhostname without any guaranteed ordering in between.

The toolchain package ensures that nsswitch.conf is available, and the two
nss-* packages tweaks the content, so the toolchain processing should run
before the nss-* ones.  Toolchain is a dependency of all the packages, so
ensure this is done by moving the toolchain handling to a
post-target-install hook.

Also move the variable to toolchain/toolchain/toolchain.mk where the virtual
toolchain package is defined for clarity.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-10-21 01:50:35 +02:00
Ricardo Martincoski d0837c0a14 toolchain/toolchain.mk: fix code style
Rearrange the header of the .mk file so it becomes similar to a header
from a package. It doesn't fit in one line, so split the details to a
comment below the header.

GCONV_LIBS is only used inside this file, so rename it to start with
TOOLCHAIN_, following the namespace convention already used by packages.

Rename the hook COPY_GCONV_LIBS to TOOLCHAIN_GLIBC_COPY_GCONV_LIBS
following the convention used for hooks in packages.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Cc: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-04-01 08:47:18 +02:00
Yann E. MORIN fbbd7ce201 toolchain: use the <PKG>_TARGET_FINALIZE_HOOKS
Register toolchain-specific target-finalize hooks with the
newly-introduced <PKG>_TARGET_FINALIZE_HOOKS.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-07-18 23:30:46 +02:00
Yann E. MORIN fb5cbf3198 toolchain: fix installing gconv libs with multi-arch toolchain
For a multi-arch toolchain, gconv modules are in a sub-directory named
after the machine gcc targets. This is the case, for example, for the
Linaro ARM 2014.09 toolchain, which has the gconv modules in (relative
to the sysroot):
    /usr/lib/arm-linux-gnueabihf/gconv

while the Sourcery CodeBench ARM 2014.05 (non-multi-arch) has them in:
    /usr/lib/gconv

So, to catter for both cases, search both paths. We want to favour the
machine-specific gconv modules over potentially existing "generic" ones,
so we first search that (if it exists) and fallback to looking in the
generic location.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-04-22 22:30:34 +02:00
Gustavo Zacarias e1eba3d97c system/skeleton: make nsswitch install conditional
Don't blindly install the /etc/nsswitch.conf file, it's useless for
toolchains that aren't (e)glibc-based and misleading.
Make the installation conditional on a (e)glibc toolchain.

[Thomas: use $(INSTALL) instead of cp.]

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-10-25 12:48:17 +02:00
Yann E. MORIN 11c1076db9 toolchain: add option to copy the gconv libraries
The gconv libraries are used to translate between different character sets
('charsets', even 'csets' sometimes). Some packages need them to present
text to the user (eg. XBMC Gotham).

In (e)glibc they are implemented by the internal implemenation of iconv,
called gconv, and are provided as dlopen-able libraries.

Note that some gconv modules need extra libraries (shared by more than
one gconv module), so we must, when adding a subset of modules, scan the
installed modules in search of the missing libraries.

[Thomas: add general explanation in expunge-gconv-modules and fix
coding style.]

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Cc: Eric Limpens <limpens@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-27 23:15:48 +02:00