libiconv: add an error when both libiconv and locale are enabled
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 29 Jul 2010 07:50:59 +0000 (09:50 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 29 Jul 2010 14:04:38 +0000 (16:04 +0200)
This error should never show up if all Buildroot dependencies are
correct. However, rather than failing horribly later on, catch this
particular case early on and error out.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/libiconv/libiconv.mk

index cc40cd4b643fa32ff3fd761d478cfb6cbe17c39e..a3f762ab6f1e4d727564ed8c39c7fc72c14e4d6b 100644 (file)
@@ -23,3 +23,10 @@ ifneq ($(BR2_ENABLE_DEBUG),y)
        $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libcharset.so.*
 endif
        touch $@
+
+# Configurations where the toolchain supports locales and the libiconv
+# package is enabled are incorrect, because the toolchain already
+# provides libiconv functionality, and having both confuses packages.
+ifeq ($(BR2_PACKAGE_LIBICONV)$(BR2_ENABLE_LOCALE),yy)
+$(error Libiconv should never be enabled when the toolchain supports locales. Report this failure to Buildroot developers)
+endif