summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVicente Olivert Riera <Vincent.Riera@imgtec.com>2015-01-20 14:24:21 +0000
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-01-25 17:47:09 +0100
commitb90fa707f3a3d43d54944e7b80ad6423f2f93667 (patch)
tree1eccbdbf2d023112e0c59d1e63f47f4edef9b1d0
parentc1f4413de6ec4f1484a5111b5c7aa98dd400d56e (diff)
downloadbuildroot-b90fa707f3a3d43d54944e7b80ad6423f2f93667.tar.gz
buildroot-b90fa707f3a3d43d54944e7b80ad6423f2f93667.zip
lightning: add -lintl only when needed
Adding -lintl to LIBS causes a failure in the configure phase when using a toolchain which already has locale support because the intl library is not present in the staging area. We fix this by adding -lintl only when is needed. This is the configure error: checking whether the C compiler works... no configure: error: in `/br/output/build/lightning-2.0.5': configure: error: C compiler cannot create executables See `config.log' for more details This is the message in the config.log: configure:3351: /br/output/host/usr/bin/mips-linux-gnu-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lintl >&5 /br/output/host/opt/ext-toolchain/bin/../lib/gcc/mips-linux-gnu/4.9.1/../../../../mips-linux-gnu/bin/ld: cannot find -lintl collect2: error: ld returned 1 exit status Fixes: http://autobuild.buildroot.net/results/280/28006ab35379a9b7f380d40b99a760bec1b69e84/ [Thomas: - Adjust the fix to not add a dependency on gettext: lightning doesn't depend on gettext. It is just that binutils libraries are linked against libintl when available, and we need to add -lintl explicitly in such cases.] Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r--package/lightning/lightning.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/lightning/lightning.mk b/package/lightning/lightning.mk
index 00fed7398a..594ba0c412 100644
--- a/package/lightning/lightning.mk
+++ b/package/lightning/lightning.mk
@@ -17,7 +17,7 @@ ifeq ($(BR2_PACKAGE_LIGHTNING_DISASSEMBLER),y)
LIGHTNING_DEPENDENCIES += binutils zlib
LIGHTNING_CONF_OPTS += --enable-disassembler
# binutils libraries are not explicitly linked against gettext
-LIGHTNING_CONF_ENV += $(if $(BR2_PACKAGE_GETTEXT),LIBS=-lintl)
+LIGHTNING_CONF_ENV += $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),LIBS=-lintl)
endif
$(eval $(autotools-package))
OpenPOWER on IntegriCloud