[OE-core] How to put a correct dependency with regards to gcc?

Richard Purdie richard.purdie at linuxfoundation.org
Wed Sep 16 16:43:47 UTC 2015


On Fri, 2015-09-04 at 17:03 +0000, Reshetova, Elena wrote:
> I have a simple problem but not able to come with simple and elegant
> solution for it, so would be very thankful for the suggestions. 
>  
> I have a task that is specified to run after do_fetch. The task needs
> the source to be *actually* fetched, since it operates on archives. It
> works well for everything apart gcc. 
>
> For example in fido branch, my task run for libgcc will fail, because
> do_fetch task for libgcc actually *does not* not fetch the gcc sources
> (only puts a nice lock file in the download folder).
>  
> When I noticed this, I tried to put the dependency on
> gcc-source:do_fetch for my task (because that actually fetches the gcc
> sources) and it works in fido, but in master after changes to gcc
> nothing provides gcc-source and it wants to specify the version, which
> I don’t want to do (ideally I don’t want to put any dependencies to
> gcc, since I don’t really depend on it!). In master a run for
> libgcc-initial fails for the same reasons: gcc tar ball is not there. 
>  
> Is there a way to make it work correctly? 

We could change gcc-shared-work.inc to add:

do_fetch[depends] += "gcc-source-${PV}:do_fetch"

which I think might fix the issues you're seeing. The good news is that
gcc is pretty unique in this regard so you shouldn't see the issue
anywhere else.

I'm also wondering whether we simply should set SRC_URI to be empty
here. The source is fetched, unpacked and patched as part of the
gcc-source recipe. Your code should only really analyse the copy in
gcc-source, its the same source used by all the different gcc variants.

Cheers,

Richard





More information about the Openembedded-core mailing list