[PATCH] drm/xe: avoid using 'grouped targets' in Makefile

Masahiro Yamada masahiroy at kernel.org
Wed Feb 21 00:31:09 UTC 2024


On Tue, Feb 20, 2024 at 11:50 PM Lucas De Marchi
<lucas.demarchi at intel.com> wrote:
>
> On Tue, Feb 20, 2024 at 11:08:58AM +0200, Dafna Hirschfeld wrote:
> >On 19.02.2024 23:44, Lucas De Marchi wrote:
> >>On Mon, Feb 19, 2024 at 03:58:45PM +0200, Dafna Hirschfeld wrote:
> >>>The feature 'grouped target' ('&:') in makefiles is only added in 'make'
> >>>version 4.3. This cause problems in older version of 'make'.
> >>>(Specifically $(@D) is wrongly interpreted - it creates 'generated' dir
> >>>in the source path instead of the build path).
> >>>Avoid this feature.
> >>
> >>but it was used for a reason since a single invocation is supposed to
> >>generate both the .c and .h from a single invocation. AFAIR when
> >>implementing this, not using grouped target would be a mix and match on
> >>having a succesfull build. Does removing it really work with incremental
> >>and parallel build?
> >
> >Hi, we had a compilation issue, where the wrong version of the generated header
> >(xe_wa_oob.h) is included from the source directory instead of the build
> >directory. I thought the problem is due to the feature '&:' which is not
> >there for our 'make' (v4.2). But this didn't fix the issue. I was able to fix
> >the issue with that patch:
> >https://lore.kernel.org/intel-xe/20240220090003.1523866-1-dhirschfeld@habana.ai/T/#u
>
>
> humn... probably because somehow the .h was left behind but with a more
> recent timestamp? If grouped target can't be used according to commits
> 9390dff66a52 ("kbuild: invoke syncconfig if include/config/auto.conf.cmd is missing")
> and f463c3510d44 ("kbuild: add comment about grouped target") then I
> think both fixes are valid, i.e. the other patch you sent and this one:
> https://lore.kernel.org/intel-xe/ngvfmndraoxpdiv4ty5ux7ocjfalsfvejnkxiqbbd4joylhend@q7nai4sxgkmf/
>
>
> Documentation/process/changes.rst still lists GNU Make 3.82.  +Masahiro
> to know if there's any plan to raise the min version requirement.
>


The next bump is planned when CentOS 7
(which uses GNU Make 3.82) retires in June 2024.




GNU Make 4.3 it too new. You cannot rely on it.


-- 
Best Regards
Masahiro Yamada


More information about the Intel-xe mailing list