From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CDDC33857805; Mon, 9 May 2022 16:19:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CDDC33857805 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/99453] libstdc++*-gdb.py installation depends on library naming Date: Mon, 09 May 2022 16:19:40 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 May 2022 16:19:40 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99453 --- Comment #21 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #0) > This will use the last matching file for the libstdc++* glob. That works > fine for ELF targets where the matching names are: >=20 > libstdc++.a > libstdc++.so > libstdc++.so.6 > libstdc++.so.6.0.29 >=20 > But not for MacOS with: >=20 > libstdc++.6.dylib > libstdc++.a >=20 > Or mingw with: >=20 > libstdc++-6.dll > libstdc++.dll.a >=20 > We need a better way to find the dynamic library, whether that's the > so.6.0.29 or the .dylib or the .dll, that doesn't depend on the shell's > alphabetic sort for the pattern. As the comment says, libtool doesn't give > us that info, but we can still do better. Hmm, this isn't fixed for mingw because the libtool libstdc++.la file has: # The name that we can dlopen(3). dlname=3D'libstdc++-6.dll' # Names of this library. library_names=3D'libstdc++.dll.a' # The name of the static archive. old_library=3D'libstdc++.a' This means we still choose libstdc++.dll.a-gdb.py as the hook name, which is still wrong. Yay for libtool.=