From e49e2feda47fffb5e7a568a89d1f36615e75ce87 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Mon, 26 Jul 2010 23:53:37 +0200 Subject: Makefile: fix ldconfig selection for internal toolchains Commit ed0d45fdd (Choose host/target ldconfig based on availability) added a runtime check for a cross-ldconfig being available. Unfortunately this checks runs too early (at package/Makefile.in parsing time), so it always fails when using an internal toolchain as ldconfig isn't built yet. Fix it by moving the check to the only place it is used (target-finalize). Signed-off-by: Peter Korsgaard --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index f6e02bc29..a864aae65 100644 --- a/Makefile +++ b/Makefile @@ -406,8 +406,12 @@ ifneq ($(BR2_HAVE_DOCUMENTATION),y) rm -rf $(TARGET_DIR)/usr/share/gtk-doc endif find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIPCMD) 2>/dev/null || true - $(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null - + if [ -x "$(TARGET_CROSS)ldconfig" ]; \ + then \ + $(TARGET_CROSS)ldconfig -r $(TARGET_DIR) 2>/dev/null; \ + else \ + /sbin/ldconfig -r $(TARGET_DIR) 2>/dev/null; \ + fi mkdir -p $(TARGET_DIR)/etc echo $(BR2_VERSION)$(shell $(TOPDIR)/scripts/setlocalversion) > \ $(TARGET_DIR)/etc/br-version -- cgit v1.2.3-55-g7522