From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: gold linker and collect2: fatal error: cannot find 'ld' Date: Wed, 27 Mar 2019 18:15:26 +0100 Message-ID: <87lg109r2p.fsf@gnu.org> References: <20190317160616.cyv5z7lbsrvbajur@thebird.nl> <20190318152849.n3jzwrbyfd7fd3db@thebird.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:43624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9C9C-00014a-Ij for guix-devel@gnu.org; Wed, 27 Mar 2019 13:15:32 -0400 In-Reply-To: <20190318152849.n3jzwrbyfd7fd3db@thebird.nl> (Pjotr Prins's message of "Mon, 18 Mar 2019 16:28:49 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Pjotr Prins Cc: guix-devel@gnu.org Hi Pjotr, Pjotr Prins skribis: > On Sun, Mar 17, 2019 at 05:06:16PM +0100, Pjotr Prins wrote: >> Unfortunately the runtime of compiled software fails because the rpath is >> not updated either. So that requires adding in the RPATH explicitly on >> the ldc command line. When I set the RPATH the runtime is fine.=20 > > Reading up on the ld-wrapper code - that is exactly what happens. A > gold-wrapper can do same. > > I think, like with rustc, I need to wrap the ldc compiler build with > ld-wrapper and the ldc tests with gold-wrapper (yet to be written). Indeed. We=E2=80=99d just need to add a parameter to =E2=80=98make-ld-wrap= per=E2=80=99 so we can specify the executable name, which would be =E2=80=9Cgold=E2=80=9D inst= ead of =E2=80=9Cld=E2=80=9D in this case. Would you like to give it a try? > gold does not honour LIBRARY_PATH so that means we'll have to use > LD_LIBRARY_PATH or pass the lib path(s) on the command line.=20 LIBRARY_PATH is honored by gcc, which =E2=80=9Cconverts=E2=80=9D it into a = list of -L flags for the linker, so no worries here. HTH, and sorry for the delay! Ludo=E2=80=99.