[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] precompiler kernel source compares



2009/12/8 Vincent Rivière <vincent.riviere@freesbee.fr>:
> Paul Wratt a écrit :
>>
>> is there any way to generate the sources used to compile the different
>> MiNT versions, as preparsed by the compiler (ie after #IF processing)
>
> Here the solution for a single file.
>
> A .c file is usually compiled with :
> gcc -c myfile.c -other-options
> As a result, you get myfile.o
>
> To get the preprocessed output, replace "-c" with "-E"
> -E indicates to preprocess only
>
> So do:
> gcc -E myfile.c -other-options >myfile.i
>
> And you get in myfile.i the exact source that will be compiled, with all
> #include and #define being replaced. Beware, the preprocessed output is
> sometimes hard to read (it is intended to the compiler only). All the
> include files are copied, and the expanded macros are sometimes unreadable.
>
> When you type make, you see the exact gcc command line used.
> Use the exact same command line with -E instead of -c, and you're done.
>
> I repeat this tip again and again because it saved me numerous times.
>
> By the way, I'm not sure you will get something useful with this method, but
> who knows...
>
> --
> Vincent Rivière

thanks dude, this is what I was after (and it might have taken me
months to get the right search terms in google)

I will do some comparisions, using "mint040" and "mintara". I have
current CVS, and I can (if absolutely nescessary) back track through
the previous branches (or previous revisions), but only as a last
resort

I can deal with the small amount of code that will be different in
these kernel builds, and I can probably figure out any "messy stuff"
generated by the pre-compiler too

Depending on what I turn up, I will do/try the same approach with the
1.16 kernel, although this may be harder to devine the changes (I
gather the current kernel is considerably different), I will resort to
diff to get clarification..

I will let peeps know if I find anything concrete..

Paul