Only (e)glibc provides libnsl, uclibc provides only a stub, and musl
doesn't implement it at all.
Fixes compilation using this defconfig
BR2_arm=y
BR2_cortex_a7=y
BR2_STATIC_LIBS=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_PACKAGE_OPENSSL=y
BR2_PACKAGE_EXIM=y
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
endef
endif
+# only (e)glibc provides libnsl, remove -lnsl for all other toolchains
+# http://bugs.exim.org/show_bug.cgi?id=1564
+ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),)
+define EXIM_REMOVE_LIBNSL_FROM_MAKEFILE
+ $(SED) 's/-lnsl//g' $(@D)/OS/Makefile-Linux
+endef
+endif
+
define EXIM_CONFIGURE_TOOLCHAIN
$(call exim-config-add,CC,$(TARGET_CC))
$(call exim-config-add,CFLAGS,$(TARGET_CFLAGS))