Re: [RFC PATCH 3/6] kbuild: convert include and source paths

From: Peter Oberparleiter
Date: Tue May 06 2008 - 13:29:03 EST


Andrew Morton wrote:
> On Mon, 05 May 2008 17:24:26 +0200 Peter Oberparleiter <peter.oberparleiter@xxxxxxxxxx> wrote:
>
>> From: Peter Oberparleiter <peter.oberparleiter@xxxxxxxxxx>
>>
>> Modify kbuild to convert relative include and source paths to absolute
>> form. Also change the module versioning mechanism to alter object file
>> names only after compiling.
>>
>> Required by the gcov profiling infrastructure: source paths are
>> referenced by the compiled object files. Using relative paths or
>> object file names which are different from the source name would
>> prevent the gcov tool from finding the corresponding source files.

> It doesn't appear to affect __FILE__ in any way (which is good). But I'm
> unsure what it _does_ affect. The changelog implies that it will convert
> "liunx/foo.h" into /usr/src/linux/include/foo.h, only it doesn't.
>
> ho hum.

This patch should convert

gcc -Idir1 -c a.c -o a.o

to

gcc -I/path/to/dir1 -c /path/to/a.c -o a.o

As a standalone change this has no visible effect, but when gcc option
-fprofile-arcs is specified (as done in patch 5), the resulting object
files should only contain absolute paths.


Regards,
Peter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/