Re: [PATCH 4/5] kbuild: disable KBUILD_MODNAME when building for mod.a

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2018-07-05 6:54 GMT+09:00 NeilBrown <neilb@xxxxxxxx>:
> On Wed, Jul 04 2018, Masahiro Yamada wrote:
>
>> 2018-07-04 7:14 GMT+09:00 NeilBrown <neilb@xxxxxxxx>:
>>>
>>> Where I've been using these patches I've sometimes been adding
>>>
>>>   ccflags-y += -DKBUILD_MODNAME='"FOO"'
>>>
>>> to Makefiles so that modules_params get handled correctly on non-module
>>> builds.  I've thought about instead allowing "modobj-name" to be defined
>>> and requiring that it be set if either modobj-[yn] is set.  Then it gets
>>> used for the KBUILD_MODNAME when building modobj modules.
>>>
>>> Would you prefer to always require KBUILD_MODNAME, or to use a default
>>> name for dynamic-debug?
>>>
>>> Thanks,
>>> NeilBrown
>>
>>
>> I prefer flat directory structure for modules.
>> Most of modules fit in a single directory.
>
> I'd prefer that too in general.
> But some modules are bigger than others and some times it helps to
> sub-divide a module.
> xfs, btrfs, ceph, net/dccp, and lustre all already use multiple
> directories despite the poor support, so clearly some developers
> like a more structured approach to organizing their code.
> Wouldn't it be good to allow them to make full use of the kbuild system?


xfs is quite big, but the others are not too bad.
You can collect files into a single directory if you want.
If you mind the namespace, one tip might be to group files with prefix.
For example,

  drivers/btrfs/tests/foo.o  ->  drivers/btrfs/test-foo.o

I do not want to introduce a mess to core build scripts.


> Thanks,
> NeilBrown



-- 
Best Regards
Masahiro Yamada
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux