From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id iXJYBywRYmr2WSkAWB0awg (envelope-from ) for ; Thu, 23 Jul 2026 09:03:40 -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=LBoplgI4; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 1964D1E09E; Thu, 23 Jul 2026 09:03:40 -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 B324B1E099 for ; Thu, 23 Jul 2026 09:03:38 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DF18B4BA79A4 for ; Thu, 23 Jul 2026 13:03:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DF18B4BA79A4 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=LBoplgI4 Received: from hedgehog.cherry.relay.mailchannels.net (hedgehog.cherry.relay.mailchannels.net [23.83.223.81]) by sourceware.org (Postfix) with ESMTPS id A65AF4BA79B5 for ; Thu, 23 Jul 2026 13:02:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A65AF4BA79B5 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 A65AF4BA79B5 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=23.83.223.81 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784811777; cv=none; b=DKfXycnbIM4Sm1YaPeqrFcHagG4f8iqCX665FtqJvPqWs/J8QMty+fjwZJRyOmp2S2GHVnTqoFrZdIMXrl+f0l+Zruwgv8ynACdi1OE7RmQtr9Rp0OG1+4Swpj7+GyKZ87qOamfU1aRJ3TnwBxIa6uT34RP9bRW+KHMS7veEq+A= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784811777; c=relaxed/simple; bh=JL7G2h8NWM21X3gx5YsryLHTjbf9dN/NDoioAgTOTfw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=X8kDRc4MBFcGQhsbMzNSbkJnEo9URo3Fa/DyWeK+eBE3gfxK4bOhutBvQAveUg2rgfcVJawe9dvUyy/D31IbHNkogG3hgnAfkRYFjczgx65bdgC9vqM76aw7jBmWxB2AoPICr+8l/NGSkQAWZJgUTPrG/jSK1qu/JadA5Vbx0L0= 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=LBoplgI4 DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A65AF4BA79B5 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 C5D088C2D0F for ; Thu, 23 Jul 2026 13:02:55 +0000 (UTC) Received: from pdx1-sub0-mail-a249.dreamhost.com (trex-green-1.trex.outbound.svc.cluster.local [100.103.88.1]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 64BE88C337F for ; Thu, 23 Jul 2026 13:02:55 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|pedro@palves.net X-MC-Relay: Good X-MailChannels-SenderId: dreamhost|x-authsender|pedro@palves.net X-MailChannels-Auth-Id: dreamhost X-Army-Shoe: 317205eb36cfc4c6_1784811775643_3431655453 X-MC-Loop-Signature: 1784811775643:565628614 X-MC-Ingress-Time: 1784811775643 Received: from pdx1-sub0-mail-a249.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.103.88.1 (trex/8.0.2); Thu, 23 Jul 2026 13:02:55 +0000 Received: from localhost (bl20-181-64.dsl.telepac.pt [2.81.181.64]) (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-a249.dreamhost.com (Postfix) with ESMTPSA id 4h5WWL5t6pz1049 for ; Thu, 23 Jul 2026 06:02:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=palves.net; s=dreamhost; t=1784811775; bh=OtwVsOOVmIP4CCRLaGHKb3NdFQNE3Y5tU+csaYAjLNs=; h=From:To:Subject:Date:Content-Transfer-Encoding; b=LBoplgI4+QZnnit6/StdpuilvEso4F7PIIJygugeAw8ggAUI27KzsVYMkaSstzUcv 3CAZ5M2SBQUy59DlffyU81VmVM6Dqcs3+o06EW4nWm6Q6/wknZIMEiupULHzkRR+uU 1NVXzpO+uUEgxQQSYtv+moWHEPcIvd17t7q5Veb1vbxjGbkkfHx5tSs2SUhkXUY/5S jie//PxqMPqbUvCRAwXjAsekSNowsBTY6UIH4guSnBsgdqyuWtrwk+gecEA9IW3GCZ +jBfsbBimr+mdX7R1EqmbguQEMDuJcktOSAvZ9b8dIdfRkbIqnlsX9q4NOCnNkunk1 k+m+fGtZgr12g== From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 07/27] gdb/testsuite: Use /IMPLIB on windows-msvc to name import libraries Date: Thu, 23 Jul 2026 14:00:58 +0100 Message-ID: <20260723130118.206735-8-pedro@palves.net> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260723130118.206735-1-pedro@palves.net> References: <20260723130118.206735-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 When building a shared library for a test, gdb_compile_shlib asks the linker to write an import library named after the DLL, so that the test executable can later link against it. This currently always uses GNU ld's --out-implib switch. lld-link, the linker Clang drives on a windows-msvc target, does not understand --out-implib. It only accepts MSVC's link.exe slash-style flags. Use /IMPLIB instead, which names the import library the same way. Change-Id: I3deb3f0d16c27891b69e40f01656944ed5d52210 --- gdb/testsuite/lib/gdb.exp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 25f01ed9727..c9ee8e9753d 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -7308,7 +7308,11 @@ proc gdb_compile_shlib_1 {sources dest options} { } else { set name ${dest} } - lappend link_options "ldflags=-Wl,--out-implib,${name}.a" + if { [istarget "*-*-windows-msvc*"] } { + lappend link_options "ldflags=-Wl,/IMPLIB:${name}.a" + } else { + lappend link_options "ldflags=-Wl,--out-implib,${name}.a" + } } else { # Set the soname of the library. This causes the linker on ELF # systems to create the DT_NEEDED entry in the executable referring -- 2.54.0