<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - start-stop-gc default change breaks multiple projects with no viable transition option"
   href="https://bugs.llvm.org/show_bug.cgi?id=52384">52384</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>start-stop-gc default change breaks multiple projects with no viable transition option
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lld
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>13.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>release blocker
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>ELF
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jrtc27@jrtc27.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, smithp352@googlemail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>4bbcd63eea4950c38e29f9e29b1d11b7d7894469 (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.

6d2d3bd0a61f5fc7fd9f61f48bc30e9ca77cc619 (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 6d2d3bd0a61f5fc7fd9f61f48bc30e9ca77cc619 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).

<a href="https://reviews.llvm.org/D96914">https://reviews.llvm.org/D96914</a> has a lengthier discussion that lead up to this
bug report, and continues.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>