Hacker News new | past | comments | ask | show | jobs | submit login

I am fantastic on Linux kernel and on Clang compiler. This article teaches me what GNU extension characteristic will be when Linux kernel is accepting more modern C11 standard.

For example, Linux kernel use local labels, inline assembly and builtin functions heavily.

This article inspires me to persist studying in Linux kernel and Clang compiler.




Clang supports the extensions, you can build the Linux kernel with clang today:

  make -s LLVM=1


As sibling mentioned, you can build the kernel with clang today. `make CC=clang`, and for whatever reason I've found that it produces code that's significantly more pleasant to step through under a debugger than gcc.

If anybody has an explanation for this I'd love to hear it.


Interesting. Traditionally, Clang's -O1 and higher optimizations have been considered less debuggable than GCC's.

Sony developers have proposed changes to improve the debugging experience and some work has been done, e.g. https://discourse.llvm.org/t/rfc-redefine-og-o1-and-add-a-ne...

* change representation to help make -g not change codegen : https://discourse.llvm.org/t/rfc-debuginfo-proposed-changes-...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: