From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by sourceware.org (Postfix) with ESMTPS id 6035E3895FF5 for ; Sun, 20 Nov 2022 15:44:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6035E3895FF5 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x629.google.com with SMTP id kt23so23554117ejc.7 for ; Sun, 20 Nov 2022 07:44:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=nmGgmqV8wejoYQ9gYPa5knVfvV5RruJr0TLQWEl0iIE=; b=O9+urjgxHt8PwaKO8T+KgFXgJi9icfe61t3CJXxRc+omO4HAxtYZpfaE0nWZzZXRZs /vLtnyQPgfJGdrHZh2Td/+ijLfdKxnPfGRdbrHeBZfrL49U9FmUdz/5Rbc2XxLQYhDHz aY9X8D+GbbLa/+bamwq7UyO/VQx7fQ/JXW9uaeYjHF9bHXlWUoZof4epgGQYWhmxIMkT Gd/SfvI1GhSJ/XoRIIN4E3ZF17LyLJQQyUhJZhLwCx6fOAkRr4IdPCKllt3saiYuf21d 73gA5OdwMo+D98tPGM2K96NTyqpBJj0kO5ZBZ931J/kEnW17TrudbSIOPpV3hmaaYosD DXDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nmGgmqV8wejoYQ9gYPa5knVfvV5RruJr0TLQWEl0iIE=; b=OL5lm3w3mq3RT+VT/uBoy7kCSXVeXj/hEHZ7uXdvK0fqjQ7wjaUIs6Vl4dam8MSPVo XqtBnVCQPaJutpUFASUJkt/2LXOSnTDzTXpGZpFkTGtKbJRXhaTcXgNTcuiSRS3yIc/C OsvadaIywUyiwBAFXRzftyXH2wMPwm/RPrMP8lX4u4o1cwc5OAHwI1bO91a9aSteFBRz U9F4PKer4SsdUmvFlAQBe7bIJlsvhpYW8katYbXotup/bZ1Ot2D2YSrC40JfZbcVCPat vLyRKkKO6MwEGOHfLLtjmMxfH5OBR/Q8Vo1rNU/J6E6TgDyRdY9mwMVO2zPbHXs3Qkd2 ELxA== X-Gm-Message-State: ANoB5pl+SM66GbgmYsP91rvuNQUG4AKVGkGj2fL30Kj8iZUd9dS/pkdY f0I9iq80VuHcmrNCeLbKHUM= X-Google-Smtp-Source: AA0mqf6O74Sg5FYS3ESpr/wAiMMsFPqppSnt4dQctn18Hbu9sxFtsrEMbEVRgSkDLNeyXrRN4P+0Fg== X-Received: by 2002:a17:906:b29a:b0:78d:b695:1d68 with SMTP id q26-20020a170906b29a00b0078db6951d68mr4098362ejz.235.1668959050802; Sun, 20 Nov 2022 07:44:10 -0800 (PST) Received: from pali ([2a02:2b88:6:5cc6::2f]) by smtp.gmail.com with ESMTPSA id h29-20020a056402095d00b00467481df198sm4139276edz.48.2022.11.20.07.44.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Nov 2022 07:44:10 -0800 (PST) Date: Sun, 20 Nov 2022 16:44:08 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Eli Zaretskii Cc: gcc@gcc.gnu.org, mingw-w64-public@lists.sourceforge.net Subject: Re: gcc parameter -mcrtdll= for choosing Windows C RunTime DLL library Message-ID: <20221120154408.us5szwo7eaiwz2ba@pali> References: <20221120125348.a6xh7kxmvrimse72@pali> <83cz9h65wc.fsf@gnu.org> <20221120150411.yimchs4ic3xtvny3@pali> <837czp6464.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <837czp6464.fsf@gnu.org> User-Agent: NeoMutt/20180716 X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Sunday 20 November 2022 17:23:15 Eli Zaretskii wrote: > > Date: Sun, 20 Nov 2022 16:04:11 +0100 > > From: Pali Rohár > > Cc: gcc@gcc.gnu.org, mingw-w64-public@lists.sourceforge.net > > > > On Sunday 20 November 2022 16:45:55 Eli Zaretskii wrote: > > > > Date: Sun, 20 Nov 2022 13:53:48 +0100 > > > > From: Pali Rohár via Gcc > > > > > > > Linking a program against a specific runtime means the produced binary will > > > not run on Windows systems older than the one where it was linked. Why is > > > such a limitation a good idea, may I ask? > > > > It will run also on older Windows system if you install redistributable > > runtime library. Which in most cases is already installed because other > > programs use it. > > Installing a redistributable is a nuisance, and dependence on non-system > libraries might make the program non-free. On new windows versions they may be preinstalled (depends on newness of windows version). 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 by Windows update mechanism, which could be marked as system library. But well, this is more license discussion than development discussion... > > And why you want a new version? Because of better C99/C11 support which > > is in ucrtbase.dll > > That comes with a price, though. > > > 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 in OS preinstalled. And proposed gcc parameter -mcrtdll could simplify that switch.