From patchwork Fri Jan 28 10:50:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: phodina X-Patchwork-Id: 36854 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 E5DE327BBEA; Fri, 28 Jan 2022 10:51:58 +0000 (GMT) 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,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 47CB527BBE9 for ; Fri, 28 Jan 2022 10:51:58 +0000 (GMT) Received: from localhost ([::1]:51576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nDOrD-0001QZ-22 for patchwork@mira.cbaines.net; Fri, 28 Jan 2022 05:51:57 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49606) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nDOqM-0001PS-Rb for guix-patches@gnu.org; Fri, 28 Jan 2022 05:51:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:36426) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nDOqM-000360-ES for guix-patches@gnu.org; Fri, 28 Jan 2022 05:51:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nDOqM-0004Jo-Cu for guix-patches@gnu.org; Fri, 28 Jan 2022 05:51:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53601] [PATCH 1/2] gnu: Add mimalloc. Resent-From: phodina Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 28 Jan 2022 10:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 53601 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53601@debbugs.gnu.org X-Debbugs-Original-To: Guix Patches Received: via spool by submit@debbugs.gnu.org id=B.164336703416555 (code B ref -1); Fri, 28 Jan 2022 10:51:02 +0000 Received: (at submit) by debbugs.gnu.org; 28 Jan 2022 10:50:34 +0000 Received: from localhost ([127.0.0.1]:57562 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDOpo-0004Ir-7V for submit@debbugs.gnu.org; Fri, 28 Jan 2022 05:50:33 -0500 Received: from lists.gnu.org ([209.51.188.17]:53660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDOpm-0004Ik-Cv for submit@debbugs.gnu.org; Fri, 28 Jan 2022 05:50:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49506) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nDOpl-0001Oq-GT for guix-patches@gnu.org; Fri, 28 Jan 2022 05:50:26 -0500 Received: from mail-40133.protonmail.ch ([185.70.40.133]:15474) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nDOpi-0002nz-KY for guix-patches@gnu.org; Fri, 28 Jan 2022 05:50:24 -0500 Date: Fri, 28 Jan 2022 10:50:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail2; t=1643367019; bh=PjxNATfHIOQFDFvARjruRZRuoHh51Ejelo7Onz4U59c=; h=Date:To:From:Reply-To:Subject:Message-ID:From:To:Cc; b=apPZxf+sNqzPH0SX4HGnHp8+pVkqh2s52xvX6Ow62S/9bO9CS5g3iq33BfrUasizd coCYoWElhrnzG0M64jscCp9HcoRr7Ca/jiqLokP9eS+KBermUUvqG3beqbL/5EWacQ eJrJZ1R3vgMGM/6NOihtTUE+WIdTLpeMxnliYvWt4iHhMldsqqCRm1HAmIwyMcGW+G G8prkvI11aUxPOUqDf6/11pZnQU3DjhKy5Oq/vzy/0LBOdo3Vd4JFz3+hia+dGFsE+ 66AZ4B2JF3xJl/XOtA4tPPUMfuKj7V31ZZObTV5SEMAy3vUxx4O5IlFXFYiLWJv2yy 3kB/hzW3gI+/Q== Message-ID: MIME-Version: 1.0 Received-SPF: pass client-ip=185.70.40.133; envelope-from=phodina@protonmail.com; helo=mail-40133.protonmail.ch 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, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" Reply-to: phodina X-ACL-Warn: , phodina via Guix-patches X-Patchwork-Original-From: phodina via Guix-patches via From: phodina X-getmail-retrieved-from-mailbox: Patches Hi, here is a patch set to add mold linker. I've temporarily put the package definition into gnu/packages/raspberry-pi.scm as I'm unsure if it should go to gnu/packages/commencement.scm or somewhere else. It would be be interesting to test it as a new default linker on such a large scale project. Also there is currently one test failing so I've disabled the tests for now: Testing mold-wrapper ... execl: No such file or directory make[1]: *** [Makefile.linux:6: elf/mold-wrapper.sh] Error 1 make[1]: *** Waiting for unfinished jobs.... ---- Petr From a1928e92512915a6d041da0195d6c2bb164f505d Mon Sep 17 00:00:00 2001 From: Petr Hodina Date: Wed, 29 Dec 2021 22:42:48 +0100 Subject: [PATCH 2/2] gnu: Add mold. * gnu/packages/WIP (mold): New variable. diff --git a/gnu/packages/raspberry-pi.scm b/gnu/packages/raspberry-pi.scm index a0142c2333..b59ec822c9 100644 --- a/gnu/packages/raspberry-pi.scm +++ b/gnu/packages/raspberry-pi.scm @@ -22,11 +22,21 @@ (define-module (gnu packages raspberry-pi) #:use-module (gnu packages algebra) #:use-module (gnu packages base) #:use-module (gnu packages bash) + #:use-module (gnu packages llvm) + #:use-module (gnu packages cmake) #:use-module (gnu packages commencement) + #:use-module (gnu packages compression) #:use-module (gnu packages cross-base) + #:use-module (gnu packages digest) #:use-module (gnu packages documentation) #:use-module (gnu packages file) + #:use-module (gnu packages linux) #:use-module (gnu packages gcc) + #:use-module (gnu packages tbb) + #:use-module (gnu packages tls) + #:use-module (gnu packages perl) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python) #:use-module (gnu packages embedded) #:use-module (guix build-system gnu) #:use-module (guix build-system cmake) @@ -74,6 +84,57 @@ (define-public mimalloc (home-page "https://github.com/microsoft/mimalloc") (license license:expat))) +(define-public mold + (package + (name "mold") + (version "1.0.2") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/rui314/mold") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (modules '((guix build utils))) + (snippet '(begin + (delete-file-recursively "third-party"))) + (sha256 + (base32 + "08iiycbzb4324mnzph6m4y5kf700zhr66c0sq93k5sajm3xy8dfi")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags (list "SYSTEM_MIMALLOC=true" "SYSTEM_TBB=true" + "SYSTEM_XXHASH=true" + (string-append "PREFIX=" %output)) + #:tests? #f ; failing test mold-wrapper + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-reference-to-cc + ;; This prevents errors like 'error: linker `cc` not found' when + ;; "cc" is not found on PATH. + (lambda* (#:key outputs inputs #:allow-other-keys) + (let ((gcc (assoc-ref inputs "gcc")) (util-linux (assoc-ref + inputs + "util-linux"))) + (substitute* "test/elf/exception.sh" + (("`pwd`/../../mold") (string-append (getcwd) "/mold"))) + (substitute* "test/elf/gc-sections.sh" + (("`pwd`/../../mold") (string-append (getcwd) "/mold"))) + (substitute* "test/elf/filler.sh" + (("hexdump") (string-append util-linux "/bin/hexdump"))) + (mkdir-p "/tmp/bin") + (symlink (string-append gcc "/bin/gcc") "/tmp/bin/cc") + (setenv "PATH" + (string-append "/tmp/bin:" + (getenv "PATH")))))) + (delete 'configure)))) + (native-inputs (list clang-12 gcc grep pkg-config util-linux xxhash)) + (inputs (list mimalloc openssl python tbb zlib)) + (synopsis "Modern Linker") + (description "This package provides a faster drop-in replacement for +existing Unix linkers.") + (home-page "https://savannah.gnu.org/projects/patch/") + (license license:gpl3+))) + (define-public bcm2835 (package (name "bcm2835") -- 2.34.0