Debian_SuperUser
Active Member
This is just an experiment. I want to force add compiler options such as "-Ofast -march=native -mtune=native -m64 -flto -s" to each file that compiles in the build process and also remove certain ones such as -g along the replacement of the ones I mentioned. Just settings your CFLAGS or Kbuild flags or setting in the Makefile don't do anything. The build system of each modules will have their own compiler options.
I made a script to intercept all calls to gcc and add/remove compiler options. That worked whenever I tried to compile anything but not for the kernel. The build fails and using V=1 I can see my options aren't being applied.
Why doesn't the build system even make better use of the compiler options to prioritize optimization?
Does anyone have any better idea?
I made a script to intercept all calls to gcc and add/remove compiler options. That worked whenever I tried to compile anything but not for the kernel. The build fails and using V=1 I can see my options aren't being applied.
Why doesn't the build system even make better use of the compiler options to prioritize optimization?
Does anyone have any better idea?

