From patchwork Thu Jun 22 09:19:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 51165 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 E21DA27BBE2; Thu, 22 Jun 2023 10:24:26 +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.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 A442A27BBEA for ; Thu, 22 Jun 2023 10:24:23 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qCGXu-0006fq-5b; Thu, 22 Jun 2023 05:24: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 1qCGXr-0006ei-Gc for guix-patches@gnu.org; Thu, 22 Jun 2023 05:24:05 -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 1qCGXr-0004dw-7R for guix-patches@gnu.org; Thu, 22 Jun 2023 05:24:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qCGXr-0001bU-2z for guix-patches@gnu.org; Thu, 22 Jun 2023 05:24:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64218] [PATCH 6/7] gnu: ldc: Enable building on more architectures. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 22 Jun 2023 09:24:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64218 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64218@debbugs.gnu.org Cc: Efraim Flashner Received: via spool by 64218-submit@debbugs.gnu.org id=B64218.16874257926074 (code B ref 64218); Thu, 22 Jun 2023 09:24:03 +0000 Received: (at 64218) by debbugs.gnu.org; 22 Jun 2023 09:23:12 +0000 Received: from localhost ([127.0.0.1]:34828 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCGX2-0001Zo-0i for submit@debbugs.gnu.org; Thu, 22 Jun 2023 05:23:12 -0400 Received: from mail-wr1-f51.google.com ([209.85.221.51]:56729) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCGWv-0001Xr-B0 for 64218@debbugs.gnu.org; Thu, 22 Jun 2023 05:23:05 -0400 Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-3111547c8f9so7994217f8f.1 for <64218@debbugs.gnu.org>; Thu, 22 Jun 2023 02:23:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687425779; x=1690017779; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=B9SASp6pW0o7KFoCtkvmkQp964FzHuabM+0O33Kmk/4=; b=aok4vHIa5rOzEZAaeAC9qFlWiC3qgCiW2afGKt2R7tEZwwOryoCgM9kU23qqdg5WD6 rxbey02w1bgd1U7Z491ihRjxFUcJMZcBXIABVket5whnsYADPYi/ZPvPzK5gJoDt6RZ+ kQ2HF80JyL1lHAZHFzp6Ir2ORD/R0MdCSJ9ka+M8NlfFu9TAdWyygBHtvl2tY1qltwDT Qk9eKg0YYKEBXM5gD5gSYEHokALX7ZJb882XVbJfFSRACTJ2TFGcU0RPLTFMRbmDxspv saTv0LdStSm7GyGPwT2AlcUyURa1E7GcJCljXtna5ZsxLv+fVKGWo0nMRkU/JALOBiww MVOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687425779; x=1690017779; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=B9SASp6pW0o7KFoCtkvmkQp964FzHuabM+0O33Kmk/4=; b=jIskav80os9NEbf6cmsYshLxi6moNxLjMw29zGIcbZ6j7OMsbivy0vPA2N9GW/9tUj cbEtHTK1bpTeuP6cJdDxkp7u5NdlrEVCf96oQ8faB4pG9k0WuHXTT8aVs+dpRR3LZDuV pCI/4IuZDSVYayNeZSd2pr8dFTWdhvbmMR4rA4mntsroj2RG0bi7n9CedVUPSde9gAnt ofFxuPOl7yj5QayxOJZeqORRkSDhH8XvNNyV7c/qLE/QrQQOrfDa9TivSzG03jDZwCOY GddXBe6yoRtYB+NBI/Vyv1GXgBAEeUYaJ369u1CIe49n4gnQYAT3VAgfug/Q2uYRdU+L 81LQ== X-Gm-Message-State: AC+VfDxAuL+f35vV3ahFCKF4Mwm5y+ZxqxhjhsbOq85sm+uJpq7kQaQj U5efDiUpLoR6II0faZxH1Vj4MN4wLY91YQ== X-Google-Smtp-Source: ACHHUZ5UsO2qY+eMl57VgUt6p7ZTXkcrECaoaCU4bdtLnsyVke8VkPBm4KP4Rd99wCfdHRWLLqsAwg== X-Received: by 2002:adf:ce92:0:b0:311:1b4b:7b8a with SMTP id r18-20020adfce92000000b003111b4b7b8amr14641491wrn.71.1687425779489; Thu, 22 Jun 2023 02:22:59 -0700 (PDT) Received: from localhost ([188.120.129.124]) by smtp.gmail.com with ESMTPSA id j10-20020a5d604a000000b0031272fced4dsm6541482wrt.52.2023.06.22.02.22.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jun 2023 02:22:59 -0700 (PDT) From: Efraim Flashner Date: Thu, 22 Jun 2023 12:19:13 +0300 Message-Id: <67098e2f87ffdd1bceb29a811680a2ac4d30ed96.1687425321.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 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/dlang.scm (ldc)[arguments]: In the custom phase 'fix-compiler-rt-library-discovery rewrite gnu-triplet->clang-arch to pass-through unmatched architectures. --- gnu/packages/dlang.scm | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/gnu/packages/dlang.scm b/gnu/packages/dlang.scm index 3103e629d9..92600f759e 100644 --- a/gnu/packages/dlang.scm +++ b/gnu/packages/dlang.scm @@ -234,19 +234,12 @@ (define-public ldc (system ,(or (%current-target-system) (%current-system)))) (define (gnu-triplet->clang-arch system) - (letrec-syntax - ((matches (syntax-rules (=>) - ((_ (system-prefix => target) rest ...) - (if (string-prefix? system-prefix system) - target - (matches rest ...))) - ((_) - (error "Clang target for system is unknown" - system))))) - (matches ("x86_64" => "x86_64") - ("i686" => "i386") - ("armhf" => "armhf") - ("aarch64" => "aarch64")))) + (let ((system-prefix + (car (string-tokenize + system (char-set-complement (char-set #\-)))))) + (cond + ((equal? system-prefix "i686") "i386") + (#t system-prefix)))) ;; Coax LLVM into agreeing with Clang about system target ;; naming. (substitute* "driver/linker-gcc.cpp"