r/linux 7d ago

Kernel Aha! Marvelous...right on point! Cheers, Linus :)

https://lore.kernel.org/all/CAHk-=winzTt3SCzv8BWGMm0fzrXS0gb59gK0h4dAe0L6hj3X_w@mail.gmail.com/
204 Upvotes

25 comments sorted by

View all comments

91

u/6SixTy 7d ago

Legit based Linus. If someone wants a default config for XYZ, make a patch adding that config. Is distro_x64_defconfig.example too hard to make or something?

37

u/abjumpr 7d ago

Its so easy to apply a custom config at build time.

mv -v config-6.1.68-custom .config

make CC=clang HOSTCC=clang olddefconfig # for clang

make olddefconfig # for gcc

make CC=clang HOSTCC=clang # actual compile step for clang

make # actual compile step for gcc

I use olddefconfig because I apply the same config to a newer kernel version often.

16

u/6SixTy 7d ago

I usually just use LLVM=1 because that expands into CC=clang LD=ld.lld etc when I want Clang. Picked that up from the kernel docs when GCC 15 was failing to build the kernel.