From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id cQ42CHtxemrd1RsAWB0awg (envelope-from ) for ; Mon, 10 Aug 2026 20:48:59 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=palves.net header.i=@palves.net header.a=rsa-sha256 header.s=dreamhost header.b=dNHBTb7L; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id F0DA61E09B; Mon, 10 Aug 2026 20:48:58 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, 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 618761E09B for ; Mon, 10 Aug 2026 20:48:58 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7BCDF4BB3BE8 for ; Tue, 11 Aug 2026 00:48:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7BCDF4BB3BE8 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=palves.net header.i=@palves.net header.a=rsa-sha256 header.s=dreamhost header.b=dNHBTb7L Received: from caracal.birch.relay.mailchannels.net (caracal.birch.relay.mailchannels.net [23.83.209.30]) by sourceware.org (Postfix) with ESMTPS id 11DBF4BB3BBF for ; Tue, 11 Aug 2026 00:48:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 11DBF4BB3BBF Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=palves.net ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 11DBF4BB3BBF Authentication-Results: sourceware.org; arc=none smtp.remote-ip=23.83.209.30 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786409312; cv=none; b=GpUdSdO4SAGj95D9vrBhDMorpD5cnflIVzuHMAxKQROjUfh2Dc5jLfnXnK4INsPfkWYN4b6RWhSFmrWMb96rkKh9pU4xpjEm0sC28sYVyq7bq8pkGVwJTtzvHqzvXbY4TVqkIPHw1JmPxrXISSl64Q9uV4BGz7XT55iojP5z+C8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786409312; c=relaxed/simple; bh=t4MKWTbfsfXxHKRO221vQ2k0lc6Wu5RNuAUZisZZxAM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=hvBcGhZJuG+X3AIiniNVjuLNC/MxqWl9UKlEB/S1a+JrttpelhbJjirTEaMtQSpqIGKjjLPMFW2eiFOnYVgX09vu+CKnOOOsbQ2khVqo4fxwSnESJa5jg9iDGUAEUVsqQ1GKC/6WW0yUGNfwv8I6NKCWMZejQuradZf1ldkCGRI= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=palves.net header.i=@palves.net header.a=rsa-sha256 header.s=dreamhost header.b=dNHBTb7L DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 11DBF4BB3BBF X-Sender-Id: dreamhost|x-authsender|pedro@palves.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 3339A4C2B8C for ; Tue, 11 Aug 2026 00:37:21 +0000 (UTC) Received: from pdx1-sub0-mail-a258.dreamhost.com (trex-green-1.trex.outbound.svc.cluster.local [100.108.68.160]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 181CE4C2B74 for ; Tue, 11 Aug 2026 00:37:21 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|pedro@palves.net X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|pedro@palves.net X-MailChannels-Auth-Id: dreamhost X-Macabre-Duck: 7ac51aad4f8d56bf_1786408641130_1579277415 X-MC-Loop-Signature: 1786408641130:809032812 X-MC-Ingress-Time: 1786408641130 Received: from pdx1-sub0-mail-a258.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.108.68.160 (trex/8.0.2); Tue, 11 Aug 2026 00:37:21 +0000 Received: from localhost (bl21-204-140.dsl.telepac.pt [2.82.204.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pedro@palves.net) by pdx1-sub0-mail-a258.dreamhost.com (Postfix) with ESMTPSA id 4hJt4J47Z9z105D for ; Mon, 10 Aug 2026 17:37:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=palves.net; s=dreamhost; t=1786408640; bh=ov/Ryzrr1B4lC3JvDE592QM5aYcHtS9PLekdvRWmiD4=; h=From:To:Subject:Date:Content-Transfer-Encoding; b=dNHBTb7L75F2wP7615l6+XQI+quoGdnJh62vX6LUf/qYMnQ2qpO5XNWz/CzdziskI JkgLbu3V4hEY0ULARQ41Ir8QdY/5UcbQufuvj4wcZ2vza2+4Jex5STnsP8PuNWFrD0 TWF/UB/Yec2SI9IkI4NCqx0JQeJYZ3uMaQU+FYm7+YB/fRqrms+0qMgRklmmGWDm21 AhYJQjItPxZfu+MIdq0aIcN0vjf45lWhnJ/w4uJxXCGbroU9si2mqimHQPvuuvPVZl IajANVX18LBX5nFNgu5av2DS33KuwMfrnR0603KdIe6dt0qLHjXrs7Zuf2D5PFFLIU Y9nvxNp/OQ7Ug== From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 1/2] gdb/testsuite: Force lld-link linker on windows-msvc Date: Tue, 11 Aug 2026 01:36:59 +0100 Message-ID: <20260811003700.3580470-2-pedro@palves.net> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260811003700.3580470-1-pedro@palves.net> References: <20260811003700.3580470-1-pedro@palves.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 clang windows-msvc defaults to using the Microsoft link.exe linker. That does not work with DWARF though, we have to use lld-link instead. That is why the whole windows-msvc support in the testsuite assumes the linker in use is lld-link. So far, I've been running the testsuite with CC_FOR_TARGET/CXX_FOR_TARGET pointing at a clang wrapper script that adds "-fuse-ld=lld-link", but I think this belongs in the testsuite directly, since it's not really optional. Change-Id: I5bcafa408696b349b829b4ffbd75037be25b3f3b --- gdb/testsuite/lib/gdb.exp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 6fb04869605..912ddf1cd54 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -6660,6 +6660,15 @@ proc gdb_compile {source dest type options} { } } + if {[istarget "*-*-windows-msvc*"]} { + # Clang wants to use the Microsoft linker by default. That + # doesn't support DWARF, so link with lld-link instead, which + # does support DWARF (and PDB/CodeView). Pass -Xarch_host so + # that when we're compiling HIP code, we only affect the host + # linker. + lappend new_options "early_flags=-Xarch_host -fuse-ld=lld-link" + } + # If the 'build-id' option is used, then ensure that we generate a # build-id. It is possible that the compiler is configured to do # so automatically, but at least for GCC the configure option -- 2.54.0