On Thu, 16 Feb 2023 17:18:36 -0000 "Chung Chung" ctwo0002@gmail.com wrote:
Hi, I am wondering if anyone has successfully compiled latest kernel using clang, I have been having problem with it for the last few month, and here is the error that I have:
In file included from drivers/tty/tty_io.c:103: ./include/linux/termios_internal.h:37:5: error: conflicting types for 'user_termio_to_kernel_termios' int user_termio_to_kernel_termios(struct ktermios *, struct termio __user *); ^ ./include/asm-generic/termios.h:20:19: note: previous definition is here static inline int user_termio_to_kernel_termios(struct ktermios *termios,
Sorry, if it has been discussed before, but I don't seem to find the answer.
That looks like a bug. I compile the kernel, but it uses the default compiler, and I think that is gcc, so it compiles fine. I would suggest you file a bug against the kernel at https://bugzilla.redhat.com/ There are no current bugs about this in the fedora bugzilla or put a message on the fedora kernel list asking about the problem, with the above information. kernel@lists.fedoraproject.org
I *think* that gcc considers static inline to be a suggestion, while clang is probably considering it required. Might be just the compiler flags. Could be wrong.