Skip to content

Commit

Permalink
package/libglib2: fix NLS build on musl and uclibc
Browse files Browse the repository at this point in the history
libglib2 uses a very crude and error-prone way to detect the intl
functions, which basically fails when the C library is not glibc.

There is a bug report about this in upstream meson [1], but it doesn't
seem to get any progress. Fixing that properly in Buildroot looks
complicated.

Now that a meson package can specify its LDFLAGS, use that to pass the
infrastructure-provided TARGET_NLS_LIBS to link with.

Fixes:
    http://autobuild.buildroot.org/results/f0d/f0d85d76786343d767fba9c7c5c01f042ecfc018/
    [...]

[1] mesonbuild/meson#3740

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Adam Duskett <aduskett@gmail.com>
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
  • Loading branch information
yann-morin-1998 authored and arnout committed Jul 1, 2019
1 parent 74e574c commit c2e24f1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions package/libglib2/libglib2.mk
Expand Up @@ -12,6 +12,8 @@ LIBGLIB2_LICENSE = LGPL-2.1+
LIBGLIB2_LICENSE_FILES = COPYING
LIBGLIB2_INSTALL_STAGING = YES

LIBGLIB2_LDFLAGS = $(TARGET_LDFLAGS) $(TARGET_NLS_LIBS)

# glib/valgrind.h contains inline asm not compatible with thumb1
ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
LIBGLIB2_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -marm"
Expand Down

0 comments on commit c2e24f1

Please sign in to comment.