#70951 closed defect (fixed)
Linker ld warning -ld_classic is deprecated when compiling with gcc14
Reported by: | haberg-1 (Hans Åberg) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | sequoia | Cc: | markmentovai (Mark Mentovai), cjones051073 (Chris Jones) |
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 (11)
comment:1 Changed 7 weeks ago by markmentovai (Mark Mentovai)
Cc: | markmentovai added |
---|
comment:2 Changed 7 weeks ago by markmentovai (Mark Mentovai)
comment:3 Changed 7 weeks ago by cjones051073 (Chris Jones)
Yes, we should test if the ld classic workaround is still required. Quite likely it isn’t….
comment:4 Changed 7 weeks ago by cjones051073 (Chris Jones)
Cc: | cjones051073 added |
---|
comment:5 Changed 7 weeks ago by cjones051073 (Chris Jones)
Currently its enabled open ended. I am testing turning it off for 16+
It may well be gcc14 does not need it at all, but I would prefer to start with the least invasive changes. I personally cannot test with Xcode 15 any more so someone else would have to do that test anyway.
comment:6 Changed 7 weeks ago by cjones051073 (Chris Jones)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Should be addressed now.
comment:7 Changed 6 weeks ago by haberg-1 (Hans Åberg)
It may be the removal from GCC of the ld option -ld_classic that causes the 'make check' fails, as this option is deprecated on MacOS 15. See: https://trac.macports.org/ticket/70951
With 'make check' tests on gmp-6.3.0 using both port clang-18 and gcc14, on MacOS 15, the fails are the same.
I have reported this on the GMP Bugs list: https://gmplib.org/list-archives/gmp-bugs/2024-October/005537.html
comment:8 Changed 6 weeks ago by cjones051073 (Chris Jones)
Just to note, the fix above is only on the macports side, to limit the explicit use of ld-classic during build. However, internally gcc14 (and other older versions) configure themselves to potentially still use this classic option, so this will remain a warning until upstream GCC fixes it.
It is only a warning though at this stage, it should not cause any build failures. the option will likely remain for the lifetime of Xcode 16, but for the next release, 17 onwards, we should consider its removal a possibility (its basically up to Apple to decide when they do this).
comment:9 Changed 6 weeks ago by haberg-1 (Hans Åberg)
It is the removal of ld_classic that seems to cause the GMP 'make check' fails. Before the change, I got the warning when compiling a program, so it was not only during the build, and why I reported it, but also why I suspect its removal results in the fails.
comment:10 Changed 6 weeks ago by cjones051073 (Chris Jones)
Please do not abuse this ticket for GMP related issues. If there is not one already you should open a new ticket for that and attach examples of complete build logs showing the issues.
This was forked from #70866. Here’s the relevant portion of what I said at ticket:70866#comment:34: