From patchwork Wed Jul 5 12:09:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 784569 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3x2fp626bPz9s2s for ; Wed, 5 Jul 2017 22:10:22 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 7659C869CA; Wed, 5 Jul 2017 12:10:19 +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 kt65IlDPqLk3; Wed, 5 Jul 2017 12:10:14 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id AEA428208D; Wed, 5 Jul 2017 12:10:10 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 3918E1C4114 for ; Wed, 5 Jul 2017 12:10:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 3305930941 for ; Wed, 5 Jul 2017 12:10:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oXjmb0DtZJID for ; Wed, 5 Jul 2017 12:10:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exchange.essensium.com (220.77.144.195.ipv4.evonet.be [195.144.77.220]) by silver.osuosl.org (Postfix) with ESMTPS id 6542B3094A for ; Wed, 5 Jul 2017 12:10:06 +0000 (UTC) Received: from vandecaa-laptop.bzh.lan (10.3.7.11) by beleexch01.local.ess-mail.com (10.3.7.8) with Microsoft SMTP Server (TLS) id 15.0.847.32; Wed, 5 Jul 2017 14:09:52 +0200 From: "Arnout Vandecappelle (Essensium/Mind)" To: Date: Wed, 5 Jul 2017 14:09:49 +0200 Message-ID: <20170705120950.23189-2-arnout@mind.be> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170705120950.23189-1-arnout@mind.be> References: <20170705120950.23189-1-arnout@mind.be> MIME-Version: 1.0 X-Originating-IP: [10.3.7.11] X-ClientProxiedBy: beleexch01.local.ess-mail.com (10.3.7.8) To beleexch01.local.ess-mail.com (10.3.7.8) Cc: Wolfgang Grandegger Subject: [Buildroot] [PATCH 2/3] check-host-rpath: no longer allow $(HOST_DIR)/usr 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" Now all packages have been updated to install things in $(HOST_DIR)/lib instead of $(HOST_DIR)/usr/lib, there should no longer be any reason to have $(HOST_DIR)/usr/lib in the RPATH, so we don't allow it any more. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) Cc: Wolfgang Grandegger --- support/scripts/check-host-rpath | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/support/scripts/check-host-rpath b/support/scripts/check-host-rpath index 2846d5eb51..74a25ba99c 100755 --- a/support/scripts/check-host-rpath +++ b/support/scripts/check-host-rpath @@ -1,7 +1,7 @@ #!/usr/bin/env bash # This script scans $(HOST_DIR)/{bin,sbin} for all ELF files, and checks -# they have an RPATH to $(HOST_DIR)/{,usr/}lib if they need libraries from +# they have an RPATH to $(HOST_DIR)/lib if they need libraries from # there. # Override the user's locale so we are sure we can parse the output of @@ -59,8 +59,6 @@ check_elf_has_rpath() { # Remove duplicate and trailing '/' for proper match dir="$( sed -r -e 's:/+:/:g; s:/$::;' <<<"${dir}" )" [ "${dir}" = "${hostdir}/lib" -o "${dir}" = "\$ORIGIN/../lib" ] && return 0 - # For the time being, the rpath is allowed with both usr/lib and lib - [ "${dir}" = "${hostdir}/usr/lib" -o "${dir}" = "\$ORIGIN/../../usr/lib" ] && return 0 done done < <( readelf -d "${file}" \ |sed -r -e '/.* \(R(UN)?PATH\) +Library r(un)?path: \[(.+)\]$/!d' \