From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id goZcK8vdUWrxnwIAWB0awg (envelope-from ) for ; Sat, 11 Jul 2026 02:08:11 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=ZN1bkGLR; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id A50871E04F; Sat, 11 Jul 2026 02:08:11 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 7D4231E04F for ; Sat, 11 Jul 2026 02:08:10 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6DF634BA23C9 for ; Sat, 11 Jul 2026 06:08:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6DF634BA23C9 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=ZN1bkGLR Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 42C0A4BA2E11 for ; Sat, 11 Jul 2026 06:07:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 42C0A4BA2E11 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 42C0A4BA2E11 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1783750064; cv=none; b=NmWwH8ZhbgOJsC6UH1X9elyfp1h9CE5ptBIBGWx50kT76HYUeT/HiQlg+PxQmyTGUjZLXgcmE+CBNmUywjUVluaUyChgaM7aRWMrZQ7uxPKaoBt3vnwj5F3Mz8MoXiLlRdjvsd8Nsr0Y1cKhw/T0nk+UhD49sxLGvRyTplQp4Fc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1783750064; c=relaxed/simple; bh=4rOpMGaafZGlNNSAdhwJvMxa4s9Arhb34v5+DwYwNuk=; h=DKIM-Signature:Date:Message-Id:From:To:Subject; b=seL81fXOh54XgfkxuBw14E6b7dwv2314vkTBp4xpf/SxAMXNLRQJ86m7svplhmaI/Wxy/VbJorG3Jd2KlxTIKqLBfMZA3dMeUXBVmMXqZ4TmABPI7Ku4ZFhw7C6MOQi+EAnXj5n8xO8xbIcbTxrJ+V/C6mi3DPGNKy8IUaAJUc4= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=ZN1bkGLR DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 42C0A4BA2E11 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 1wiQsJ-0001iY-L8; Sat, 11 Jul 2026 02:07:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=9tBO4iVbPXI5oR+GOu+Y9Zp1DP1PriNgrjwaY8041og=; b=ZN1bkGLRmDSx ZDUvOZu63/5fHyyseuF6c3CyYCPyQXDmIfctVmtfSlaQ9/pyDfYKM7hE949cYLsou4NNbgebOJR+B H82a0SjWBvqmDpzP2Fmm/YOrXhBB4qUlOhItoKOk/sezK8LX1MmLuV7y+LhTwLZt/RLQpVz9S2jdT 4lwWvfDuvOCJfUA3nhVdQAX9JwB1XzyxKBbb8FYEs16Aq7hUFGg1S3fTlXjkj9zr2jFHfhldXwQRZ fkqhIGRshNKQsOtQezWYgsMr7eq/LzqEXoozmcVfzm9a21KOnFqI8Zk9XvTKfKOlTblHkShbfZr1c MSvexBuElNKOOBgzwP47iQ==; Date: Sat, 11 Jul 2026 09:07:40 +0300 Message-Id: <86ldbijbyr.fsf@gnu.org> From: Eli Zaretskii To: Pedro Alves Cc: gdb-patches@sourceware.org In-Reply-To: <17aacd11-cc42-43eb-8328-bdcedcc0dfb5@palves.net> (message from Pedro Alves on Fri, 10 Jul 2026 19:59:17 +0100) Subject: Re: [PATCH] gdb/Windows testsuite: Embed asInvoker manifest in test executables References: <20260709174351.431907-1-pedro@palves.net> <86zezzjucz.fsf@gnu.org> <17aacd11-cc42-43eb-8328-bdcedcc0dfb5@palves.net> X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org > Date: Fri, 10 Jul 2026 19:59:17 +0100 > Cc: gdb-patches@sourceware.org > From: Pedro Alves > > It's curious that you bring up patch.exe. In the downstream testcase > I mention, the initial comment that I wrote there mentioned "patch" as "bad" > word too (as some docs somewhere mention it), and then after the initial fix, > I noticed that "patch" is actually OK, and so I dropped it from the comment > in a follow up patch. It used to be a problem in some older builds of Windows 11 (and nasty one not even a manifest could work around it), but ceased to be a problem a few system updates ago. I have no idea what is the situation on Windows 10, though. > $ mv update.exe patch.exe > $ ./patch.exe > Hello! > > So looks like Microsoft decided that "patch" wasn't a bad word after all > at some point more recently... Yes. But do we want to rely on the test suite being run only on the latest builds of Windows? > Also, I noticed that executables produced by the GCC 16 that comes with > MSYS2 do not have the issue. (??!) Digging a bit, it turns out that both MSYS2 and > Cygwin ship a default-manifest.o object file that GCC pulls in via a spec file. > This default-manifest.o file is in a separate optional package, which may be > removed, and GCC keeps working, just won't link in the default manifest. > > https://gcc.gnu.org/legacy-ml/gcc-patches/2014-04/msg01378.html > https://sourceforge.net/p/mingw-w64/wiki2/default_manifest/ Thanks, that's good to know. > Find below the new patch adding a manifest to every executable in the testsuite. WDYT of this one? LGTM. > + # Embed our manifest file. Pass it in Windows-native form. > + # MSYS2's argument conversion treats a "/foo:/bar" argument as a > + # colon-separated list of POSIX paths and mistakenly rewrites it > + # to a semicolon-separated list of Windows paths. E.g.: > + # > + # "/manifestinput:/c/gdb/.../windows.manifest" > + # => > + # "C:\msys64\manifestinput;C:\gdb\...\windows.manifest" > + # > + # I.e., the flag name itself gets converted as if it were a path, > + # and the ":" becomes ";". > + # > + # What triggers the conversion is the value after the colon looking > + # like an absolute POSIX path (a leading "/"). "/manifest:embed" > + # above is left alone because "embed" doesn't. Passing the value > + # as a native "C:/..." path likewise avoids it. > + set manifest [host_file_normalize ${srcdir}/lib/windows.manifest] > + lappend ldflags ldflags=-Wl,/manifestinput:${manifest} IME, you can work around this incorrect conversion by setting MSYS_NO_PATHCONV=1.