From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-91-241.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.0 required=3.0 tests=none autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: GNAT linking and macOS Date: Sat, 30 Sep 2023 14:55:09 +0100 Organization: A noiseless patient Spider Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain Injection-Info: dont-email.me; posting-host="7d3274ce33089df2409f384514a28a04"; logging-data="971700"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18uXY81n1yBi1D+3LHNNfkiHV8RAzjE2pE=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (darwin) Cancel-Lock: sha1:iDwUUpHjDprtBWR76jGxw0dBkwM= sha1:Rxyh8fSaKGXLPEON6WtjUgkaEDg= Xref: news.eternal-september.org comp.lang.ada:65758 List-Id: Kenneth Wolcott 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.