From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id uPU+BDOWg2SO2wAASxT56A (envelope-from ) for ; Fri, 09 Jun 2023 23:14:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id OHA1BDOWg2SI6wAAauVa8A (envelope-from ) for ; Fri, 09 Jun 2023 23:14:27 +0200 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 D1F0EDF41 for ; Fri, 9 Jun 2023 23:14:26 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q7jR2-0004dH-RW; Fri, 09 Jun 2023 17:14:16 -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 1q7jR1-0004d9-AM for guix-patches@gnu.org; Fri, 09 Jun 2023 17:14:15 -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 1q7jQo-0005hU-F3 for guix-patches@gnu.org; Fri, 09 Jun 2023 17:14:14 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q7jQo-0000IG-Az for guix-patches@gnu.org; Fri, 09 Jun 2023 17:14:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62438] [PATCH] gnu: llvm: fix riscv64 cross-compile. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 09 Jun 2023 21:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62438 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Z572 <873216071@qq.com> Cc: 62438@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Received: via spool by 62438-submit@debbugs.gnu.org id=B62438.16863451861047 (code B ref 62438); Fri, 09 Jun 2023 21:14:02 +0000 Received: (at 62438) by debbugs.gnu.org; 9 Jun 2023 21:13:06 +0000 Received: from localhost ([127.0.0.1]:32857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7jPu-0000Gp-4V for submit@debbugs.gnu.org; Fri, 09 Jun 2023 17:13:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7jPr-0000GH-Pz for 62438@debbugs.gnu.org; Fri, 09 Jun 2023 17:13:04 -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 1q7jPg-0005S0-NG; Fri, 09 Jun 2023 17:12:53 -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=nNBloKgSvMyg9eLT+SgF7aMxvm6QLAsH1xs6tUrvre4=; b=dimcoNMpU14nx6z9kvMN fXziu07KuTnS2612gRqMGCeLmePDknOMGbEkKEt8Zfb69SBHUdIUcexY3KYNhZEAXUySruyEBq/66 qWB48IkZlF82QP8dq4szK2rhsaaoCvaWL80m3fF04ZkKEKx26xz5OfcPCaH9il8f/RWS5b1X7ZW1N QlRyWXlPHlKMuPUmf+ioT9xmZnL1qFshZDfwI/aR6MwAPuj5jCj451N0aQxu3wcz+Hb3/1WOME0ap 5w0Pbvyr4PqSdVPbJBFYdmT11dxBxSFnwJzO75SdcDZPOS6nZv9Lg9sLjosXa4rQyaScZc98UBG+o l6gUGIecF0W9oQ==; 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 1q7jPK-0002bI-1Y; Fri, 09 Jun 2023 17:12:30 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: Date: Fri, 09 Jun 2023 23:12:28 +0200 In-Reply-To: (873216071@qq.com's message of "Sat, 8 Apr 2023 13:32:59 +0800") Message-ID: <87legstk5f.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-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-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1686345266; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=nNBloKgSvMyg9eLT+SgF7aMxvm6QLAsH1xs6tUrvre4=; b=sHqpiICJ4OdPvVw3DT0pEtdHR35jPdv9rgyGJFjtwaYLxJzOOB1tArtCHwZRBRcr3eOxAD MbLnsU4yQRCyqpb0yyny7xFyTdR4fS/9JhYSuhh/AIZo4VPVGoF+Gj2KwvjjWAuj0Nnp7/ 8CukktaTSD6szG5kZcWirxvNUTtZaBdspfuCDMopFcloZRs+AKsn4POM6HdEbKxlF3TmDx JLmeCoHCN157TMUTDf+aF+UBX9V82jW7t5CULGPWkbvIxgcQgLQTW8zUOJcN2zgy3Y4CNo cAeEwJ7Ah/0o8TDzlviyYqvCIuuxfdGDxHs6PPkB6w6AZ9j4ooaP1W729zbAkQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=dimcoNMp; dmarc=pass (policy=none) header.from=gnu.org; 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-Seal: i=1; s=key1; d=yhetil.org; t=1686345266; a=rsa-sha256; cv=none; b=uSPNmMUgCDBCvNsyYNp2Z8Fs5CwWE3FdMmqhC5Zd1bnNmQDtwOwN/mC31JHyICRk2ljIJf wWBV5z52cwZCEFsBB6L5tTkZ28+q6Hs9FJAPnRxcA7OU6O7FWH2bnmZRQbyGEwgLbFoCGm ZMuAgSWedYxd/S9G/My+oLjGz1muJgjMxlGkfF2AwYe2wV6nZZk92pbcg1juv6nOiBBsgm /lWBrOCfk+XLqKCm0ozFA3vYsClmUtTZiuRhK2EUEo4iB8uYB6l/uTEBk8bhQ3BgMLK8lO QA4rXqYz/LSfEhqY0BbW548TFNAABOPLSwDTju30R0F09ymq+BJDzW2d5e3/8w== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -4.11 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=dimcoNMp; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Queue-Id: D1F0EDF41 X-Spam-Score: -4.11 X-TUID: dYsXYsISO9p6 Hi, Z572 <873216071@qq.com> skribis: > +(define* (system->llvm-target-arch #:optional > + (system (or (and=3D> (%current-target= -system) > + gnu-triplet->nix-s= ystem) > + (%current-system)))) > + "Return the LLVM target arch name that corresponds to SYSTEM, a system= type such > +as \"x86_64-linux\"." > + ;; See the 'cmake/config-ix.cmake' file of LLVM for a list of supporte= d targets arch. > + ;; start with # Determine the native architecture. > + (letrec-syntax ((matches (syntax-rules (=3D>) > + ((_ (system-prefix =3D> target) rest ...) > + (if (string-prefix? system-prefix system) > + target > + (matches rest ...))) > + ((_) > + (error "LLVM target arch for system is unk= nown" system))))) > + (matches ("aarch64" =3D> "AArch64") > + ("armhf" =3D> "ARM") > + ("mips64el" =3D> "Mips") > + ("powerpc" =3D> "PowerPC") > + ("riscv64" =3D> "RISCV64") > + ("x86_64" =3D> "X86_64") > + ("i686" =3D> "X86") > + ("i586" =3D> "X86")))) The only different compared to =E2=80=98system->llvm-target=E2=80=99 is =E2= =80=9Criscv64=E2=80=9D instead of =E2=80=9Criscv=E2=80=9D. Why not add that line to =E2=80=98syst= em->llvm-target=E2=80=99 instead of duplicating it? Thanks, Ludo=E2=80=99.