[EMAIL PROTECTED] said: > some modules(i.e. hostaudio) are built from a "userspace" (needing the > special treatment) file and a "kernel" (to be compiled as usual) > file. How will kbuild link them together?
> I have three workarounds: > - split the module into 2 separate ones, with the kernel one requiring the > other. BUT a lot of EXPORT_SYMBOLS should be added (one for each function > inside the userspace file at least) > - create a symlink from arch/um/drivers/hostaudio_user.c(old place) to > arch/um/os/drivers/hostaudio_user.c (new place) and pass the symlink to gcc. > This must be done only when the file will be part of a module. > Note that arch/um/os is a symlink to arch/um/os-{Linux, Win, any OS needed}. > - (worst option) make kbuild link together objects from different folders > inside one module. But I don't like this and I guess this would never be > accepted (this is against a fundamental kbuild assumption, IIRC). Option 2 would work, although I would try to avoid that. I would rather have everything under arch/um/os be userspace code, and none of it be kernel code. So, rather than have a module consisting of a userspace chunk and a kernel chunk needing to be turned into a single .o, I would rather look at having two modules, with the userspace piece plugging into an interface in the kernel piece. This is what I've envisioned for hostfs for a long time. You don't need to stick host files underneath hostfs files - you can stick other host resources under them, and the way to do that is to have multiple hostfs userspace modules which plug into an interface in the hostfs kernel piece, each of which provides access to a different sort of host resource. So, I would look at the other problematic modules and see if they can be treated in the same way. So, I basically don't like the idea of making the CFLAGS munging part of kbuild overall. It's very UML-specific now, and in the future, it will become specific to small pieces of UML. Jeff ------------------------------------------------------- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html _______________________________________________ kbuild-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/kbuild-devel