All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/3] lm-sensors: don't use host ldconfig
Date: Wed, 9 Jul 2014 23:30:12 +0200	[thread overview]
Message-ID: <20140709213012.GC3652@free.fr> (raw)
In-Reply-To: <1404939033-32578-2-git-send-email-thomas.petazzoni@free-electrons.com>

Thomas, All,

On 2014-07-09 22:50 +0200, Thomas Petazzoni spake thusly:
> To know whether the libiconv library is available, lm-sensors is using
> the host ldconfig, which is obviously wrong in cross-compilation.
> 
> Moreover, the lm-sensors program making use of the iconv_*() API
> already does it when __UCLIBC__ is *not* defined. In this case, the
> iconv_*() functions are already part of the C library, so there is no
> need to link against a separate library. Therefore, this patch simply
> removes the libiconv handling.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
>  .../lm-sensors-0002-no-host-ldconfig.patch         | 29 ++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
>  create mode 100644 package/lm-sensors/lm-sensors-0002-no-host-ldconfig.patch
> 
> diff --git a/package/lm-sensors/lm-sensors-0002-no-host-ldconfig.patch b/package/lm-sensors/lm-sensors-0002-no-host-ldconfig.patch
> new file mode 100644
> index 0000000..ed4b550
> --- /dev/null
> +++ b/package/lm-sensors/lm-sensors-0002-no-host-ldconfig.patch
> @@ -0,0 +1,29 @@
> +Remove usage of host ldconfig
> +
> +To know whether the libiconv library is available, lm-sensors is using
> +the host ldconfig, which is obviously wrong in cross-compilation.
> +
> +Moreover, the lm-sensors program making use of the iconv_*() API
> +already does it when __UCLIBC__ is *not* defined. In this case, the
> +iconv_*() functions are already part of the C library, so there is no
> +need to link against a separate library. Therefore, this patch simply
> +removes the libiconv handling.
> +
> +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> +
> +Index: b/prog/sensors/Module.mk
> +===================================================================
> +--- a/prog/sensors/Module.mk
> ++++ b/prog/sensors/Module.mk
> +@@ -37,10 +37,8 @@
> + REMOVESENSORSBIN := $(patsubst $(MODULE_DIR)/%,$(DESTDIR)$(BINDIR)/%,$(PROGSENSORSTARGETS))
> + REMOVESENSORSMAN := $(patsubst $(MODULE_DIR)/%,$(DESTDIR)$(PROGSENSORSMAN1DIR)/%,$(PROGSENSORSMAN1FILES))
> + 
> +-LIBICONV := $(shell if /sbin/ldconfig -p | grep -q '/libiconv\.so$$' ; then echo \-liconv; else echo; fi)
> +-
> + $(PROGSENSORSTARGETS): $(PROGSENSORSSOURCES:.c=.ro) lib/$(LIBDEP)
> +-	$(CC) $(EXLDFLAGS) -o $@ $(PROGSENSORSSOURCES:.c=.ro) $(LIBICONV) -Llib -lsensors -lm
> ++	$(CC) $(EXLDFLAGS) -o $@ $(PROGSENSORSSOURCES:.c=.ro) -Llib -lsensors -lm
> + 
> + all-prog-sensors: $(PROGSENSORSTARGETS)
> + user :: all-prog-sensors
> -- 
> 2.0.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2014-07-09 21:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-09 20:50 [Buildroot] [PATCH 1/3] lm-sensors: fix static-only builds Thomas Petazzoni
2014-07-09 20:50 ` [Buildroot] [PATCH 2/3] lm-sensors: don't use host ldconfig Thomas Petazzoni
2014-07-09 21:30   ` Yann E. MORIN [this message]
2014-07-09 20:50 ` [Buildroot] [PATCH 3/3] lm-sensors: sensors-detect requires perl Thomas Petazzoni
2014-07-09 21:41   ` Yann E. MORIN
2014-07-09 21:40 ` [Buildroot] [PATCH 1/3] lm-sensors: fix static-only builds 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=20140709213012.GC3652@free.fr \
    --to=yann.morin.1998@free.fr \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.