<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:ndesaulniers@google.com" title="Nick Desaulniers <ndesaulniers@google.com>"> <span class="fn">Nick Desaulniers</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - clang rGab9fc8bae805 crashes when building the Linux kernel"
   href="https://bugs.llvm.org/show_bug.cgi?id=47162">bug 47162</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>REOPENED
           </td>
           <td>RESOLVED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - clang rGab9fc8bae805 crashes when building the Linux kernel"
   href="https://bugs.llvm.org/show_bug.cgi?id=47162#c13">Comment # 13</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - clang rGab9fc8bae805 crashes when building the Linux kernel"
   href="https://bugs.llvm.org/show_bug.cgi?id=47162">bug 47162</a>
              from <span class="vcard"><a class="email" href="mailto:ndesaulniers@google.com" title="Nick Desaulniers <ndesaulniers@google.com>"> <span class="fn">Nick Desaulniers</span></a>
</span></b>
        <pre>Ok, I've submitted
<a href="https://lore.kernel.org/lkml/20200815002417.1512973-1-ndesaulniers@google.com/T/#u">https://lore.kernel.org/lkml/20200815002417.1512973-1-ndesaulniers@google.com/T/#u</a>
to the kernel. Re-closing.

(In reply to David Bolvansky from <a href="show_bug.cgi?id=47162#c6">comment #6</a>)
<span class="quote">> Either provide implementation of stpcpy or use that flag.</span >

We generally avoid `-f` flags since they typically get dropped during LTO
(IIRC)!

(In reply to Eli Friedman from <a href="show_bug.cgi?id=47162#c7">comment #7</a>)
<span class="quote">> How does the kernel decide what C library functions to provide?</span >

It doesn't use -ffreestanding for most of the kernel (though I think parts of
the tree do), as generally the libcall optimizations are helpful.  It uses the
same target triple generally as userspace so it's not easy for the toolchain to
know it's targeting a kernel.

The hard part and reason why these kinds of changes are painful is that various
lib fns get deprecated or added in glibc, but not necessarily the kernel.  It
can take a long time to get the implementations added, and backported to the
"stable" tree that most distro's use.  (The max delay can be if you just missed
a "merge window" which would reopen every ~2 months).  Meanwhile, CI is red.</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>