I have been trying to get the size of my custom compiled modules to be the same size as the distro release modules. The ones that I compile are 10 to 20 times the size of the same module in comparison.
I have looked through the srpm top level Makefile for the flags passed to gcc and found that " -O2" is the default. I increased this to "-O3" with no difference. I did not see any option call for debugging.
How do I find out what the default options to gcc are, and then how do I override them to get the results I want.
Please understand I know little about programming, but I have been compiling custom kernels for 10 years now. Initially to enable hardware to work but now I am just seeing what tweaks I can make to improve performance and satisfy my curiosity.
I have perused "man gcc" to get familiar with the options available.