From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-f46.google.com (mail-oa1-f46.google.com [209.85.160.46]) by sourceware.org (Postfix) with ESMTPS id 8AEBC39960D4 for ; Sun, 20 Nov 2022 16:21:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8AEBC39960D4 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=lis.ac.uk Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oa1-f46.google.com with SMTP id 586e51a60fabf-141ca09c2fbso11289997fac.6 for ; Sun, 20 Nov 2022 08:21:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7UJ9hHiXq2Qtn0wcAWovI+nAV1CjJhQo3cq6vY6IEp4=; b=tDDEsv6hs1YkI5lKIX0hen2QrxtSKJQRn3Inj6sDbzSn9PJw00v8F+2tvliq9leyHF wddE+8xn32PeoFmZFwfQtpc6vSqYH8STFlL8keUQCqkQImA7uBmTMcTh+AeQyCpWcYcn 3DoHoYZSwGgjcHnK8yRC7A01j5lYCtgtUBXlykGy20aWmTzIM9CPuHIbvnt7N6I3uqFZ tUagQwKwkJsOjuHjqYfpFjoiG1/UYxm87/68tCdSzzpAFBwyaoj5qwBJlWK+omLmy1rF 4IaOvHx3dCprS6VJBF6RQzSIzZzNPkaAX19Xvg1rjwRmtxIXAeNjdX7ct5bfuj7c90yC zH7w== X-Gm-Message-State: ANoB5pnsx8J9iMyA1vpIndJKZXJccRTixgRvV2E78F7+s0jBARDbVyRJ vXfJnL6mWpXUQPykLSuha3NGCRFED+hwlA== X-Google-Smtp-Source: AA0mqf6sFxV8JuxCVThynzTFEgATqjr99kfv/5SS7TonSlUl991H7xBE5sqoI8ZEQoJojJPsCe9urg== X-Received: by 2002:a05:6870:c04:b0:140:6f54:f094 with SMTP id le4-20020a0568700c0400b001406f54f094mr609105oab.154.1668961264621; Sun, 20 Nov 2022 08:21:04 -0800 (PST) Received: from mail-ot1-f44.google.com (mail-ot1-f44.google.com. [209.85.210.44]) by smtp.gmail.com with ESMTPSA id p9-20020a4ae149000000b0049bfbf7c5a8sm3401280oot.38.2022.11.20.08.21.03 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 20 Nov 2022 08:21:03 -0800 (PST) Received: by mail-ot1-f44.google.com with SMTP id a13-20020a9d6e8d000000b00668d65fc44fso6040246otr.9 for ; Sun, 20 Nov 2022 08:21:03 -0800 (PST) X-Received: by 2002:a9d:866:0:b0:661:ac82:57b3 with SMTP id 93-20020a9d0866000000b00661ac8257b3mr8094502oty.74.1668961263016; Sun, 20 Nov 2022 08:21:03 -0800 (PST) MIME-Version: 1.0 References: <20221120125348.a6xh7kxmvrimse72@pali> <83cz9h65wc.fsf@gnu.org> <20221120150411.yimchs4ic3xtvny3@pali> <837czp6464.fsf@gnu.org> <20221120154408.us5szwo7eaiwz2ba@pali> <834jut62jc.fsf@gnu.org> In-Reply-To: <834jut62jc.fsf@gnu.org> From: Matthew Brett Date: Sun, 20 Nov 2022 16:20:26 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [Mingw-w64-public] gcc parameter -mcrtdll= for choosing Windows C RunTime DLL library To: mingw-w64-public@lists.sourceforge.net Cc: =?UTF-8?Q?Pali_Roh=C3=A1r?= , gcc@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi, On Sun, Nov 20, 2022 at 3:59 PM Eli Zaretskii wrote: > > > Date: Sun, 20 Nov 2022 16:44:08 +0100 > > From: Pali Roh=C3=A1r > > Cc: gcc@gcc.gnu.org, mingw-w64-public@lists.sourceforge.net > > > > > Installing a redistributable is a nuisance, and dependence on non-sys= tem > > > libraries might make the program non-free. > > > > On new windows versions they may be preinstalled (depends on newness of > > windows version). > > I'm talking about older ones. It is customary nowadays to build on Windo= ws > 11 and then run on Windows 8. > > > And if your application uses features unavailable in > > older (or default) crt versions then this make application code > > simplifier. Also redistributable packages are in most cases installed b= y > > Windows update mechanism, which could be marked as system library. But > > well, this is more license discussion than development discussion... > > I mentioned that because people might inadvertently build GPL'ed GNU > software using this option, and violate the GPL without knowing it. This= is > relevant to those who read this list and port GNU software to MS-Windows. > > > > > Note that with this option, you can also choose older version than = the > > > > default one (WinXP msvcrt.dll). So e.g. you can choose msvcrt20.dll= or > > > > crtdll.dll for older Windows version. > > > > > > Using the OS default MSVCRT already gets me that, at zero cost. > > > > Here "OS default MSVCRT" means Windows XP MSVCRT.DLL. > > > > On older windows versions there is no pre-installed MSVCRT.DLL. There > > is MSVCRT20.DLL or CRTDLL.DLL (based on oldness of windows version). So > > it is not at zero cost, you have yo either do that nuisance and install > > MSVCRT.DLL as you write above or switch to older CRT version which is i= n > > OS preinstalled. > > I never saw any problems with programs linked against MSVCRT.DLL, on all > versions of Windows from XP up to Windows 10. None. It's hard to argue that it is rarely necessary or desirable to link to - say - UCRT. If it was, then we would not have the UCRT toolchains. And in our particular case (Python extension modules) we need to use UCRT linking to be compatible with the UCRT-linked standard Python binary installs. Cheers, Matthew