From patchwork Thu Oct 22 08:22:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Bj=C3=B8rn_Forsman?= X-Patchwork-Id: 534291 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id A680814131F for ; Thu, 22 Oct 2015 19:22:44 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=jyG99++7; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id A40018AF82; Thu, 22 Oct 2015 08:22:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ukh8iAkw7AGV; Thu, 22 Oct 2015 08:22:42 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 1DE998AB28; Thu, 22 Oct 2015 08:22:42 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id E974E1C0839 for ; Thu, 22 Oct 2015 08:22:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E5DD18C3FB for ; Thu, 22 Oct 2015 08:22:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id z4Ppn1RUlW5S for ; Thu, 22 Oct 2015 08:22:40 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lf0-f42.google.com (mail-lf0-f42.google.com [209.85.215.42]) by whitealder.osuosl.org (Postfix) with ESMTPS id 038658A94C for ; Thu, 22 Oct 2015 08:22:40 +0000 (UTC) Received: by lffv3 with SMTP id v3so39011854lff.0 for ; Thu, 22 Oct 2015 01:22:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=/VQq/6NVGxuBq7C0gWExlunv7DR4GXdcfWIyMVwDJF4=; b=jyG99++7TnoP+/XQPObCGeMogBQWOfMl9jYLESidM7G35/SW/EfZFLELhIIYoSbvBu V5t6o6uyR6AmXIZzn26g/yCllChluJwPgOhtcGc1nXecSL1vUUP+KCBnZvIPfscLLd4d gY8HWieZcWZLDpTC4G6US0fONhxfZXR9/hwMYG5C0wocZKlCkmiqnwRTph+5CvstorYN g/Df6M2RAbxFFQwSdXJlUwAYifJhO2ewRzZglQBPaZSe4JqU/I2KpcFguFS5y2LMDhm5 s63ixKjUBD2PzqVjhUr2XA6QfSN+dUrFWYWfUvNv7Y+pTOxXIJTXRrQP6csLYyt8P9Xz lonw== X-Received: by 10.112.77.10 with SMTP id o10mr7746876lbw.28.1445502158114; Thu, 22 Oct 2015 01:22:38 -0700 (PDT) Received: from localhost (cm-84.208.220.107.getinternet.no. [84.208.220.107]) by smtp.gmail.com with ESMTPSA id s73sm2172858lfs.32.2015.10.22.01.22.37 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Oct 2015 01:22:37 -0700 (PDT) From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= To: buildroot@busybox.net Date: Thu, 22 Oct 2015 10:22:30 +0200 Message-Id: <1445502151-25735-1-git-send-email-bjorn.forsman@gmail.com> X-Mailer: git-send-email 2.5.2 MIME-Version: 1.0 Cc: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Subject: [Buildroot] [PATCH 1/2] Makefile: use root-relative -f path for /sbin/ldconfig X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Without this, the -f path argument is ignored: $ strace -f -s128 /sbin/ldconfig -r /home/vagrant/buildroot/output/target -f /home/vagrant/buildroot/output/target/etc/ld.so.conf |& grep "ld\.so\.conf" execve("/sbin/ldconfig", ["/sbin/ldconfig", "-r", "/home/vagrant/buildroot/output/target", "-f", "/home/vagrant/buildroot/output/target/etc/ld.so.conf"], [/* 61 vars */]) = 0 execve("/sbin/ldconfig.real", ["/sbin/ldconfig.real", "-r", "/home/vagrant/buildroot/output/target", "-f", "/home/vagrant/buildroot/output/target/etc/ld.so.conf"], [/* 61 vars */]) = 0 write(2, "Warning: ignoring configuration file that cannot be opened: /home/vagrant/buildroot/output/target/etc/ld.so.conf", 112Warning: ignoring configuration file that cannot be opened: /home/vagrant/buildroot/output/target/etc/ld.so.conf) = 112 Proof that using root-relative path -f path (/etc/ld.so.conf, without $(TARGET_DIR) in front) picks up the correct file: $ strace -f -s128 /sbin/ldconfig -r /home/vagrant/buildroot/output/target -f /etc/ld.so.conf |& grep "ld\.so\.conf" execve("/sbin/ldconfig", ["/sbin/ldconfig", "-r", "/home/vagrant/buildroot/output/target", "-f", "/etc/ld.so.conf"], [/* 61 vars */]) = 0 execve("/sbin/ldconfig.real", ["/sbin/ldconfig.real", "-r", "/home/vagrant/buildroot/output/target", "-f", "/etc/ld.so.conf"], [/* 61 vars */]) = 0 lstat("/home/vagrant/buildroot/output/target/etc/ld.so.conf", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 open("/home/vagrant/buildroot/output/target/etc/ld.so.conf", O_RDONLY) = 3 Tested on Ubuntu 14.04. $ /sbin/ldconfig --version ldconfig (Ubuntu EGLIBC 2.19-0ubuntu6.6) 2.19 ... $(TARGET_CROSS)ldconfig behaves differently (at least the ldconfig I tested, which was built by Buildroot) and should not have root-relative -f path. If it does, it will pick up host /etc/ld.so.conf file. Signed-off-by: Bjørn Forsman --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index dd8959f..61ce1f9 100644 --- a/Makefile +++ b/Makefile @@ -607,7 +607,7 @@ endif -f $(TARGET_DIR)/etc/ld.so.conf; \ else \ /sbin/ldconfig -r $(TARGET_DIR) \ - -f $(TARGET_DIR)/etc/ld.so.conf; \ + -f /etc/ld.so.conf; \ fi ( \ echo "NAME=Buildroot"; \