NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: toolchain/55594: Error creating shared library using gcc-7.5.0 on NetBSD 9.0_STABLE



The following reply was made to PR toolchain/55594; it has been noted by GNATS.

From: "Rajeev V. Pillai" <rajeev_v_pillai%yahoo.com@localhost>
To: "toolchain-manager%netbsd.org@localhost" <toolchain-manager%netbsd.org@localhost>, 
	"gnats-admin%netbsd.org@localhost" <gnats-admin%netbsd.org@localhost>, 
	"netbsd-bugs%netbsd.org@localhost" <netbsd-bugs%netbsd.org@localhost>, 
	"gnats-bugs%netbsd.org@localhost" <gnats-bugs%netbsd.org@localhost>
Cc: 
Subject: Re: toolchain/55594: Error creating shared library using gcc-7.5.0
 on NetBSD 9.0_STABLE
Date: Wed, 26 Aug 2020 21:04:58 +0000 (UTC)

 On Sunday, 23 August 2020, 14:45:05 GMT+5:30, David Holland <dholland-bugs@=
 netbsd.org> wrote:
 
 > On Thu, Aug 20, 2020 at 01:40:02PM +0000, Rajeev V. Pillai wrote:
 >=C2=A0=C2=A0> > Looks like ``-Wl,-shared'' is not the same as ``-shared''.=
  I
 >=C2=A0=C2=A0> > thought it was.
 >=C2=A0=C2=A0>
 >=C2=A0=C2=A0> OK. I've tried gcc-8.3.0 & gcc-10.2.0, clang-8.0.1 &
 >=C2=A0=C2=A0> clang-10.0.1. None of them accept ``-Wl,-shared'' as a synon=
 ym
 >=C2=A0=C2=A0> for ``-shared''.
 >=C2=A0=C2=A0>
 >=C2=A0=C2=A0> I'll report a bug with the ncurses maintainer, instead.
 >
 > -Wl,-shared means "pass -shared to the linker and do nothing else"
 > while -shared means "tell the compiler driver to build a shared
 > library", which includes both passing -shared to the linker and also
 > doing other things. Without the other things, you'll among other
 > things get the wrong crstuff and it won't work.
 
 When discussing this issue with Tom Dickey on the ncurses mailing-list,
 he pointed out that passing ``-Wl,-shared'' instead of ``-shared''
 works on NetBSD-8.0 for creating a shared library. His build log is
 here:
 
 https://lists.gnu.org/archive/html/bug-ncurses/2020-08/msg00086.html
 
 I have access to a NetBSD-8.1 system (gcc (nb3 20180905) 5.5.0) and,
 I can confirm that ``-Wl,-shared'' works there, too.
 
 Seems a bit odd, no? Can you explain what's going on here?
 
 Thanks,
 RVP
 



Home | Main Index | Thread Index | Old Index