4 ms·
Compiling an OpenBSD kernel 50% faster
- imoverclocked 5y ago> the bad idea circus is in town... What a fun post! > The object files are so large because the kernel is initially compiled with debug symbols. Is there a way to build without producing debug symbols in the first place?
- arthurcolle 5y ago> Is there a way to build without producing debug symbols in the first place? Probably takes all of 15 minutes to identify the flags needed and then run the new makefile lol
- maccard 5y agoYou can pass -g0 to gcc to do so [0] [0] https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html
- glandium 5y agoOr remove -g from the flags already passed, since the compiler actually defaults to not producing debug info.
- jesprenj 5y agoI'm a noob. Does OpenBSD not have an alternative to config (make menuconfig) on Linux that does not to compile drivers you don't need?
- foodstances 5y agoYou can just edit the kernel config file before compiling. https://github.com/openbsd/src/blob/master/sys/arch/amd64/conf/GENERIC https://github.com/openbsd/src/blob/master/sys/arch/amd64/co...
- jmclnx 5y agoFor normal usage on amd64 and i386(?), it is recommended not to compile the kernel. I think the article is geared to Developers and testers of OpenBSD.
- yjftsjthsd-h 5y agoIt does. The author is doing things wrong on purpose:)
- racingmars 5y agoYes, there was a brief humorous reference to that in the article: "The correct approach would be to run config after editing the kernel config, but the plot restricts us from doing that."
- mrlonglong 5y ago> This is approximately as wise as taking off from Mars in a ragtop rocket, but don’t worry, the math all checks out Straight outta The Martian! Kudos, I got a good laugh.
- deleted 5y ago[deleted]
- 1MachineElf 5y ago>And now I will be patenting this technique to prevent anyone else from doing something so idiotic. Should you find yourself stranded on a remote planet and your last means to reestablish communication with earth is relinking an openbsd kernel in only 32 megabytes, we can work out a license in exchange for a cut of your book deal. Likewise with the conclusion. :)
- gjvc 5y agosee also https://ccache.dev/ https://ccache.dev/
- hedora 5y agoI’m not sure using a build farm to dynamically relink the kernel at boot might would solve the problem. I think the core issue is that it needs to keep two complete copies of the kernel in memory at the instant in time where it hands off from one to another. Adding a ccache dependency to the bootup sequence would be in keeping in tone with the rest of the article though.
- gjvc 5y agothe point of ccache is that it reduces the need (if you're lucky) for "build farms"
- yjftsjthsd-h 5y agoIt took me way too long to realize that the author was just having fun with insane ideas, not trying to solve a real problem. Great post:)
- hulitu 5y ago> And now I will be patenting this technique to prevent anyone else from doing something so idiotic. For years i was searching for an answer to the question: why some company registers so many patents. It never occured to me that this might be the answer. Thanks for the hint.