From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 15DB63858D37; Wed, 1 Feb 2023 19:01:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 15DB63858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1675278085; bh=3UYUsWTWHcDKT0K4VMWDYva7AC2ey2VElTL4nMO1SXA=; h=From:To:Subject:Date:From; b=ZsFmXzWAMsEHTJ88URIaX1iySnmW4tv939oR9pHMuX2dCgCZf0nnYhKXxvjYWrK/Q +P91r3LxuiahgqMgJdueyS1YtJct0VbuYCHqnf1BID+X2fGrcGkFbWIe1mifbbt4jY wMWlz2zotwCdvJz4WlKCeGyABjjVIU0SrvdiY/Lk= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin/main] dumper: avoid linker problem when `libbfd` depends on `libsframe` X-Act-Checkin: newlib-cygwin X-Git-Author: Johannes Schindelin X-Git-Refname: refs/heads/main X-Git-Oldrev: 3a4c740f59c03b4c8346fa0ee8599b1c0582ae96 X-Git-Newrev: 89f930a9649ed9e419c7d8b2372c684313069a5b Message-Id: <20230201190125.15DB63858D37@sourceware.org> Date: Wed, 1 Feb 2023 19:01:25 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D89f930a9649= ed9e419c7d8b2372c684313069a5b commit 89f930a9649ed9e419c7d8b2372c684313069a5b Author: Johannes Schindelin AuthorDate: Wed Feb 1 15:08:16 2023 +0100 Commit: Corinna Vinschen CommitDate: Wed Feb 1 20:00:01 2023 +0100 dumper: avoid linker problem when `libbfd` depends on `libsframe` =20 A recent binutils version introduced `libsframe` and made it a dependency of `libbfd`. This caused a linker problem in the MSYS2 project, and once Cygwin upgrades to that binutils version it would cause the same problems there. =20 Let's preemptively detect the presence of `libsframe` and if detected, link to it in addition to `libbfd`. =20 Signed-off-by: Johannes Schindelin Diff: --- winsup/configure.ac | 5 +++++ winsup/utils/Makefile.am | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/winsup/configure.ac b/winsup/configure.ac index b155cabe4374..76baf0a7da62 100644 --- a/winsup/configure.ac +++ b/winsup/configure.ac @@ -118,6 +118,11 @@ AC_ARG_ENABLE([dumper], =20 AM_CONDITIONAL(BUILD_DUMPER, [test "x$build_dumper" =3D "xyes"]) =20 +AC_CHECK_LIB([sframe], [sframe_decode], + AC_MSG_NOTICE([Detected libsframe; Assuming that libbfd depends on i= t]), [true]) + +AM_CONDITIONAL(HAVE_LIBSFRAME, [test "x$ac_cv_lib_sframe_sframe_decode" = =3D "xyes"]) + AC_CONFIG_FILES([ Makefile cygwin/Makefile diff --git a/winsup/utils/Makefile.am b/winsup/utils/Makefile.am index d4d56386f72e..f59cf9f50c75 100644 --- a/winsup/utils/Makefile.am +++ b/winsup/utils/Makefile.am @@ -89,6 +89,10 @@ profiler_LDADD =3D $(LDADD) -lntdll cygps_LDADD =3D $(LDADD) -lpsapi -lntdll newgrp_LDADD =3D $(LDADD) -luserenv =20 +if HAVE_LIBSFRAME +dumper_LDADD +=3D -lsframe +endif + if CROSS_BOOTSTRAP SUBDIRS =3D mingw endif