elfutils: towards uClibc support: gettext
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 6 Jan 2013 05:22:52 +0000 (05:22 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Mon, 7 Jan 2013 20:44:56 +0000 (21:44 +0100)
elfutils is annoying: it needs gettext even if locale support is
disabled...

Heavily based from work done by Stefan Fröberg, but with many further
modifications by Thomas Petazzoni.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/elfutils/Config.in
package/elfutils/elfutils.mk

index 5ec4ca9388d150d569e6ccade48f3f3479749633..78d02a5bb333cac27e0b1d60fe16c5567cc20548 100644 (file)
@@ -12,6 +12,7 @@ config BR2_PACKAGE_ELFUTILS
               BR2_TOOLCHAIN_BUILDROOT   || \
               BR2_TOOLCHAIN_CTNG_uClibc || \
               BR2_TOOLCHAIN_EXTERNAL_UCLIBC
+       select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
        depends on BR2_LARGEFILE
        help
          Libraries/utilities to handle ELF objects (drop in
index 9f9de52ef9da61d969326e72053a435df542cf70..39407dbb7d460739e2ad3847b7dc4e4e15d50d56 100644 (file)
@@ -25,6 +25,17 @@ ELFUTILS_CONF_ENV += \
         CPPFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))"
 endif
 
+ELFUTILS_LDFLAGS = $(TARGET_LDFLAGS)
+
+# Unconditionnally requires gettext.
+ifeq ($(BR2_NEEDS_GETTEXT),y)
+ELFUTILS_DEPENDENCIES += gettext
+ELFUTILS_LDFLAGS += -lintl
+endif
+
+ELFUTILS_CONF_ENV += \
+       LDFLAGS="$(ELFUTILS_LDFLAGS)"
+
 ifeq ($(BR2_TOOLCHAIN_BUILDROOT)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC)$(BR2_TOOLCHAIN_CTNG_uClibc),y)
  ELFUTILS_DEPENDENCIES += argp-standalone
 endif