From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id ILcVBPsitmbAPwAAqHPOHw:P1 (envelope-from ) for ; Fri, 09 Aug 2024 14:08:59 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id ILcVBPsitmbAPwAAqHPOHw (envelope-from ) for ; Fri, 09 Aug 2024 16:08:59 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=jPw9aQ0I; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1723212539; h=from:from:sender:sender: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:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=IwaSHgUDGkPGcAUfh7QXWNOWKfokJXdM7jkMJ11mLGE=; b=oOiFUTLG51ogwZes8XemtuoiQqyWLcAwLygbdiO6NA/4Bi35epy3T943BrscV7v9uBqaE7 MHbICaZUMp29DSt56HMQb5Uthoee05/5nF1UG4fxZftfSuzvShYzGOyRLKBDqp+0WE8ccE mqZ4xJAbwsj0shepKNps3HdFp7nk+hW+UbnK+nusIFL/LIpu/DERRa6ZV3utl4keJgGw/r DYQKGA0LQXyMBboZD5gmqDANTZ38n1B+KexOQ5PFlB1wehWsG5hwJwydwi36unbqBLYGwi KLrqP4XJ/UyxsK2gOU5Iuc8VlVhsE3zSBY8oX5GWpVUVSNkMpa5oP8X5YATv/Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1723212539; a=rsa-sha256; cv=none; b=WK6zkRqE0nkOdvP0BWb3PgYTuZpIRFU4t7R5qfr6AS2LxawrCq87wgowsKd0P2rsFT7Hfc EQojchgSnMV4Pynt+FdsPhZjOMruq9XFWaBBU1k2vSqAW/WiGVbf5LFKYc0ydiBtmXnR6o axKkK8pG+v8L5ntaKNuB+F0DtSzaTbQFi50nZMlwc1NjYGAMjecHjh0su3mA5vSl0+soGt RK5wTg2NHsB1QEoG8NvmvkgKyRCTTk9nI8NDX/oKIGmrXw7xpbkhEbTO+84TGdBJsqE8Ph SFORGgeXXQe+XiUu+jSQg/Qshffk9OwcN2EQBezXsxs66rzHhhWfu21kdfQNYg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=jPw9aQ0I; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C2579D337 for ; Fri, 09 Aug 2024 16:08:57 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1scQIJ-0005ep-Fp; Fri, 09 Aug 2024 10:08:39 -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 1scQIF-0005eG-MB for guix-patches@gnu.org; Fri, 09 Aug 2024 10:08:35 -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 1scQIF-0006SD-C1 for guix-patches@gnu.org; Fri, 09 Aug 2024 10:08:35 -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=IwaSHgUDGkPGcAUfh7QXWNOWKfokJXdM7jkMJ11mLGE=; b=jPw9aQ0IDJUfdeOq8B/w0YIDm/83y0cewlHqzJM6bAULMzfS5KRwt5FDye/zTJ0SJf1BZ686iqvEA8aPhx313s7wyRTZqr/3LdYYOi8WKZ8AylfqpHceQQ0UtlIOoXTEwCAKXXvWCKCZd/ePsPff99ygNV2YuU9QdEE2AdDTQBS9WE8G6DKdfIucfSGX/P0hH25/Wkr6K2X5E512bo3z4PTpjNPluzLNCVuKqRHCGWNqv+J1CkFnA9HQ+dC3NgOBe8j7T3/Mlp2uvhZRAM8wYFiOaJ2Y+GzxHK5amy5nLXMJYVXQkLvIvqc4IiHU6UTN2X3z5J6UVAL2XISt4BhG4w==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1scQIg-0000kD-7x for guix-patches@gnu.org; Fri, 09 Aug 2024 10:09:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72543] [PATCH] gnu: cpu-features: Fix cross-compilation. Resent-From: Zheng Junjie Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 09 Aug 2024 14:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72543 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72543@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17232124822783 (code B ref -1); Fri, 09 Aug 2024 14:09:02 +0000 Received: (at submit) by debbugs.gnu.org; 9 Aug 2024 14:08:02 +0000 Received: from localhost ([127.0.0.1]:38413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1scQHh-0000ic-Jv for submit@debbugs.gnu.org; Fri, 09 Aug 2024 10:08:01 -0400 Received: from lists.gnu.org ([209.51.188.17]:40890) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1scQHd-0000iP-No for submit@debbugs.gnu.org; Fri, 09 Aug 2024 10:07:59 -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 1scQHB-0005Ya-Bm for guix-patches@gnu.org; Fri, 09 Aug 2024 10:07:29 -0400 Received: from smtp21.cstnet.cn ([159.226.251.21] helo=cstnet.cn) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1scQH6-0006Nz-Ul for guix-patches@gnu.org; Fri, 09 Aug 2024 10:07:28 -0400 Received: from m.tailaa68d.ts.net (unknown [107.174.64.25]) by APP-01 (Coremail) with SMTP id qwCowADX3EiNIrZm_uDUBA--.20578S2; Fri, 09 Aug 2024 22:07:14 +0800 (CST) From: Zheng Junjie Date: Fri, 9 Aug 2024 22:07:05 +0800 Message-ID: X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-CM-TRANSID: qwCowADX3EiNIrZm_uDUBA--.20578S2 X-Coremail-Antispam: 1UD129KBjvJXoW7Kr43GrWxCFW5XF47tFyDAwb_yoW8CF15pa 1rArn0934xXrZ3CanIqa1UJw45X34kKF4UurWxCa1kGay5Wa4xWr43tF4rGa17Ars8G34x XF9YkFyDGF4UG3DanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUyab7Iv0xC_Zr1lb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I2 0VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rw A2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Jr0_JF4l84ACjcxK6xII jxv20xvEc7CjxVAFwI0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwV C2z280aVCY1x0267AKxVWxJr0_GcWle2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xv F2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r 4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwCF04k20xvY0x0EwIxGrwCF x2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14 v26r106r1rMI8E67AF67kF1VAFwI0_Jr0_JrylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY 67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2 IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_ Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa7IU8pnQUUUUUU== X-Originating-IP: [107.174.64.25] X-CM-SenderInfo: x2kh0wxmxqyx3h6l2u1dvotugofq/ Received-SPF: pass client-ip=159.226.251.21; envelope-from=zhengjunjie@iscas.ac.cn; helo=cstnet.cn X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -4.59 X-Spam-Score: -4.59 X-Migadu-Queue-Id: C2579D337 X-Migadu-Scanner: mx11.migadu.com X-TUID: WYD2LqEWCaBE * gnu/packages/assembly.scm (cpu-features)[arguments]<#:configure-flags>: When cross-compilation, set CMAKE_SYSTEM_PROCESSOR. Change-Id: I8b6f9bdeac66b85ab273f81a320e4b8e0d69b5d0 --- gnu/packages/assembly.scm | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/gnu/packages/assembly.scm b/gnu/packages/assembly.scm index b7ccb153d3..5b2518277c 100644 --- a/gnu/packages/assembly.scm +++ b/gnu/packages/assembly.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2022 Felix Gruber ;;; Copyright © 2023 Simon South ;;; Copyright © 2023 B. Wilson +;;; Copyright © 2024 Zheng Junjie <873216071@qq.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -664,7 +665,24 @@ (define-public cpu-features #:tests? #f #:configure-flags #~(list "-DBUILD_TESTING=off" ;; XXX: insists on using bundled googletest - "-DBUILD_SHARED_LIBS=ON"))) + "-DBUILD_SHARED_LIBS=ON" + #$@(let ((target (%current-target-system))) + (if target + (cond ((string-prefix? "arm" target) + '("-DCMAKE_SYSTEM_PROCESSOR=arm")) + ((string-prefix? "aarch64" target) + '("-DCMAKE_SYSTEM_PROCESSOR=aarch64")) + ((string-prefix? "i686" target) + '("-DCMAKE_SYSTEM_PROCESSOR=x86")) + ((string-prefix? "x86_64" target) + '("-DCMAKE_SYSTEM_PROCESSOR=x86_64")) + ;; 32-bit and 64-bit + ((string-prefix? "powerpc" target) + '("-DCMAKE_SYSTEM_PROCESSOR=powerpc")) + ((string-prefix? "riscv64" target) + '("-DCMAKE_SYSTEM_PROCESSOR=riscv64")) + (else '())) + '()))))) (home-page "https://github.com/google/cpu_features") (synopsis "Cross platform C99 library to get cpu features at runtime") (description base-commit: 20dbf225f332ccc707578263ed710dcf2a8fb78e -- 2.45.2