From patchwork Tue May 15 19:51:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Le Bihan X-Patchwork-Id: 913909 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40lpBH09v6z9s0y for ; Wed, 16 May 2018 05:52:22 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 900E7226E7; Tue, 15 May 2018 19:52:20 +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 rz76YQbOEn+y; Tue, 15 May 2018 19:52:19 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 7205422663; Tue, 15 May 2018 19:52:19 +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 634ED1C06F2 for ; Tue, 15 May 2018 19:52:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 5D9E3226C3 for ; Tue, 15 May 2018 19:52:18 +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 dNSxUUEMicWQ for ; Tue, 15 May 2018 19:52:16 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from smtp5-g21.free.fr (smtp5-g21.free.fr [212.27.42.5]) by silver.osuosl.org (Postfix) with ESMTPS id 5058622128 for ; Tue, 15 May 2018 19:52:15 +0000 (UTC) Received: from localhost.localdomain (unknown [82.227.241.205]) (Authenticated sender: eric.le.bihan.dev) by smtp5-g21.free.fr (Postfix) with ESMTPSA id 15F8B5FF88 for ; Tue, 15 May 2018 21:52:10 +0200 (CEST) From: Eric Le Bihan To: buildroot@buildroot.org Date: Tue, 15 May 2018 21:51:54 +0200 Message-Id: <20180515195159.6694-4-eric.le.bihan.dev@free.fr> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180515195159.6694-1-eric.le.bihan.dev@free.fr> References: <20180515195159.6694-1-eric.le.bihan.dev@free.fr> Subject: [Buildroot] [RFC PATCH v2 3/8] meson: prevent RPATH stripping X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" By default, Meson strips RPATH from the executable it builds [1,2], unless explicitly set via install_rpath. This will make support/scripts/check-host-rpath fail when building the host variant of a Meson-based package. So add a patch to prevent RPATH from being stripped if install_rpath is not set and notify user about it. [1] https://github.com/mesonbuild/meson/issues/2567 [2] https://github.com/mesonbuild/meson/issues/314#issuecomment-157658562 Signed-off-by: Eric Le Bihan --- ...y-fix-RPATH-if-install_rpath-is-not-empty.patch | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 package/meson/0001-Only-fix-RPATH-if-install_rpath-is-not-empty.patch diff --git a/package/meson/0001-Only-fix-RPATH-if-install_rpath-is-not-empty.patch b/package/meson/0001-Only-fix-RPATH-if-install_rpath-is-not-empty.patch new file mode 100644 index 0000000000..03c1944258 --- /dev/null +++ b/package/meson/0001-Only-fix-RPATH-if-install_rpath-is-not-empty.patch @@ -0,0 +1,32 @@ +From 53e4920038d5562b7b672fec8b9469fc02eef4ad Mon Sep 17 00:00:00 2001 +From: Eric Le Bihan +Date: Thu, 10 May 2018 21:57:49 +0200 +Subject: [PATCH] Only fix RPATH if install_rpath is not empty + +Signed-off-by: Eric Le Bihan +--- + mesonbuild/scripts/meson_install.py | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/mesonbuild/scripts/meson_install.py b/mesonbuild/scripts/meson_install.py +index 013f2a00..f7ff1dcc 100644 +--- a/mesonbuild/scripts/meson_install.py ++++ b/mesonbuild/scripts/meson_install.py +@@ -368,7 +368,13 @@ def install_targets(d): + printed_symlink_error = True + if os.path.isfile(outname): + try: +- depfixer.fix_rpath(outname, install_rpath, False) ++ # Buildroot check-host-rpath script expects RPATH ++ # But if install_rpath is empty, it will stripped. ++ # So, preserve it in this case ++ if install_rpath: ++ depfixer.fix_rpath(outname, install_rpath, False) ++ else: ++ print("Skipping RPATH fixing") + except SystemExit as e: + if isinstance(e.code, int) and e.code == 0: + pass +-- +2.14.3 +