Skip to content

Commit cd6e913

Browse files
committed
package/libcap: avoid calling /sbin/ldconfig during the host build
There is snippet in the install path that calls /sbin/ldconfig when a variable FAKEROOT is empty install-shared-cap: install-common-cap $(MINCAPLIBNAME) install -m 0755 $(MINCAPLIBNAME) $(FAKEROOT)$(LIBDIR)/$(MINCAPLIBNAME) ln -sf $(MINCAPLIBNAME) $(FAKEROOT)$(LIBDIR)/$(MAJCAPLIBNAME) ln -sf $(MAJCAPLIBNAME) $(FAKEROOT)$(LIBDIR)/$(CAPLIBNAME) ifeq ($(FAKEROOT),) -/sbin/ldconfig endif And this variable is defined when DESTDIR is used, so still define prefix but use the DESTDIR in the host build as well to avoid calling ldconfig at all. Signed-off-by: Charles Hardin <charles.hardin@chargepoint.com>
1 parent 66339cc commit cd6e913

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

package/libcap/libcap.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ HOST_LIBCAP_MAKE_FLAGS = \
5656
DYNAMIC=yes \
5757
GOLANG=no \
5858
lib=lib \
59-
prefix=$(HOST_DIR) \
59+
prefix= \
6060
RAISE_SETFCAP=no
6161

6262
define HOST_LIBCAP_BUILD_CMDS
@@ -65,7 +65,8 @@ define HOST_LIBCAP_BUILD_CMDS
6565
endef
6666

6767
define HOST_LIBCAP_INSTALL_CMDS
68-
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_LIBCAP_MAKE_FLAGS) install
68+
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_LIBCAP_MAKE_FLAGS) \
69+
DESTDIR=$(HOST_DIR) install
6970
endef
7071

7172
$(eval $(generic-package))

0 commit comments

Comments
 (0)