What is the default GCC flags Clear Linux uses for compiling the kernel?

Hi I would like to know what is the default GCC flags Clear Linux uses for compiling the kernel?

$ echo $CFLAGS
-g -O3 -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -m64 -fasynchronous-unwind-tables -Wp,-D_REENTRANT -ftree-loop-distribute-patterns -Wl,-z -Wl,now -Wl,-z -Wl,relro -fno-semantic-interposition -ffat-lto-objects -fno-trapping-math -Wl,-sort-common -Wl,--enable-new-dtags -mtune=skylake -Wa,-mbranches-within-32B-boundaries

Check this project to see if there’s additional flags local to the kernel being passed:

1 Like

What are the steps to install Clear Linux’s kernel?

I know I have to git clone the repo, then after that I have to cd into the directory then what do I do, how would I compile and then how would I install it?

https://docs.01.org/clearlinux/latest/guides/kernel/kernel-development.html

1 Like