[OE-core] [PATCH 03/17] conf/bitbake.conf package.bbclass: improve dbg package sources generation from work-shared

Hongxu Jia hongxu.jia at windriver.com
Wed Mar 30 01:58:43 UTC 2016


On 03/30/2016 06:38 AM, Richard Purdie wrote:
> On Mon, 2016-03-28 at 04:18 -0400, Hongxu Jia wrote:
>> Previously, the dbg package could not generate sources if they
>> are in work-shared dir (toolchain, kernel).
>>
>> The fix add a new fdebug-prefix-map to remap work-shared dir
>> and collect sources to dbg package.
>>
>> [YOCTO #9305]
>>
>> Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
> I wasn't really thrilled to be reading whole files into memory with the
> original patch. To start doing this twice in succession for shared work
> means we really need to rethink how this is being done :(.

Yes, I did not consider the work-shared situation in original patch neither,
thanks Mark to point it out, and I have to rework in this fix.

The idea of design is:

1. Try to collect sources from work-shared, and then from WORKDIR
     (The reason is the gcc case has sources in work-shared and WORKDIR)

2. While collecting:
     - Invoke debugedit to list source and header file names

     - Translate these file names to replace prefix_new with prefix_old
        (Revert -fdebug-prefix=<prefix_old>=<prefix_new>)

     - Follow prefix_old file names, and copy them to dest.

     - Dereference symlink in dest

3. Tweak prefix_new, prefix_old, and dest for work-shared/ WORKDIR 
situation,
     also for with/without -fdebug-prefix-map situation.

>
> Its possible software may mix from shared-work and from some local
> kernel module build too, not sure if/how well the code copes with that
> case.

Currently kernel module has no dbg package generated, but I will
try to open it, and please wait my report for this case.

//Hongxu

> Cheers,
>
> Richard




More information about the Openembedded-core mailing list