From unknown Sun Aug 17 01:49:20 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#63735] [PATCH] gnu: libtree: fix building on non-x86 systems. Resent-From: Z572 <873216071@qq.com> Original-Sender: "Debbugs-submit" Resent-CC: leo@famulari.name, me@tobias.gr, guix-patches@gnu.org Resent-Date: Fri, 26 May 2023 10:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 63735 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63735@debbugs.gnu.org Cc: Leo Famulari , Tobias Geerinckx-Rice X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Leo Famulari , Tobias Geerinckx-Rice Received: via spool by submit@debbugs.gnu.org id=B.168509686423097 (code B ref -1); Fri, 26 May 2023 10:28:02 +0000 Received: (at submit) by debbugs.gnu.org; 26 May 2023 10:27:44 +0000 Received: from localhost ([127.0.0.1]:48917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2Uff-00060T-Pp for submit@debbugs.gnu.org; Fri, 26 May 2023 06:27:44 -0400 Received: from lists.gnu.org ([209.51.188.17]:38166) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <873216071@qq.com>) id 1q2Ufa-00060B-U0 for submit@debbugs.gnu.org; Fri, 26 May 2023 06:27:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <873216071@qq.com>) id 1q2UfV-0003ta-QQ for guix-patches@gnu.org; Fri, 26 May 2023 06:27:35 -0400 Received: from out162-62-57-64.mail.qq.com ([162.62.57.64]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <873216071@qq.com>) id 1q2UfJ-000554-GB for guix-patches@gnu.org; Fri, 26 May 2023 06:27:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1685096828; bh=+RjP0ApXtmHEr//VM+EUwPzaJckwUm3WbFJ3zrkf8I8=; h=From:To:Subject:Date; b=Y0Ii93g3Bn7GSe2FgJbevncpKQnI0uvweSBRKB++Sd+aN2JiiZd/hSC1UlSmT85+6 Xno6URYE9uq4igRzasYC0KdhOh+HJt2Fx6MqqTdnXvo+dS+D6h3r6h74bkLGNnX0fY IgsuwjB3BP3GwNNHkHL5ICmcXy/Q8tBWQ90F6YQ4= Received: from localhost.localdomain ([112.10.199.247]) by newxmesmtplogicsvrsza12-0.qq.com (NewEsmtp) with SMTP id 5ED228EA; Fri, 26 May 2023 18:23:45 +0800 X-QQ-mid: xmsmtpt1685096625tn221r6ba Message-ID: X-QQ-XMAILINFO: NwIPvWX4YDaggQfwAQKgLuZBDCuhxv3EbJhBBDsnG43l9cb4OOhh2Luf/H6l7a 7VCyFhKGVZOUG1+gZV3aIDOUpNQDmp+ErMLr373gl/DPS2Za/pCIyMlFtAYXO35mlRQghEDb5bBu 4stiPr7qIO8weM5VL8yu2pyNfu4Umk7LjWMBeUPyz55TxKhghVuo5rN89j1jqMoXM0IrgJQ9OS8N l4GWlJCJda2ADpwUhcNagJqF9pk+ysDOKYVJomg59OOqdk0YuG3d4VZ3RfREQwJAtV86O6KvRSiI RTTRA0C7/XJpAipYVxOcZnjtmgBfbeLHnb6EWRqZIrcWLt4oSG8lRuP0xPpMJDlUU7Ds00TIYkBa 1YG1kp4H0lR7Mtq9jVr+fRPkFMFWGmkFZri3JcU4Ifx/44jS8yDhNcaOocWiRUZVxbFydc/W6u41 SExe31u1LVQFj2mNVNH8EvM6x+JWRKqzwBNzS0ZIpkbPhtjjiTxOdsqHcW6DWGGajouc8CFF9sJy MsV/1K6gbLIhuQudtIDLZxcVZRU0WgknibRDk/yIibfAu2h2cBXbepYv5FSOcVfHnnamTas4YgVP dspFEhtpn2Zb1tyM+czZjU2ATZ+viL/3+4ewgeYO5lLbBBn6/k4ygR3wr2dDRrJ3I3LSqxAs3vaT jWJDPWlJzL3OBQ6g5WRQXxw9Y8H4CGV42tncNWy+HoCO0sLT6KY2fbs/Wr/7uXTvYqZIqS0lG/Kg z+blanKuQHu4aIr8qLYmSJTm+fAdBRVQjIrU9W6vzR3Cvif6ASJ95N43V1xeejd4/XztgMk2pAhd UJi3khfBha2WfLfL/uiBJtTHwRoHmVIwoWLARbw6icoI6mlBWpRk5ZExWc0Vtv6CgaS+1Z/PB+VJ LYogqn2y9owyXe/mT3erqI9LbmII5wQGkSlUgL/i9g4Tng7IQik7clojuzN5Qvbg== From: Z572 <873216071@qq.com> Date: Fri, 26 May 2023 18:23:45 +0800 X-OQ-MSGID: <2aa722e9a769e4c3ef187cc79e5df50c20e83ce6.1685096619.git.873216071@qq.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Type: text/plain; charset=y Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=162.62.57.64; envelope-from=873216071@qq.com; helo=out162-62-57-64.mail.qq.com X-Spam_score_int: 11 X-Spam_score: 1.1 X-Spam_bar: + X-Spam_report: (1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HELO_DYNAMIC_IPADDR=1.951, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) * gnu/packages/linux.scm (libtree): fix building on non-x86 systems. [source]: add patch. * gnu/packages/patches/libtree-fix-check-non-x86.patch: New file. * gnu/local.mk (dist_path_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/linux.scm | 3 ++ .../patches/libtree-fix-check-non-x86.patch | 50 +++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 gnu/packages/patches/libtree-fix-check-non-x86.patch diff --git a/gnu/local.mk b/gnu/local.mk index 18e8235140..7afa14d3fd 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1497,6 +1497,7 @@ dist_patch_DATA = \ %D%/packages/patches/libtommath-fix-linkage.patch \ %D%/packages/patches/libtool-grep-compat.patch \ %D%/packages/patches/libtool-skip-tests2.patch \ + %D%/packages/patches/libtree-fix-check-non-x86.patch \ %D%/packages/patches/libusb-0.1-disable-tests.patch \ %D%/packages/patches/libusb-for-axoloti.patch \ %D%/packages/patches/libutils-add-includes.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 1be505d949..9c3117510b 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -73,6 +73,7 @@ ;;; Copyright © 2022, 2023 Demis Balbach ;;; Copyright © 2023 Bruno Victal ;;; Copyright © 2023 Yovan Naumovski +;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -9854,6 +9855,8 @@ (define-public libtree (url "https://github.com/haampie/libtree") (commit (string-append "v" version)))) (file-name (git-file-name name version)) + (patches + (search-patches "libtree-fix-check-non-x86.patch")) (sha256 (base32 "1jbc60cslzcfxk9jwva51ncr1zl1nz0fkgfjdckgv81is11nswmb")))) (arguments diff --git a/gnu/packages/patches/libtree-fix-check-non-x86.patch b/gnu/packages/patches/libtree-fix-check-non-x86.patch new file mode 100644 index 0000000000..51f020c5d3 --- /dev/null +++ b/gnu/packages/patches/libtree-fix-check-non-x86.patch @@ -0,0 +1,50 @@ +From 061d3ec62707a526a83482e57d202a66f9d776cd Mon Sep 17 00:00:00 2001 +From: Ismael Luceno +Date: Tue, 23 Aug 2022 19:34:39 +0200 +Subject: [PATCH] Test the -m32 and -m64 compiler flags before use + +Fixes: https://github.com/haampie/libtree/issues/78 +Signed-off-by: Ismael Luceno +--- + tests/05_32_bits/Makefile | 20 +++++++++++++++----- + 1 file changed, 15 insertions(+), 5 deletions(-) + +diff --git a/tests/05_32_bits/Makefile b/tests/05_32_bits/Makefile +index 2c0bece..5628f42 100644 +--- a/tests/05_32_bits/Makefile ++++ b/tests/05_32_bits/Makefile +@@ -3,7 +3,7 @@ + + LD_LIBRARY_PATH= + +-.PHONY: clean ++.PHONY: clean check + + all: check + +@@ -21,11 +21,21 @@ exe64: lib64/libx.so + exe32: lib32/libx.so + echo 'extern int a(); int _start(){return a();}' | $(CC) -m32 "-Wl,-rpath,$(CURDIR)/lib64" "-Wl,-rpath,$(CURDIR)/lib32" -o $@ -nostdlib -x c - -Llib32 -lx + +-check: exe32 exe64 +- ../../libtree exe32 +- ../../libtree exe64 +- + clean: + rm -rf lib32 lib64 exe* + + CURDIR ?= $(.CURDIR) ++ ++test-flag = 2>/dev/null ${CC} -E /dev/null ++test-end = && echo y || echo n ++support-m32 != ${test-flag} -m32 ${test-end} ++support-m64 != ${test-flag} -m64 ${test-end} ++ ++check${support-m32:y=}:: exe32 ++ ../../libtree exe32 ++ ++check${support-m64:y=}:: exe64 ++ ../../libtree exe64 ++ ++check${support-m32:n=} check${support-m64:n=}:: ++ @echo WARNING: test skipped at ${CURDIR} base-commit: 3299b40b3599371890816b52d65a6a5ada1b1131 -- 2.40.1 From unknown Sun Aug 17 01:49:20 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Z572 <873216071@qq.com> Subject: bug#63735: closed (Re: bug#63735: [PATCH] gnu: libtree: fix building on non-x86 systems.) Message-ID: References: <87zg51rc6o.fsf@gnu.org> X-Gnu-PR-Message: they-closed 63735 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 63735@debbugs.gnu.org Date: Wed, 14 Jun 2023 21:02:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1686776522-17957-1" This is a multi-part message in MIME format... ------------=_1686776522-17957-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #63735: [PATCH] gnu: libtree: fix building on non-x86 systems. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 63735@debbugs.gnu.org. --=20 63735: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D63735 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1686776522-17957-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 63735-done) by debbugs.gnu.org; 14 Jun 2023 21:01:21 +0000 Received: from localhost ([127.0.0.1]:45534 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9XcG-0004ek-Vt for submit@debbugs.gnu.org; Wed, 14 Jun 2023 17:01:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9XcD-0004eR-Um for 63735-done@debbugs.gnu.org; Wed, 14 Jun 2023 17:01:20 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q9Xc3-0002hL-EV; Wed, 14 Jun 2023 17:01:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=8rnf7ZlC+DKJXpTZev5UM+qk0Onc/zbRDUI3A9CQtRI=; b=BqS5rszgs7+K5e9stdLf HwMwReQqhfw+ANCEOzUYCnAxTX8Ee9nnQ52s2aNczvpH/SifgvfDEy5VPp9AHyKMY933NilpDPWew SRKPQkXjBngTLyB4XgeaDbF49o4vwGuKE24NvcIY9wgIY1znok3+JNH8kJ4fzW4tdz4MeSjm8Xp33 RuSn/yzLTqEFr1cTm1Xmq0gLyNUyT6mEwCkVjVwpRgn9GKkVPNFeDfCjymkvaTYjDn4YsS7kjTkPq 23pIq5oAhm91bzpxhUkLoMNzUu+lhEj9a067hbzjoGc/xd532IfVO4M/B5frKuL9b9Fv3BnW/05Ln BLGc52OmllSXTw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q9Xc1-0004i5-Ko; Wed, 14 Jun 2023 17:01:06 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Z572 <873216071@qq.com> Subject: Re: bug#63735: [PATCH] gnu: libtree: fix building on non-x86 systems. References: Date: Wed, 14 Jun 2023 23:01:03 +0200 In-Reply-To: (873216071@qq.com's message of "Fri, 26 May 2023 18:23:45 +0800") Message-ID: <87zg51rc6o.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63735-done Cc: 63735-done@debbugs.gnu.org, Tobias Geerinckx-Rice , Leo Famulari X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Z572 <873216071@qq.com> skribis: > * gnu/packages/linux.scm (libtree): fix building on non-x86 systems. > [source]: add patch. > * gnu/packages/patches/libtree-fix-check-non-x86.patch: New file. > * gnu/local.mk (dist_path_DATA): Register it. Applied, thanks! Ludo=E2=80=99. ------------=_1686776522-17957-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 26 May 2023 10:27:44 +0000 Received: from localhost ([127.0.0.1]:48917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2Uff-00060T-Pp for submit@debbugs.gnu.org; Fri, 26 May 2023 06:27:44 -0400 Received: from lists.gnu.org ([209.51.188.17]:38166) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <873216071@qq.com>) id 1q2Ufa-00060B-U0 for submit@debbugs.gnu.org; Fri, 26 May 2023 06:27:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <873216071@qq.com>) id 1q2UfV-0003ta-QQ for guix-patches@gnu.org; Fri, 26 May 2023 06:27:35 -0400 Received: from out162-62-57-64.mail.qq.com ([162.62.57.64]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <873216071@qq.com>) id 1q2UfJ-000554-GB for guix-patches@gnu.org; Fri, 26 May 2023 06:27:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1685096828; bh=+RjP0ApXtmHEr//VM+EUwPzaJckwUm3WbFJ3zrkf8I8=; h=From:To:Subject:Date; b=Y0Ii93g3Bn7GSe2FgJbevncpKQnI0uvweSBRKB++Sd+aN2JiiZd/hSC1UlSmT85+6 Xno6URYE9uq4igRzasYC0KdhOh+HJt2Fx6MqqTdnXvo+dS+D6h3r6h74bkLGNnX0fY IgsuwjB3BP3GwNNHkHL5ICmcXy/Q8tBWQ90F6YQ4= Received: from localhost.localdomain ([112.10.199.247]) by newxmesmtplogicsvrsza12-0.qq.com (NewEsmtp) with SMTP id 5ED228EA; Fri, 26 May 2023 18:23:45 +0800 X-QQ-mid: xmsmtpt1685096625tn221r6ba Message-ID: X-QQ-XMAILINFO: NwIPvWX4YDaggQfwAQKgLuZBDCuhxv3EbJhBBDsnG43l9cb4OOhh2Luf/H6l7a 7VCyFhKGVZOUG1+gZV3aIDOUpNQDmp+ErMLr373gl/DPS2Za/pCIyMlFtAYXO35mlRQghEDb5bBu 4stiPr7qIO8weM5VL8yu2pyNfu4Umk7LjWMBeUPyz55TxKhghVuo5rN89j1jqMoXM0IrgJQ9OS8N l4GWlJCJda2ADpwUhcNagJqF9pk+ysDOKYVJomg59OOqdk0YuG3d4VZ3RfREQwJAtV86O6KvRSiI RTTRA0C7/XJpAipYVxOcZnjtmgBfbeLHnb6EWRqZIrcWLt4oSG8lRuP0xPpMJDlUU7Ds00TIYkBa 1YG1kp4H0lR7Mtq9jVr+fRPkFMFWGmkFZri3JcU4Ifx/44jS8yDhNcaOocWiRUZVxbFydc/W6u41 SExe31u1LVQFj2mNVNH8EvM6x+JWRKqzwBNzS0ZIpkbPhtjjiTxOdsqHcW6DWGGajouc8CFF9sJy MsV/1K6gbLIhuQudtIDLZxcVZRU0WgknibRDk/yIibfAu2h2cBXbepYv5FSOcVfHnnamTas4YgVP dspFEhtpn2Zb1tyM+czZjU2ATZ+viL/3+4ewgeYO5lLbBBn6/k4ygR3wr2dDRrJ3I3LSqxAs3vaT jWJDPWlJzL3OBQ6g5WRQXxw9Y8H4CGV42tncNWy+HoCO0sLT6KY2fbs/Wr/7uXTvYqZIqS0lG/Kg z+blanKuQHu4aIr8qLYmSJTm+fAdBRVQjIrU9W6vzR3Cvif6ASJ95N43V1xeejd4/XztgMk2pAhd UJi3khfBha2WfLfL/uiBJtTHwRoHmVIwoWLARbw6icoI6mlBWpRk5ZExWc0Vtv6CgaS+1Z/PB+VJ LYogqn2y9owyXe/mT3erqI9LbmII5wQGkSlUgL/i9g4Tng7IQik7clojuzN5Qvbg== From: Z572 <873216071@qq.com> To: guix-patches@gnu.org Subject: [PATCH] gnu: libtree: fix building on non-x86 systems. Date: Fri, 26 May 2023 18:23:45 +0800 X-OQ-MSGID: <2aa722e9a769e4c3ef187cc79e5df50c20e83ce6.1685096619.git.873216071@qq.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Debbugs-Cc: Leo Famulari , Tobias Geerinckx-Rice Content-Type: text/plain; charset=y Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=162.62.57.64; envelope-from=873216071@qq.com; helo=out162-62-57-64.mail.qq.com X-Spam_score_int: 11 X-Spam_score: 1.1 X-Spam_bar: + X-Spam_report: (1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HELO_DYNAMIC_IPADDR=1.951, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) * gnu/packages/linux.scm (libtree): fix building on non-x86 systems. [source]: add patch. * gnu/packages/patches/libtree-fix-check-non-x86.patch: New file. * gnu/local.mk (dist_path_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/linux.scm | 3 ++ .../patches/libtree-fix-check-non-x86.patch | 50 +++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 gnu/packages/patches/libtree-fix-check-non-x86.patch diff --git a/gnu/local.mk b/gnu/local.mk index 18e8235140..7afa14d3fd 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1497,6 +1497,7 @@ dist_patch_DATA = \ %D%/packages/patches/libtommath-fix-linkage.patch \ %D%/packages/patches/libtool-grep-compat.patch \ %D%/packages/patches/libtool-skip-tests2.patch \ + %D%/packages/patches/libtree-fix-check-non-x86.patch \ %D%/packages/patches/libusb-0.1-disable-tests.patch \ %D%/packages/patches/libusb-for-axoloti.patch \ %D%/packages/patches/libutils-add-includes.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 1be505d949..9c3117510b 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -73,6 +73,7 @@ ;;; Copyright © 2022, 2023 Demis Balbach ;;; Copyright © 2023 Bruno Victal ;;; Copyright © 2023 Yovan Naumovski +;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -9854,6 +9855,8 @@ (define-public libtree (url "https://github.com/haampie/libtree") (commit (string-append "v" version)))) (file-name (git-file-name name version)) + (patches + (search-patches "libtree-fix-check-non-x86.patch")) (sha256 (base32 "1jbc60cslzcfxk9jwva51ncr1zl1nz0fkgfjdckgv81is11nswmb")))) (arguments diff --git a/gnu/packages/patches/libtree-fix-check-non-x86.patch b/gnu/packages/patches/libtree-fix-check-non-x86.patch new file mode 100644 index 0000000000..51f020c5d3 --- /dev/null +++ b/gnu/packages/patches/libtree-fix-check-non-x86.patch @@ -0,0 +1,50 @@ +From 061d3ec62707a526a83482e57d202a66f9d776cd Mon Sep 17 00:00:00 2001 +From: Ismael Luceno +Date: Tue, 23 Aug 2022 19:34:39 +0200 +Subject: [PATCH] Test the -m32 and -m64 compiler flags before use + +Fixes: https://github.com/haampie/libtree/issues/78 +Signed-off-by: Ismael Luceno +--- + tests/05_32_bits/Makefile | 20 +++++++++++++++----- + 1 file changed, 15 insertions(+), 5 deletions(-) + +diff --git a/tests/05_32_bits/Makefile b/tests/05_32_bits/Makefile +index 2c0bece..5628f42 100644 +--- a/tests/05_32_bits/Makefile ++++ b/tests/05_32_bits/Makefile +@@ -3,7 +3,7 @@ + + LD_LIBRARY_PATH= + +-.PHONY: clean ++.PHONY: clean check + + all: check + +@@ -21,11 +21,21 @@ exe64: lib64/libx.so + exe32: lib32/libx.so + echo 'extern int a(); int _start(){return a();}' | $(CC) -m32 "-Wl,-rpath,$(CURDIR)/lib64" "-Wl,-rpath,$(CURDIR)/lib32" -o $@ -nostdlib -x c - -Llib32 -lx + +-check: exe32 exe64 +- ../../libtree exe32 +- ../../libtree exe64 +- + clean: + rm -rf lib32 lib64 exe* + + CURDIR ?= $(.CURDIR) ++ ++test-flag = 2>/dev/null ${CC} -E /dev/null ++test-end = && echo y || echo n ++support-m32 != ${test-flag} -m32 ${test-end} ++support-m64 != ${test-flag} -m64 ${test-end} ++ ++check${support-m32:y=}:: exe32 ++ ../../libtree exe32 ++ ++check${support-m64:y=}:: exe64 ++ ../../libtree exe64 ++ ++check${support-m32:n=} check${support-m64:n=}:: ++ @echo WARNING: test skipped at ${CURDIR} base-commit: 3299b40b3599371890816b52d65a6a5ada1b1131 -- 2.40.1 ------------=_1686776522-17957-1--