-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Description
| Bugzilla Link | 52384 |
| Version | 13.0 |
| OS | All |
| Blocks | #51489 |
| CC | @emaste,@hvdijk,@MaskRay,@keith,@smithp35 |
Extended Description
4bbcd63 (D96914) added a new -z start-stop-gc to allow the existing "__start_foo retains a section called foo" behaviour to be disabled, coordinated with GNU ld.
6d2d3bd (committed without review 1.5 months later, within the same release cycle (13)) changed the default of this option, thereby breaking software that relied on the old semantics.
So far that list of software is:
- FreeBSD
- NetworkManager
- systemd
- LDC
and 13.0.1 final hasn't even been released yet. For some projects (FreeBSD, NetworkManager and systemd), build systems can be adjusted to add -z no-start-stop-gc and restore the traditional behaviour. However, some projects, like LDC, which in this case is behaving like a driver for LD and thus, just like Clang, cannot easily know what exact linker (GNU vs LLVM, and version) is being used at run time, and thus cannot know whether the option even exists (so cannot just unconditionally pass it without getting an error).
I do not believe this is an appropriate way to go about this transition, and so the default change in 6d2d3bd should be reverted, both in main and in release/13.x, until such time as a proper transition plan is put forward, akin to how -f(no-)common was handled (except this time the errors aren't even bugs in the software, they're "your software was fine but needs to change because we decided that behaviour is no longer supported by default") where the option exists for enough years before the default is flipped such that it can just be assumed to exist and the old behaviour requested unconditionally for projects that need it.
There is the separate issue of the fact that such a plan still breaks static libraries that wish to use linker sets, as it's up to the consumer of the library to decide what semantics it wants, not the library (and I cannot foresee (a) requiring people to use pkgconf-like mechanisms (b) those adding a -z option to LDFLAGS being a good idea).
https://reviews.llvm.org/D96914 has a lengthier discussion that lead up to this bug report, and continues.