From patchwork Thu Oct 27 08:33:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhu Zihao X-Patchwork-Id: 44151 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 9282727BBF0; Thu, 27 Oct 2022 09:35:46 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,URIBL_BLOCKED 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 B777327BBE9 for ; Thu, 27 Oct 2022 09:35:44 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onyMB-0004cf-GT; Thu, 27 Oct 2022 04:35:19 -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 1onyLw-0003rg-MB for guix-patches@gnu.org; Thu, 27 Oct 2022 04:35:04 -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 1onyLw-0006t7-8D for guix-patches@gnu.org; Thu, 27 Oct 2022 04:35:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1onyLv-0001M9-VI for guix-patches@gnu.org; Thu, 27 Oct 2022 04:35:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58394] [PATCH 2/4] gnu: libcxx: Update to 14.0.6. Resent-From: Zhu Zihao Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 27 Oct 2022 08:35:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58394 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?utf-8?q?Court=C3=A8s?= Cc: 58394@debbugs.gnu.org, Zhu Zihao Received: via spool by 58394-submit@debbugs.gnu.org id=B58394.16668596795153 (code B ref 58394); Thu, 27 Oct 2022 08:35:03 +0000 Received: (at 58394) by debbugs.gnu.org; 27 Oct 2022 08:34:39 +0000 Received: from localhost ([127.0.0.1]:56123 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onyLW-0001Kx-DE for submit@debbugs.gnu.org; Thu, 27 Oct 2022 04:34:38 -0400 Received: from mail-m972.mail.163.com ([123.126.97.2]:42137) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onyLH-0001Jq-5s for 58394@debbugs.gnu.org; Thu, 27 Oct 2022 04:34:26 -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=DBDOA NZoznce+lFQEPzSgi8BF/66G6ce4lq7DtEsM34=; b=leTjRMvRBi4FERjNQV91G eN04OJFNCeiLmcxA4iZ2GAonroOw1ri/c99u394BiYIidkfgHWQjSBH8USGmcRUa dqfWGF7yhjakzo1QFp6K3sh7eyV9+wjyY0R2pu8p6x2GvmcDEr8a4VvapxZp7jGQ dH9mmYfbiPnndhGc8/g6qU= Received: from localhost.localdomain (unknown [27.38.249.197]) by smtp2 (Coremail) with SMTP id GtxpCgDHxcOEQlpjQY5hpA--.34500S3; Thu, 27 Oct 2022 16:34:13 +0800 (CST) From: Zhu Zihao Date: Thu, 27 Oct 2022 16:33:28 +0800 Message-Id: <20221027083330.960-2-all_but_last@163.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <87eduy4yhv.fsf@gnu.org> References: <87eduy4yhv.fsf@gnu.org> <20221027083330.960-1-all_but_last@163.com> MIME-Version: 1.0 X-CM-TRANSID: GtxpCgDHxcOEQlpjQY5hpA--.34500S3 X-Coremail-Antispam: 1Uf129KBjvJXoWxXFWxuFy5Jr1Dur1Utw17Awb_yoWrXFW3pF WfWF4Fgr9YkryfGan3uF4xur1FqFWfAFn7X3yfA3WxKa1jyr18trWxKFWfKFnrXr4vyw4x uw4xJrWrXry5JFJanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0JU238bUUUUU= X-Originating-IP: [27.38.249.197] X-CM-SenderInfo: pdoosuxxwbztlvw6il2tof0z/1tbiFB6nr1aEAZ4x0wADsu 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: , Sender: "Guix-patches" Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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 | 81 +++++++++++++++++++++++++++---------------- 1 file changed, 51 insertions(+), 30 deletions(-) diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 00918bfb90..405ff0b0d8 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -1531,15 +1531,63 @@ (define-public lldb (define-public libcxx (package (name "libcxx") - (version "9.0.1") + (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"))) + ;; 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 llvm python)) + (home-page "https://libcxx.llvm.org") + (synopsis "C++ standard library") + (description + "This package provides an implementation of the C++ standard library for +use with Clang, targeting C++11, C++14 and above.") + (properties `((release-monitoring-url . ,%llvm-release-monitoring-url))) + (license license:expat))) + +;; Libcxx files specifically used by PySide2. +(define-public libcxx-6 + (package + (inherit libcxx) + (version (package-version llvm-6)) (source (origin (method url-fetch) (uri (llvm-uri "libcxx" version)) (sha256 (base32 - "0d2bj5i6mk4caq7skd5nsdmz8c2m5w5anximl5wz3x32p08zz089")))) - (build-system cmake-build-system) + "0rzw4qvxp6qx4l4h9amrq02gp7hbg8lw4m0sy3k60f50234gnm3n")))) (arguments (list #:phases @@ -1558,33 +1606,6 @@ (define-public libcxx "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%" (getenv "CPLUS_INCLUDE_PATH")) #t)))))) - (native-inputs - (list clang llvm)) - (home-page "https://libcxx.llvm.org") - (synopsis "C++ standard library") - (description - "This package provides an implementation of the C++ standard library for -use with Clang, targeting C++11, C++14 and above.") - (properties `((release-monitoring-url . ,%llvm-release-monitoring-url))) - (license license:expat))) - -;; Libcxx files specifically used by PySide2. -(define-public libcxx-6 - (package - (inherit libcxx) - (version (package-version llvm-6)) - (source - (origin - (inherit (package-source libcxx)) - (uri (llvm-uri "libcxx" version)) - (sha256 - (base32 - "0rzw4qvxp6qx4l4h9amrq02gp7hbg8lw4m0sy3k60f50234gnm3n")))) - (arguments - (substitute-keyword-arguments (package-arguments libcxx) - ((#:phases p) - #~(modify-phases #$p - (delete 'enter-subdirectory))))) (native-inputs (list clang-6 llvm-6))))