[llvm-bugs] [Bug 47162] clang rGab9fc8bae805 crashes when building the Linux kernel

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Aug 14 17:43:20 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=47162

Nick Desaulniers <ndesaulniers at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|REOPENED                    |RESOLVED

--- Comment #13 from Nick Desaulniers <ndesaulniers at google.com> ---
Ok, I've submitted
https://lore.kernel.org/lkml/20200815002417.1512973-1-ndesaulniers@google.com/T/#u
to the kernel. Re-closing.

(In reply to David Bolvansky from comment #6)
> Either provide implementation of stpcpy or use that flag.

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

(In reply to Eli Friedman from comment #7)
> How does the kernel decide what C library functions to provide?

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200815/07740670/attachment.html>


More information about the llvm-bugs mailing list