From patchwork Sun Oct 9 14:59:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhu Zihao X-Patchwork-Id: 43249 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 8F91127BBEA; Sun, 9 Oct 2022 16:02:13 +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,FREEMAIL_FROM,MAILING_LIST_MULTI,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable 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 DFBF927BBE9 for ; Sun, 9 Oct 2022 16:02:12 +0100 (BST) Received: from localhost ([::1]:44672 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ohXoi-0006RW-2d for patchwork@mira.cbaines.net; Sun, 09 Oct 2022 11:02:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49582) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohXoY-0006RN-UN for guix-patches@gnu.org; Sun, 09 Oct 2022 11:02:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45662) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ohXoY-0004Hu-GH for guix-patches@gnu.org; Sun, 09 Oct 2022 11:02:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ohXoY-0001EK-3Y for guix-patches@gnu.org; Sun, 09 Oct 2022 11:02:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58394] [PATCH]: gnu: libcxx: Update to 14.0.6. Resent-From: Zhu Zihao Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 09 Oct 2022 15:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58394 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58394@debbugs.gnu.org X-Debbugs-Original-To: guix-patches Received: via spool by submit@debbugs.gnu.org id=B.16653276684666 (code B ref -1); Sun, 09 Oct 2022 15:02:01 +0000 Received: (at submit) by debbugs.gnu.org; 9 Oct 2022 15:01:08 +0000 Received: from localhost ([127.0.0.1]:44740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohXnf-0001DB-MZ for submit@debbugs.gnu.org; Sun, 09 Oct 2022 11:01:08 -0400 Received: from lists.gnu.org ([209.51.188.17]:35352) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohXnd-0001D3-J7 for submit@debbugs.gnu.org; Sun, 09 Oct 2022 11:01:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohXnd-0006Oi-E1 for guix-patches@gnu.org; Sun, 09 Oct 2022 11:01:05 -0400 Received: from mail-m974.mail.163.com ([123.126.97.4]:11379) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ohXnW-00043t-2r for guix-patches@gnu.org; Sun, 09 Oct 2022 11:01:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=L35D0 nFDIsKTtWf/fmGN+qPBYwAE+SARNRalmO1LorY=; b=VEVN9rARUSpLwMyXK3VEW n0akUxPLliwCEg4N+1EsgHbxS30oSqGziigY1/S2uREU/dq8YXb9L+20D+o+AQIz 6oti2LUUOQvKH5yd83EG8KrJ/vFu40QWRV+VjJZOPbFpbwi2efllPtkm1HNiZkFt wbW30xQIl2mJ9MKi99Rvs0= Received: from asus-laptop (unknown [163.125.249.189]) by smtp4 (Coremail) with SMTP id HNxpCgC3qtoP4kJj+BSsjQ--.9078S2; Sun, 09 Oct 2022 23:00:43 +0800 (CST) User-agent: mu4e 1.8.9; emacs 29.0.50 From: Zhu Zihao Date: Sun, 09 Oct 2022 22:59:58 +0800 Message-ID: <86k059yrcm.fsf@163.com> MIME-Version: 1.0 X-CM-TRANSID: HNxpCgC3qtoP4kJj+BSsjQ--.9078S2 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxUjZXrUUUUU X-Originating-IP: [163.125.249.189] X-CM-SenderInfo: pdoosuxxwbztlvw6il2tof0z/xtbBoRuVr2I0VGJUfAAAsI Received-SPF: pass client-ip=123.126.97.4; envelope-from=all_but_last@163.com; helo=mail-m974.mail.163.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches From b70e093e1ce01de0f607d70911e1539462c17a40 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Sat, 8 Oct 2022 16:26:44 +0800 Subject: [PATCH 2/2] gnu: libcxx: Update to 14.0.6. * gnu/packages/llvm.scm(libcxx)[source]: Use "llvm-monorepo". [arguments]<#:configure-flags>: Use clang & clang++, skip RPATH_CHANGE in CMake. <#:phases>: Add phase "enter-subdirectory". [native-inputs]: Add Python 3 for lit. (libcxx-6)[arguments]: Don't inherit from libcxx. --- gnu/packages/llvm.scm | 47 +++++++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 00918bfb90..ad0cb088be 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -1531,19 +1531,27 @@ (define-public lldb (define-public libcxx (package (name "libcxx") - (version "9.0.1") - (source - (origin - (method url-fetch) - (uri (llvm-uri "libcxx" version)) - (sha256 - (base32 - "0d2bj5i6mk4caq7skd5nsdmz8c2m5w5anximl5wz3x32p08zz089")))) + (version "14.0.6") + (source (llvm-monorepo version)) (build-system cmake-build-system) (arguments (list + #:tests? #f + #:configure-flags + #~(list "-DLLVM_ENABLE_RUNTIMES=libcxx;libcxxabi" + "-DCMAKE_C_COMPILER=clang" + "-DCMAKE_CXX_COMPILER=clang++" + ;; libc++.so is actually a GNU ld style linker script, however, + ;; CMake still tries to fix the RUNPATH of it during the install + ;; step. This argument tells CMake to use the install directory + ;; as RUNPATH and don't attempt to patch it. + ;; See also: https://gitlab.kitware.com/cmake/cmake/-/issues/22963 + "-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE") #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'enter-subdirectory + (lambda _ + (chdir "runtimes"))) (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH (lambda* (#:key inputs #:allow-other-keys) (let ((gcc (assoc-ref inputs "gcc"))) @@ -1559,7 +1567,7 @@ (define-public libcxx (getenv "CPLUS_INCLUDE_PATH")) #t)))))) (native-inputs - (list clang llvm)) + (list clang llvm python)) (home-page "https://libcxx.llvm.org") (synopsis "C++ standard library") (description @@ -1581,10 +1589,23 @@ (define-public libcxx-6 (base32 "0rzw4qvxp6qx4l4h9amrq02gp7hbg8lw4m0sy3k60f50234gnm3n")))) (arguments - (substitute-keyword-arguments (package-arguments libcxx) - ((#:phases p) - #~(modify-phases #$p - (delete 'enter-subdirectory))))) + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH + (lambda* (#:key inputs #:allow-other-keys) + (let ((gcc (assoc-ref inputs "gcc"))) + ;; Hide GCC's C++ headers so that they do not interfere with + ;; the ones we are attempting to build. + (setenv "CPLUS_INCLUDE_PATH" + (string-join (delete (string-append gcc "/include/c++") + (string-split (getenv "CPLUS_INCLUDE_PATH") + #\:)) + ":")) + (format #t + "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%" + (getenv "CPLUS_INCLUDE_PATH")) + #t)))))) (native-inputs (list clang-6 llvm-6)))) -- 2.37.3