How to see the preprocessed output of a module source file

Daniel Baluta daniel.baluta at gmail.com
Mon Nov 2 08:08:05 EST 2015


On Mon, Nov 2, 2015 at 2:02 PM, Shiyao Ma <i at introo.me> wrote:
> Hi,
>
>
> Say I am writing a module. Instead of directly compile it into a ko file,
> I'd like to see the preprocessed output of that file, similarly the way it's
> done in gcc -E.

Use make V=1 path/to/your/module.ko

and see the exact gcc command line used to compile the module. Replace
-c with -E :).

thanks,
Daniel.



More information about the Kernelnewbies mailing list