Opened 4 hours ago

Last modified 3 hours ago

#70951 new defect

Linker ld warning -ld_classic is deprecated when compiling with gcc14

Reported by: haberg-1 Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: sequoia Cc: markmentovai (Mark Mentovai)
Port: gcc14

Description

There is a linker warning when compiling a C++ program with gcc14 on macOS 15 x86_64: ld: warning: -ld_classic is deprecated and will be removed in a future release

It does not appear when using clang-18.

Change History (2)

comment:1 Changed 3 hours ago by markmentovai (Mark Mentovai)

Cc: markmentovai added

comment:2 Changed 3 hours ago by markmentovai (Mark Mentovai)

This was forked from #70866. Here’s the relevant portion of what I said at ticket:70866#comment:34:

This warning doesn’t come from gcc. It comes from Apple’s ld, as of Xcode 16 (and the corresponding Command Line Tools version). MacPorts gcc requests this linker: lang/gcc14/Portfile. (${prefix}/bin/ld-classic is this wrapper that finds and runs ld -ld_classic.)

It’s possible that MacPorts gcc no longer needs the ld-classic workaround as long as gcc 0fe7962afc7c is in effect. That change has been cherry-picked as far back as gcc-11.

Note: See TracTickets for help on using tickets.