aboutsummaryrefslogtreecommitdiff
path: root/package/lm-sensors/0002-no-host-ldconfig.patch
diff options
context:
space:
mode:
authorGravatar Peter Korsgaard <peter@korsgaard.com>2015-02-03 14:52:07 +0100
committerGravatar Peter Korsgaard <peter@korsgaard.com>2015-02-03 14:52:56 +0100
commit298cd8eaa21a21eee85f9551a26ad294347b1d5a (patch)
tree249fa33b66f65e6daffdbfc8ca2e5399e8d89e61 /package/lm-sensors/0002-no-host-ldconfig.patch
parentdd798a45c571063595c45278e28ed4f614f2cf32 (diff)
downloadbuildroot-298cd8eaa21a21eee85f9551a26ad294347b1d5a.tar.gz
buildroot-298cd8eaa21a21eee85f9551a26ad294347b1d5a.tar.bz2
package/*: rename patches according to the new policy
Autogenerated from rename-patch.py (http://patchwork.ozlabs.org/patch/403345) Signed-off-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/lm-sensors/0002-no-host-ldconfig.patch')
-rw-r--r--package/lm-sensors/0002-no-host-ldconfig.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/package/lm-sensors/0002-no-host-ldconfig.patch b/package/lm-sensors/0002-no-host-ldconfig.patch
new file mode 100644
index 0000000000..51f7f6af01
--- /dev/null
+++ b/package/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_FOR_PROGS)
+- $(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