From debbugs-submit-bounces@debbugs.gnu.org Wed May 14 02:41:57 2025 Received: (at submit) by debbugs.gnu.org; 14 May 2025 06:41:58 +0000 Received: from localhost ([127.0.0.1]:38376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uF5oT-00060s-DC for submit@debbugs.gnu.org; Wed, 14 May 2025 02:41:57 -0400 Received: from lists.gnu.org ([2001:470:142::17]:55338) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uF5oP-00060Z-OS for submit@debbugs.gnu.org; Wed, 14 May 2025 02:41:54 -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 1uF5oI-0002kS-KO for guix-patches@gnu.org; Wed, 14 May 2025 02:41:47 -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 1uF5oH-0000r9-3F; Wed, 14 May 2025 02:41:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=flNWAOwltJlugOX1W8TyNqjbHGeLQa7n8jmbruTkShI=; b=EQGc9WoKEDdGia xAfTO2ZDpGPOot4Pw9bPNjpH0vVR/vUai97LnDX3n4KsrvJ05tGDGz0M0xL/SokPKUxKwuUC/bTOa XK7MGU3soEgRU06xB279ad2aLX+IVlbGSlYdtBX/Ni7Cor8PkRv3nS7R9ok30l6vJZ3QCCh+BTomp SiWfE6rp40LPeFBfMnD+xArLL4kDrqLsGSZH8n+z/QbFG/aCOigAos4LXpw1UuZFP7eKk43e7Ymp4 rQlf4gks/wbrZBP5KID+kuE0NQzfwOSmH1Mjv12kXrGEOPWrpGpzUUdFTtRF9QR0ahdJGBnXkKvER qO5wNRtLwDBOkSi3vUag==; From: Janneke Nieuwenhuizen To: guix-patches@gnu.org Subject: [PATCH 0/2] MinGW: Use winpthreads by default. Date: Wed, 14 May 2025 08:41:19 +0200 Message-ID: X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 X-Debbugs-Cc: Andreas Enge , Janneke Nieuwenhuizen , Ludovic Courtès , Zheng Junjie Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: submit Cc: Carl Dong X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Using a version of mingw-64 with winpthreads, packages that support posix threads, such as Guile, can be (cross-)built for MinGW with thread support. Also, since gcc-13, a MinGW (cross-)compiler provides g++ with std::mutex when built with a version of mingw-w64 that has winpthreads enabled. Now that we are using gcc-14 for cross-builds, switching to MingGW packages and a MinGW cross-build toolchain that uses winpthreads is probably helpful. Greetings, Janneke Janneke Nieuwenhuizen (2): gnu: mingw-w64-i686, mingw-w64-x86_64: Use winpthreads. gnu: cross-base: mingw: Use winpthreads by default. gnu/packages/cross-base.scm | 16 ++++++++++------ gnu/packages/mingw.scm | 8 +++++--- 2 files changed, 15 insertions(+), 9 deletions(-) base-commit: 5f5d84beccc180f1b51474c0e47eb6e0d0c9175f -- 2.49.0 From debbugs-submit-bounces@debbugs.gnu.org Wed May 14 02:45:57 2025 Received: (at 78417) by debbugs.gnu.org; 14 May 2025 06:45:57 +0000 Received: from localhost ([127.0.0.1]:38399 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uF5sK-0006Ea-Jg for submit@debbugs.gnu.org; Wed, 14 May 2025 02:45:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42190) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uF5sI-0006E9-9k for 78417@debbugs.gnu.org; Wed, 14 May 2025 02:45:55 -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 1uF5sC-0001Nh-Vl; Wed, 14 May 2025 02:45:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=o9cPLWKJ567CEjhm2PIccx7eTuilY+nkb9YiJf4J4Gk=; b=QF+x/5rD4cIpaxjm6Jjg 9li9cX0tphEPaELIcPKtTqInwExAtO+xXsHn+pZ46iIrkofbfqRo+luhephjotwWY7d0/9BQrBpK9 LdWbO2D2CJf0Xz34G7TJq+5xO3JaJmulGi3SYVlmgjbJmKaMY22+w8AQwM2VR8OrUa2mTFhhhPM/F SFThy3FSHD8EFPes84ys3ucqWrfhQfD7KNk30zF6zm3YavXyBEQ0FFTAgVk2+zdq93QZtoWuaIhX/ UEUH1/yS7y7EGrtL0kFD4MKbi39cIbvumJJxY5ERAOP6XYz/bVtZO3w8ddsoYOSX4o0UbNI50r9Zl n4MCSFRcEVpyPg==; From: Janneke Nieuwenhuizen To: 78417@debbugs.gnu.org Subject: [PATCH 1/2] gnu: mingw-w64-i686, mingw-w64-x86_64: Use winpthreads. Date: Wed, 14 May 2025 08:45:21 +0200 Message-ID: X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 78417 Cc: Carl Dong X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/mingw.scm (mingw-w64-i686, mingw-w64-x86_64): Enable winpthreads by default. (mingw-w64-i686-sans-winpthreads, mingw-w64-x86_64-sans-winpthreads): New variables providing variants without winpthreads. Change-Id: Iaf34d9cc812543762cfd626693ea715880341c13 --- gnu/packages/mingw.scm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gnu/packages/mingw.scm b/gnu/packages/mingw.scm index ea579d4043..ed7b87e3b1 100644 --- a/gnu/packages/mingw.scm +++ b/gnu/packages/mingw.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2016 Jan Nieuwenhuizen +;;; Copyright © 2016, 2025 Janneke Nieuwenhuizen ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2019 Carl Dong ;;; Copyright © 2021 Léo Le Bouter @@ -132,10 +132,10 @@ (define* (make-mingw-w64/implementation machine (define make-mingw-w64 (memoize make-mingw-w64/implementation)) -(define-public mingw-w64-i686 +(define-public mingw-w64-i686-sans-winpthreads (make-mingw-w64 "i686")) -(define-public mingw-w64-x86_64 +(define-public mingw-w64-x86_64-sans-winpthreads (make-mingw-w64 "x86_64")) (define-public mingw-w64-i686-winpthreads @@ -146,6 +146,8 @@ (define-public mingw-w64-x86_64-winpthreads (make-mingw-w64 "x86_64" #:with-winpthreads? #t)) +(define-public mingw-w64-i686 mingw-w64-i686-winpthreads) +(define-public mingw-w64-x86_64 mingw-w64-x86_64-winpthreads) (define-public mingw-w64 mingw-w64-i686) (define-public mingw-w64-tools -- 2.49.0 From debbugs-submit-bounces@debbugs.gnu.org Wed May 14 02:46:02 2025 Received: (at 78417) by debbugs.gnu.org; 14 May 2025 06:46:02 +0000 Received: from localhost ([127.0.0.1]:38401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uF5sQ-0006Ez-5J for submit@debbugs.gnu.org; Wed, 14 May 2025 02:46:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39422) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uF5sJ-0006EB-8D for 78417@debbugs.gnu.org; Wed, 14 May 2025 02:45:55 -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 1uF5sD-0001Nr-V9; Wed, 14 May 2025 02:45:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=YnhNBdXlrOoMIRWsZLhyDZXomnnE/UQBQWZacSGj7tA=; b=kn1qgxlQIDOYJuD5qAZ8 oBmu2nFara9eqASOkXI3KTJliEMqtcE7p4UfoabFnEHV98mzGJMrrbjCQiGnUqMoS8qqATTZ6WmC9 NNNRv+s1Fq9xO3CMsvsU73JIyTA6uJ1mxQuz9UUvW21/L8h9S83o0/dl8MgrISmEHZd5O2aeuspP7 srlsGhwR1fSxUGqKYdt/oIbAL3ctCHxO7Jgdohj0ouOAs0jlFFV/3wHxO2IgL5gPHqUj1AYkX3SHc AhF1cwej5cAPJQzGeW6rZsofOAjL6xyKbUNpPusk8NO3hhoyNDWjrLq/4613ZfSrY3c2YbcVtI7mW APlLcDu+VXfteg==; From: Janneke Nieuwenhuizen To: 78417@debbugs.gnu.org Subject: [PATCH 2/2] gnu: cross-base: mingw: Use winpthreads by default. Date: Wed, 14 May 2025 08:45:22 +0200 Message-ID: X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 X-Debbugs-Cc: Andreas Enge , Janneke Nieuwenhuizen , Ludovic Courtès , Zheng Junjie Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 78417 Cc: Carl Dong X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Using a version of mingw-64 with winpthreads, packages that support posix threads, such as Guile, can be (cross-)built for MinGW with thread support. Also, since gcc-13, a MinGW (cross-)compiler provides g++ with std::mutex when built with a version of mingw-w64 that has winpthreads enabled. * gnu/packages/cross-base.scm (cross-gcc-toolchain/implementation): Add #:with-winpthreads? parameter, defaulting to #t. Pass it... (cross-libc*): ...to new #:with-winpthreads? parameter here, defaulting to #t. Pass it to make-mingw-w64 for winpthread support. Change-Id: Iaf34d9cc812543762cfd626693ea715880341c13 --- gnu/packages/cross-base.scm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 5df06418e3..97afa240e3 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013-2018, 2020, 2023-2024 Ludovic Courtès ;;; Copyright © 2014, 2015, 2018 Mark H Weaver -;;; Copyright © 2016, 2019, 2023, 2024 Janneke Nieuwenhuizen +;;; Copyright © 2016, 2019, 2023-2025 Janneke Nieuwenhuizen ;;; Copyright © 2016 Manolis Fragkiskos Ragkousis ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2019, 2020, 2021 Marius Bakke @@ -673,7 +673,8 @@ (define* (cross-libc* target (libc (libc-for-target target)) (xgcc (cross-gcc target)) (xbinutils (cross-binutils target)) - (xheaders (cross-kernel-headers target))) + (xheaders (cross-kernel-headers target)) + (with-winpthreads? #t)) "Return LIBC cross-built for TARGET, a GNU triplet. Use XGCC and XBINUTILS and the cross tool chain. If TARGET doesn't have a standard C library #f is returned." @@ -682,7 +683,8 @@ (define* (cross-libc* target (let ((machine (substring target 0 (string-index target #\-)))) (make-mingw-w64 machine #:xgcc xgcc - #:xbinutils xbinutils))) + #:xbinutils xbinutils + #:with-winpthreads? #t))) ((or (? target-linux?) (? target-hurd?)) (package (inherit libc) @@ -787,10 +789,12 @@ (define* (cross-gcc-toolchain/implementation target #:key (base-gcc %xgcc) (xbinutils (cross-binutils target)) + (with-winpthreads? #t) (libc (cross-libc - target - #:xgcc (cross-gcc target #:xgcc base-gcc) - #:xbinutils xbinutils)) + target + #:xgcc (cross-gcc target #:xgcc base-gcc) + #:xbinutils xbinutils + #:with-winpthreads? with-winpthreads?)) (xgcc (cross-gcc target #:xgcc base-gcc #:libc libc -- 2.49.0 From debbugs-submit-bounces@debbugs.gnu.org Fri May 23 03:40:32 2025 Received: (at 78417-done) by debbugs.gnu.org; 23 May 2025 07:40:32 +0000 Received: from localhost ([127.0.0.1]:44815 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uIN15-00087g-V1 for submit@debbugs.gnu.org; Fri, 23 May 2025 03:40:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40628) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uIN12-000870-Uy for 78417-done@debbugs.gnu.org; Fri, 23 May 2025 03:40:30 -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 1uIN0w-0007Td-1t; Fri, 23 May 2025 03:40:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=p3CY4vQA+iuW85gYsa+9jDQ+ULZKxddRczdcNJFPqr0=; b=W5tUICXOFcU5aRTO7eSX YYeZpNohv8SZ4pQXZ12dI/vYLgk+D0ysXsj6INRx1F3PIUucRvnkz6LF/A3j1ET5/lU5yk/kVK5CM cr5EeLFdHNf71bPJYdOqBlLHtIXk/o9clRL0DrFRLCq+1dCxahdnp031Rk3G9OK9xFli3IEOglhOW t9dbu0gQlAnh9W7mqwdHtmk1PqBzJV9uWdkPT/I2BgqcWMqY0QKWjn77Bfvi8m9G0bewbqHWJGbJH XqzGM8OtFWm1HvzJDDUfyGrVfmsya/8njDJ396oiwfXfae/rWFNIo3WXc7NbP+Kba6wsbjak5+EBC jv45zlhGSLtQtA==; From: Janneke Nieuwenhuizen To: 78417-done@debbugs.gnu.org Subject: Re: [PATCH 0/2] MinGW: Use winpthreads by default. In-Reply-To: (Janneke Nieuwenhuizen's message of "Wed, 14 May 2025 08:41:19 +0200") Organization: AvatarAcademy.nl References: X-Url: http://AvatarAcademy.nl Date: Fri, 23 May 2025 09:40:18 +0200 Message-ID: <87r00fvkpp.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 78417-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Janneke Nieuwenhuizen writes: > Now that we are using gcc-14 for cross-builds, switching to MingGW packag= es > and a MinGW cross-build toolchain that uses winpthreads is probably helpf= ul. Pushed to master as 99ba2814d13331231f2b79603c91987d5976de3e Greetings, Janneke --=20 Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade= my.com