lkml.org 
[lkml]   [2024]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [Intel-wired-lan] [PATCH net-next v1 1/1] net: intel: Use *-y instead of *-objs in Makefile
From


On 5/8/2024 7:42 AM, Loktionov, Aleksandr wrote:
>
>
>> -----Original Message-----
>> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On
>> Behalf Of Alexander Lobakin
>> Sent: Wednesday, May 8, 2024 4:40 PM
>> To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>> Cc: Alexei Starovoitov <ast@kernel.org>; Jesper Dangaard Brouer
>> <hawk@kernel.org>; Daniel Borkmann <daniel@iogearbox.net>;
>> netdev@vger.kernel.org; Richard Cochran <richardcochran@gmail.com>;
>> John Fastabend <john.fastabend@gmail.com>; linux-
>> kernel@vger.kernel.org; Eric Dumazet <edumazet@google.com>; intel-
>> wired-lan@lists.osuosl.org; Jakub Kicinski <kuba@kernel.org>;
>> Keller, Jacob E <jacob.e.keller@intel.com>; Nguyen, Anthony L
>> <anthony.l.nguyen@intel.com>; bpf@vger.kernel.org; Paolo Abeni
>> <pabeni@redhat.com>; David S. Miller <davem@davemloft.net>
>> Subject: Re: [Intel-wired-lan] [PATCH net-next v1 1/1] net: intel:
>> Use *-y instead of *-objs in Makefile
>>
>> From: Alexander Lobakin <aleksander.lobakin@intel.com>
>> Date: Wed, 8 May 2024 16:39:21 +0200
>>
>>> From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>>> Date: Wed, 8 May 2024 17:25:31 +0300
>>>
>>>> On Wed, May 08, 2024 at 03:35:26PM +0200, Alexander Lobakin
>> wrote:
>>>>>> *-objs suffix is reserved rather for (user-space) host
>> programs
>>>>>> while usually *-y suffix is used for kernel drivers (although
>>>>>> *-objs works for that purpose for now).
>>>>>>
>>>>>> Let's correct the old usages of *-objs in Makefiles.
>>>>>
>>>>> Wait, I was sure I've seen somewhere that -objs is more new and
>>>>> preferred over -y.
>>>>
>>>> Then you are mistaken.
>>>>
>>>>> See recent dimlib comment where Florian changed -y to -objs for
>>>>> example.
>>>>
>>>> So does he :-)
>>>>
>>>>> Any documentation reference that -objs is for userspace and we
>>>>> should clearly use -y?
>>>>
>>>> Sure. Luckily it's documented in
>> Documentation/kbuild/makefiles.rst
>>>> "Composite Host Programs" (mind the meaning of the word
>> "host"!).
>>>
>>> Oh okay, I see. `-objs` is indeed only mentioned in the host
>> chapter.
>>
>> Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
>>
>> Thanks,
>> Olek
>
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>

Yea, reading the makefiles.rst again, it does seem that -objs only is
intended for host programs. The fact that it works now is an accident.
Further use of -y is necessary as we also use module-$(CONFIG_SYMBOL) to
resolve cases where we only include the files if the configuration is set.

Makes sense to clean this up.

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>

\
 
 \ /
  Last update: 2024-05-08 19:58    [W:0.042 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site