From patchwork Mon Mar 17 14:54:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Zheng Junjie X-Patchwork-Id: 40280 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 CCE4927BBEA; Mon, 17 Mar 2025 14:59:55 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI, PDS_OTHER_BAD_TLD,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS 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 5016227BBE2 for ; Mon, 17 Mar 2025 14:59:53 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tuBsQ-0007pj-TT; Mon, 17 Mar 2025 10:55:40 -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 1tuBrs-0007Jv-AX for guix-patches@gnu.org; Mon, 17 Mar 2025 10:55:15 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tuBrr-0006GB-A1 for guix-patches@gnu.org; Mon, 17 Mar 2025 10:55:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=AkFCEra9RdZ1avMLsRU+MyNjVwVIaXF5EMK6dIRv87M=; b=ewEmJLMNQA1soTOtQyr3A5aWgswks+hnbnHPxkWauwrgVCpsc+LRD84RVPU3cQlKCu1AYASvvlsU8TvoyzyNxzy+Ism3vdqRPBFyyUHhrgxt08OCJ9balvp0/G43+5NlEXhpbzHIp+W8aVREBQINLPfAo8QKJtLOwPJOrcmgdlrvNbmJYJDwi+sN/ZPyja38xG0iN+hPSPIfZG+8BmTJRdFwODoDK4BPynMyT2DIOHBsY9tiRV3qb4kgktarsM1Sf7E96dGxmP/moIE4AtZBMKBX8RLDjdaM+qiQmU7+dGEr393+XluZIzsIV/5OnN60XtLlCPkk3Yt4SmKEuHNOIg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tuBrq-0000RE-1L for guix-patches@gnu.org; Mon, 17 Mar 2025 10:55:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77071] [PATCH] gnu: ogre-next: Fix build on riscv64. Resent-From: Zheng Junjie Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Mar 2025 14:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 77071 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77071@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17422232911651 (code B ref -1); Mon, 17 Mar 2025 14:55:01 +0000 Received: (at submit) by debbugs.gnu.org; 17 Mar 2025 14:54:51 +0000 Received: from localhost ([127.0.0.1]:59792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tuBrb-0000QW-IL for submit@debbugs.gnu.org; Mon, 17 Mar 2025 10:54:51 -0400 Received: from lists.gnu.org ([2001:470:142::17]:39572) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tuBrX-0000PS-OC for submit@debbugs.gnu.org; Mon, 17 Mar 2025 10:54:45 -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 1tuBrR-0006IL-FB for guix-patches@gnu.org; Mon, 17 Mar 2025 10:54:37 -0400 Received: from mail.z572.online ([88.99.160.180]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tuBrK-0006Ck-EP for guix-patches@gnu.org; Mon, 17 Mar 2025 10:54:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=z572.online; s=me; t=1742223614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AkFCEra9RdZ1avMLsRU+MyNjVwVIaXF5EMK6dIRv87M=; b=ZhOXuTQ1AUBGsCC+zc4VBmFiLy1E0TiRloBqbIbnCpXUYp0pRcXFM7RWBTx+hSNdi7+KhT irKlp32Ih12X1VdUBqY2N0Ac3IsRsMeGiceTF7XsOcCc3grOebGYgyUBHSiClHTh7sHONZ HWVh/OfwfxCJup6x+RsBXhh68EKyh54= Received: from m.tailaa68d.ts.net (mail1.85362086.com [107.174.64.25]) by mail.z572.online (OpenSMTPD) with ESMTPSA id 099c4e4b (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Mon, 17 Mar 2025 15:00:12 +0000 (UTC) From: Zheng Junjie Date: Mon, 17 Mar 2025 22:54:07 +0800 Message-ID: X-Mailer: git-send-email 2.48.1 MIME-Version: 1.0 Received-SPF: pass client-ip=88.99.160.180; envelope-from=z572@z572.online; helo=mail.z572.online X-Spam_score_int: 19 X-Spam_score: 1.9 X-Spam_bar: + X-Spam_report: (1.9 / 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, FROM_SUSPICIOUS_NTLD=0.499, FROM_SUSPICIOUS_NTLD_FP=1.999, PDS_OTHER_BAD_TLD=1.476, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: , 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/graphics.scm (ogre-next): Fix build on riscv64. [source]: Add ogre-next-add-riscv64-support.patch. [argument]<#:configure-flags>: When target riscv64, Add -DOGRE_SIMD_SSE2=OFF and -DOGRE_SIMD_NEON=OFF. * gnu/packages/patches/ogre-next-add-riscv64-support.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. Change-Id: I77279f3f5ed238f8b6526b5eceea5751f86ea6e1 --- gnu/local.mk | 1 + gnu/packages/graphics.scm | 12 ++++++-- .../ogre-next-add-riscv64-support.patch | 28 +++++++++++++++++++ 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/ogre-next-add-riscv64-support.patch base-commit: cb386c3c70212252ddcdb0bb9f6a8ecfd22378a6 diff --git a/gnu/local.mk b/gnu/local.mk index 01d13a11ae8..c9533507eac 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1918,6 +1918,7 @@ dist_patch_DATA = \ %D%/packages/patches/nyacc-binary-literals.patch \ %D%/packages/patches/obs-modules-location.patch \ %D%/packages/patches/ocaml-multiple-definitions.patch \ + %D%/packages/patches/ogre-next-add-riscv64-support.patch \ %D%/packages/patches/ocaml-4.07-dynamically-allocate-signal-stack.patch \ %D%/packages/patches/ocaml-4.09-dynamically-allocate-signal-stack.patch \ %D%/packages/patches/ocaml-4.09-multiple-definitions.patch \ diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index 9d7ec2933a9..82057adf680 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -29,7 +29,7 @@ ;;; Copyright © 2021, 2022 Vinicius Monego ;;; Copyright © 2022 Michael Rohleder ;;; Copyright © 2022, 2023, 2024 John Kehayias -;;; Copyright © 2022, 2024 Zheng Junjie <873216071@qq.com> +;;; Copyright © 2022, 2024, 2025 Zheng Junjie ;;; Copyright © 2022 Tobias Kortkamp ;;; Copyright © 2022 Paul A. Patience ;;; Copyright © 2022 dan @@ -1351,6 +1351,7 @@ (define-public ogre-next (url "https://github.com/OGRECave/ogre-next") (commit (string-append "v" version)))) (file-name (git-file-name name version)) + (patches (search-patches "ogre-next-add-riscv64-support.patch")) (sha256 (base32 "1yrlg3s654xbp95208h9a2b8jcwdk69r6sjvll0aiyvxm4c056cw")))) @@ -1358,7 +1359,14 @@ (define-public ogre-next ((#:tests? _ #f) ;; The test suite is currently disabled by the build system ;; (see: https://github.com/OGRECave/ogre-next/issues/466). - #f))) + #f) + ((#:configure-flags flags #~(list)) + (if (target-riscv64?) + #~(cons* + "-DOGRE_SIMD_SSE2=OFF" + "-DOGRE_SIMD_NEON=OFF" + #$flags) + flags)))) (inputs (modify-inputs (package-inputs ogre) (append rapidjson))))) diff --git a/gnu/packages/patches/ogre-next-add-riscv64-support.patch b/gnu/packages/patches/ogre-next-add-riscv64-support.patch new file mode 100644 index 00000000000..37251eaaf20 --- /dev/null +++ b/gnu/packages/patches/ogre-next-add-riscv64-support.patch @@ -0,0 +1,28 @@ +from https://github.com/OGRECave/ogre-next/pull/478 + +From 12081a8f1a0e676ac618dd7c4c1d2e8390c07278 Mon Sep 17 00:00:00 2001 +From: Eric Long +Date: Mon, 18 Nov 2024 21:56:13 +0800 +Subject: [PATCH] Add riscv64 to 64-bit architectures + +--- + OgreMain/include/OgrePlatform.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/OgreMain/include/OgrePlatform.h b/OgreMain/include/OgrePlatform.h +index f9f7a12e46..a977aa2958 100644 +--- a/OgreMain/include/OgrePlatform.h ++++ b/OgreMain/include/OgrePlatform.h +@@ -81,7 +81,8 @@ THE SOFTWARE. + #if defined( __x86_64__ ) || defined( _M_X64 ) || defined( _M_X64 ) || defined( _M_AMD64 ) || \ + defined( __ppc64__ ) || defined( __PPC64__ ) || defined( __arm64__ ) || defined( __aarch64__ ) || \ + defined( _M_ARM64 ) || defined( __mips64 ) || defined( __mips64_ ) || defined( __alpha__ ) || \ +- defined( __ia64__ ) || defined( __e2k__ ) || defined( __s390__ ) || defined( __s390x__ ) ++ defined( __ia64__ ) || defined( __e2k__ ) || defined( __s390__ ) || defined( __s390x__ ) || \ ++ (defined(__riscv) && __riscv_xlen == 64) + # define OGRE_ARCH_TYPE OGRE_ARCHITECTURE_64 + #else + # define OGRE_ARCH_TYPE OGRE_ARCHITECTURE_32 +-- +2.47.1 +