Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A clean build of the Linux kernel can be very fast, but the config is very relevant. A custom build specific to your hardware will touch only a small fraction of the overall kernel tree, whereas a generic build including a large swath of hardware will take much longer.

(AFAICT there's no easy way to measure the LoC actually compiled - but one rough way to estimate it would be to take all the .o files listed in the build process and count the LoC in the corresponding .c files and the .h files they depend on).



Easy way is to grab the debuginfo files, run it through addr2line and count.


> AFAICT there's no easy way to measure the LoC actually compiled

I take it you can't just run it through the preprocessor then count the lines of code that are output from that?


The kernel is composed of a bunch of independent source files which share headers; thus, running them through a preprocessor would massively overcount the LoC. (In theory, this would get you the “actual compiled LoC” but that’s a useless metric because most header files are just declarations that are easy to parse and “compile”).




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

Search: