The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / lm-sensors / 0002-no-host-ldconfig.patch
1 Remove usage of host ldconfig
2
3 To know whether the libiconv library is available, lm-sensors is using
4 the host ldconfig, which is obviously wrong in cross-compilation.
5
6 Moreover, the lm-sensors program making use of the iconv_*() API
7 already does it when __UCLIBC__ is *not* defined. In this case, the
8 iconv_*() functions are already part of the C library, so there is no
9 need to link against a separate library. Therefore, this patch simply
10 removes the libiconv handling.
11
12 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
13
14 Index: b/prog/sensors/Module.mk
15 ===================================================================
16 --- a/prog/sensors/Module.mk
17 +++ b/prog/sensors/Module.mk
18 @@ -37,10 +37,8 @@
19  REMOVESENSORSBIN := $(patsubst $(MODULE_DIR)/%,$(DESTDIR)$(BINDIR)/%,$(PROGSENSORSTARGETS))
20  REMOVESENSORSMAN := $(patsubst $(MODULE_DIR)/%,$(DESTDIR)$(PROGSENSORSMAN1DIR)/%,$(PROGSENSORSMAN1FILES))
21  
22 -LIBICONV := $(shell if /sbin/ldconfig -p | grep -q '/libiconv\.so$$' ; then echo \-liconv; else echo; fi)
23 -
24  $(PROGSENSORSTARGETS): $(PROGSENSORSSOURCES:.c=.ro) lib/$(LIBDEP_FOR_PROGS)
25 -       $(CC) $(EXLDFLAGS) -o $@ $(PROGSENSORSSOURCES:.c=.ro) $(LIBICONV) -Llib -lsensors -lm
26 +       $(CC) $(EXLDFLAGS) -o $@ $(PROGSENSORSSOURCES:.c=.ro) -Llib -lsensors -lm
27  
28  all-prog-sensors: $(PROGSENSORSTARGETS)
29  user :: all-prog-sensors