Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/2] package/exim: Add optional libiconv support
Date: Wed, 15 Jul 2015 12:00:20 +0200	[thread overview]
Message-ID: <20150715120020.77db122d@free-electrons.com> (raw)
In-Reply-To: <1428775279-20078-2-git-send-email-bernd.kuhls@t-online.de>

Dear Bernd Kuhls,

On Sat, 11 Apr 2015 20:01:19 +0200, Bernd Kuhls wrote:

> +ifeq ($(BR2_PACKAGE_LIBICONV),y)
> +EXIM_DEPENDENCIES += libiconv
> +define EXIM_USE_DEFAULT_CONFIG_FILE_LIBICONV
> +	$(call exim-config-change,HAVE_ICONV,yes)
> +	$(call exim-config-add,EXTRALIBS_EXIM,-liconv)
> +endef
> +else
> +define EXIM_USE_DEFAULT_CONFIG_FILE_LIBICONV
> +	$(call exim-config-change,HAVE_ICONV,no)
> +endef
> +endif

This is actually not correct: you can very well have iconv() available
with libiconv.

libiconv is only a replacement library providing iconv() when the C
library doesn't provide, which only happens when using uClibc with
locales disabled.

So I think your patch should probably look like:

# We have iconv() support either if the toolchain has locale support or
# if libiconv is enabled. Both cannot be true at the same time since
# libiconv is only available when the toolchain doesn't provide locale
# support. In the case where iconv is provided by libiconv, we need to
# link explicitly with libiconv.

ifeq ($(BR2_PACKAGE_LIBICONV)$(BR2_ENABLE_LOCALE),y)
EXIM_USE_DEFAULT_CONFIG_FILE_LIBICONV += $(call exim-config-change,HAVE_ICONV,yes)
EXIM_USE_DEFAULT_CONFIG_FILE_LIBICONV += $(if $(BR2_PACKAGE_LIBICONV),$(call exim-config-add,EXTRALIBS_EXIM,-liconv))
else
EXIM_USE_DEFAULT_CONFIG_FILE_LIBICONV += $(call exim-config-change,HAVE_ICONV,no)
endif

Could you test something like that with a non-locale enabled toolchain
config, a non-locale enabled toolchain config that has libiconv
enabled, and a locale-enabled toolchain?

In the mean time, I'll mark your patch as Changes Requested.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2015-07-15 10:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-11 18:01 [Buildroot] [PATCH 1/2] package/exim: Add optional OpenSSL support Bernd Kuhls
2015-04-11 18:01 ` [Buildroot] [PATCH 2/2] package/exim: Add optional libiconv support Bernd Kuhls
2015-07-15 10:00   ` Thomas Petazzoni [this message]
2015-04-12  9:48 ` [Buildroot] [PATCH 1/2] package/exim: Add optional OpenSSL support Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150715120020.77db122d@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox