comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: GNAT linking and macOS
Date: Sat, 30 Sep 2023 14:55:09 +0100	[thread overview]
Message-ID: <ly7co7n4ua.fsf@pushface.org> (raw)
In-Reply-To: e2a2223e-621e-4987-95b3-61e3349a9238n@googlegroups.com

Kenneth Wolcott <kennethwolcott@gmail.com> writes:

>> > It turns out there's an environment variable DEFAULT_LINKER, which with
>
> I tried this (xport
> DEFAULT_LINKER=/Library/Developer/CommandLineTools/usr/bin/ld-classic)
> and it did not help:

As I said above, this only affects building GCC, not using it. Sorry.

> Are there any other workarounds to solve the inability to link?  This
> does not only adversely affect Ada, but everything that uses a linker,
> BTW.

I have some evidence that the issue only arises with static
libraries. Not much help.

We're hoping that the 15.1 release of Command Line Tools fixes this. In
the meantime,

(1) using gnatmake, or gprbuild without changing the GPR:

  $ gnatmake foo.adb -largs -Wl,-ld_classic
or
  $ gprbuild -P foo -largs -Wl,-ld_classic

(2) modifying the GPR by adding a new package Linker:

  package Linker is
     for Default_Switches ("ada") use ("-Wl,-ld_classic");
  end Linker;

(3) if you already have a package Linker, modify as above.

  reply	other threads:[~2023-09-30 13:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-27 19:30 GNAT linking and macOS moi
2023-09-28 13:32 ` Simon Wright
2023-09-28 21:00   ` Simon Wright
2023-09-29 20:19     ` hn...@yahoo.de
2023-09-29 20:26     ` hn...@yahoo.de
2023-09-30  0:51       ` moi
2023-09-30 14:20       ` Simon Wright
2023-09-30  2:30     ` Kenneth Wolcott
2023-09-30 13:55       ` Simon Wright [this message]
2023-09-30 23:57         ` Kenneth Wolcott
2023-10-01  7:57           ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox