From patchwork Fri May 26 10:23:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Z572 <873216071@qq.com> X-Patchwork-Id: 50343 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BE68927BBEA; Fri, 26 May 2023 11:28:15 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,FREEMAIL_REPLYTO_END_DIGIT, MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C13D727BBE9 for ; Fri, 26 May 2023 11:28:13 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q2Ug2-0004Y2-7p; Fri, 26 May 2023 06:28:06 -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 ) id 1q2Ug0-0004Xd-9b for guix-patches@gnu.org; Fri, 26 May 2023 06:28:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q2Ug0-0005JY-1Z for guix-patches@gnu.org; Fri, 26 May 2023 06:28:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q2Ufy-00061B-DI; Fri, 26 May 2023 06:28:02 -0400 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== 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 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Z572 <873216071@qq.com> X-ACL-Warn: , Z572 via Guix-patches X-Patchwork-Original-From: Z572 via Guix-patches via From: Z572 <873216071@qq.com> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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 base-commit: 3299b40b3599371890816b52d65a6a5ada1b1131 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}