Hi, > > +# > > +# common-obj-m has some crap here, probably as side effect from > > +# filling obj-y. Clear it. Fixes suspicious dependency errors when > > +# building devices as modules. > > +# > > +common-obj-m := > > This comment doesn't fill me with confidence - makes it feel like there's > some more important root cause that needs addressing instead.
It's my fault, see also https://patchwork.ozlabs.org/project/qemu-devel/patch/20200624131045.14512-5-kra...@redhat.com/ I think the underlying problem is that the functions building *-m variables do not properly handle per-target objects. Which has no bad side effects as long as we never recurse into hw/, but if we want build devices as modules we have to ... Unless we want build per-target code as module the above should do the trick I think. Better suggestions are welcome of course. take care, Gerd