Hi,

Thanks. We will need to see how widespread problems are due to this, but we 
might need to. at least temporarily, set this as the default in some central 
place if it ends up affecting a lot of ports. 

Just to note, a potentially more convenient way to force the legacy linker is 
via the environment variable

OTHER_LDFLAGS=-Wl,-ld_classic

as that can be set, as appropriate, and thus avoids the need to ensure build 
options get passed.

https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Linking
Xcode 15 Release Notes | Apple Developer Documentation
developer.apple.com

At the moment most issues see isolated to places where gcc, or binaries built 
with gcc are used. My guess is eventually GCC will have to adapt to support the 
new linker.

Chris


> On 25 Sep 2023, at 11:10 pm, CC <copious-commot...@cobaltmailbox.com> wrote:
> 
> Hi -
> 
> Instead of reverting to Xcode 14, I have had success (so far) by forcing the 
> linker to use the "classic" version.  Xcode 15 switched the default to 
> Apple's newer "prime" linker.
> 
> what I did --
> - start with a clean slate (mv /opt/local /opt/local.0; mv 
> /Applications/MacPorts /Applications/MacPorts.0)
> - install macports from macports-base repo
> - "port install ld64" (which should install ld64-xcode)
> - edit /opt/local/bin/ld to add "-ld_classic" option (see below)
> 
> "libgcc12" was my test port and it worked after I did the above.  I hope this 
> helps others while we wait for someone with more knowledge to dig deeper into 
> issues with the new linker.<ld.txt>

Reply via email to