* [PATCH v1] tools: Fix compile error of pfrut/firewire
@ 2025-03-28 7:47 Riwen Lu
2025-03-29 1:07 ` Takashi Sakamoto
0 siblings, 1 reply; 6+ messages in thread
From: Riwen Lu @ 2025-03-28 7:47 UTC (permalink / raw)
To: o-takashi, rafael, lenb, robert.moore
Cc: linux1394-devel, linux-kernel, linux-acpi, acpica-devel, Riwen Lu,
k2ci
The value -rR of MAKEFLAGS implicit do not use make's built-in rules and
variables. Previous commit d1d096312176 ("tools: fix annoying "mkdir -p
..." logs when building tools in parallel") removed the MAKEFLAGS=
command for tools and caused the built-in rules for pfrut/firewire
failed to take effect.
Reported-by: k2ci <kernel-bot@kylinos.cn>
Signed-off-by: Riwen Lu <luriwen@kylinos.cn>
---
tools/firewire/Makefile | 7 +++++++
tools/power/acpi/tools/pfrut/Makefile | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/tools/firewire/Makefile b/tools/firewire/Makefile
index 67b6e9fca83c..8ba53e1173c6 100644
--- a/tools/firewire/Makefile
+++ b/tools/firewire/Makefile
@@ -12,6 +12,13 @@ nosy-dump : LDFLAGS = -g
nosy-dump : LDLIBS = -lpopt
nosy-dump : nosy-dump.o decode-fcp.o
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
+
+nosy-dump.o : nosy-dump.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+
+decode-fcp.o : decode-fcp.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
clean :
rm -rf *.o nosy-dump
diff --git a/tools/power/acpi/tools/pfrut/Makefile b/tools/power/acpi/tools/pfrut/Makefile
index 61c1a96fd433..e682ee135f1d 100644
--- a/tools/power/acpi/tools/pfrut/Makefile
+++ b/tools/power/acpi/tools/pfrut/Makefile
@@ -8,7 +8,7 @@ EXTRA_UNINSTALL = uninstall-man
CFLAGS += -Wall -O2
CFLAGS += -DPFRUT_HEADER='"../../../../../include/uapi/linux/pfrut.h"'
-LDFLAGS += -luuid
+override LDFLAGS += -luuid
TOOL_OBJS = \
pfrut.o
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v1] tools: Fix compile error of pfrut/firewire
2025-03-28 7:47 [PATCH v1] tools: Fix compile error of pfrut/firewire Riwen Lu
@ 2025-03-29 1:07 ` Takashi Sakamoto
2025-03-31 9:14 ` luriwen
0 siblings, 1 reply; 6+ messages in thread
From: Takashi Sakamoto @ 2025-03-29 1:07 UTC (permalink / raw)
To: Riwen Lu
Cc: rafael, lenb, robert.moore, linux1394-devel, linux-kernel,
linux-acpi, acpica-devel, k2ci
Hi,
On Fri, Mar 28, 2025 at 03:47:50PM +0800, Riwen Lu wrote:
> The value -rR of MAKEFLAGS implicit do not use make's built-in rules and
> variables. Previous commit d1d096312176 ("tools: fix annoying "mkdir -p
> ..." logs when building tools in parallel") removed the MAKEFLAGS=
> command for tools and caused the built-in rules for pfrut/firewire
> failed to take effect.
>
> Reported-by: k2ci <kernel-bot@kylinos.cn>
> Signed-off-by: Riwen Lu <luriwen@kylinos.cn>
> ---
> tools/firewire/Makefile | 7 +++++++
> tools/power/acpi/tools/pfrut/Makefile | 2 +-
> 2 files changed, 8 insertions(+), 1 deletion(-)
As long as testing with v6.14 release, I can not find such failure. I
guess that some one has fixed the issue between the commit and the
release.
Would you please recheck the issue?
Thanks
Takashi Sakamoto
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1] tools: Fix compile error of pfrut/firewire
2025-03-29 1:07 ` Takashi Sakamoto
@ 2025-03-31 9:14 ` luriwen
2025-03-31 11:52 ` Rafael J. Wysocki
0 siblings, 1 reply; 6+ messages in thread
From: luriwen @ 2025-03-31 9:14 UTC (permalink / raw)
To: Takashi Sakamoto
Cc: rafael, lenb, robert.moore, linux1394-devel, linux-kernel,
linux-acpi, acpica-devel, k2ci
在 2025/3/29 09:07, Takashi Sakamoto 写道:
> Hi,
>
> On Fri, Mar 28, 2025 at 03:47:50PM +0800, Riwen Lu wrote:
>> The value -rR of MAKEFLAGS implicit do not use make's built-in rules and
>> variables. Previous commit d1d096312176 ("tools: fix annoying "mkdir -p
>> ..." logs when building tools in parallel") removed the MAKEFLAGS=
>> command for tools and caused the built-in rules for pfrut/firewire
>> failed to take effect.
>>
>> Reported-by: k2ci <kernel-bot@kylinos.cn>
>> Signed-off-by: Riwen Lu <luriwen@kylinos.cn>
>> ---
>> tools/firewire/Makefile | 7 +++++++
>> tools/power/acpi/tools/pfrut/Makefile | 2 +-
>> 2 files changed, 8 insertions(+), 1 deletion(-)
>
> As long as testing with v6.14 release, I can not find such failure. I
> guess that some one has fixed the issue between the commit and the
> release.
>
> Would you please recheck the issue?
>
>
> Thanks
>
> Takashi Sakamoto
I have reconfirmed that this type of error does indeed exist when using
make tools/all or make tools/firewire at commit 4e82c87058f4 ("Merge tag
'rust-6.15' of
git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux") in the 6.14
kernel.
The relevant error messages are as follows:
$ make tools/all
...
LD pfrut
/usr/bin/ld:
/home/luriwen/workspace/kernel/kernel.org/linux-git/linux/tools/power/acpi/tools/pfrut/pfrut.o:
in function `print_cap':
/home/luriwen/workspace/kernel/kernel.org/linux-git/linux/tools/power/acpi/tools/pfrut/pfrut.c:179:
undefined reference to `uuid_unparse'
/usr/bin/ld:
/home/luriwen/workspace/kernel/kernel.org/linux-git/linux/tools/power/acpi/tools/pfrut/pfrut.c:184:
undefined reference to `uuid_unparse'
/usr/bin/ld:
/home/luriwen/workspace/kernel/kernel.org/linux-git/linux/tools/power/acpi/tools/pfrut/pfrut.c:189:
undefined reference to `uuid_unparse'
/usr/bin/ld:
/home/luriwen/workspace/kernel/kernel.org/linux-git/linux/tools/power/acpi/tools/pfrut/pfrut.c:191:
undefined reference to `uuid_unparse'
collect2: error: ld returned 1 exit status
$ make tools/firewire
SYNC include/config/auto.conf.cmd
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/confdata.o
HOSTCC scripts/kconfig/expr.o
LEX scripts/kconfig/lexer.lex.c
YACC scripts/kconfig/parser.tab.[ch]
HOSTCC scripts/kconfig/lexer.lex.o
HOSTCC scripts/kconfig/menu.o
HOSTCC scripts/kconfig/parser.tab.o
HOSTCC scripts/kconfig/preprocess.o
HOSTCC scripts/kconfig/symbol.o
HOSTCC scripts/kconfig/util.o
HOSTLD scripts/kconfig/conf
DESCEND firewire
make[3]: *** No rule to make target 'nosy-dump.o', needed by
'nosy-dump'. Stop.
make[2]: *** [Makefile:72: firewire] Error 2
make[1]: ***
[/home/kylin/remote/kernel/kernel.org/linux-git/linux/Makefile:1438:
tools/firewire] Error 2
make: *** [Makefile:251: __sub-make] Error 2
Thanks
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1] tools: Fix compile error of pfrut/firewire
2025-03-31 9:14 ` luriwen
@ 2025-03-31 11:52 ` Rafael J. Wysocki
2025-04-01 6:56 ` Chen, Yu C
0 siblings, 1 reply; 6+ messages in thread
From: Rafael J. Wysocki @ 2025-03-31 11:52 UTC (permalink / raw)
To: luriwen, Chen, Yu C
Cc: Takashi Sakamoto, rafael, lenb, robert.moore, linux1394-devel,
linux-kernel, linux-acpi, acpica-devel, k2ci
On Mon, Mar 31, 2025 at 11:15 AM luriwen <luriwen@hotmail.com> wrote:
>
> 在 2025/3/29 09:07, Takashi Sakamoto 写道:
> > Hi,
> >
> > On Fri, Mar 28, 2025 at 03:47:50PM +0800, Riwen Lu wrote:
> >> The value -rR of MAKEFLAGS implicit do not use make's built-in rules and
> >> variables. Previous commit d1d096312176 ("tools: fix annoying "mkdir -p
> >> ..." logs when building tools in parallel") removed the MAKEFLAGS=
> >> command for tools and caused the built-in rules for pfrut/firewire
> >> failed to take effect.
> >>
> >> Reported-by: k2ci <kernel-bot@kylinos.cn>
> >> Signed-off-by: Riwen Lu <luriwen@kylinos.cn>
Yu, can you have a look at this please?
> >> ---
> >> tools/firewire/Makefile | 7 +++++++
> >> tools/power/acpi/tools/pfrut/Makefile | 2 +-
> >> 2 files changed, 8 insertions(+), 1 deletion(-)
> >
> > As long as testing with v6.14 release, I can not find such failure. I
> > guess that some one has fixed the issue between the commit and the
> > release.
> >
> > Would you please recheck the issue?
> >
> >
> > Thanks
> >
> > Takashi Sakamoto
>
> I have reconfirmed that this type of error does indeed exist when using
> make tools/all or make tools/firewire at commit 4e82c87058f4 ("Merge tag
> 'rust-6.15' of
> git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux") in the 6.14
> kernel.
> The relevant error messages are as follows:
> $ make tools/all
> ...
> LD pfrut
> /usr/bin/ld:
> /home/luriwen/workspace/kernel/kernel.org/linux-git/linux/tools/power/acpi/tools/pfrut/pfrut.o:
> in function `print_cap':
> /home/luriwen/workspace/kernel/kernel.org/linux-git/linux/tools/power/acpi/tools/pfrut/pfrut.c:179:
> undefined reference to `uuid_unparse'
> /usr/bin/ld:
> /home/luriwen/workspace/kernel/kernel.org/linux-git/linux/tools/power/acpi/tools/pfrut/pfrut.c:184:
> undefined reference to `uuid_unparse'
> /usr/bin/ld:
> /home/luriwen/workspace/kernel/kernel.org/linux-git/linux/tools/power/acpi/tools/pfrut/pfrut.c:189:
> undefined reference to `uuid_unparse'
> /usr/bin/ld:
> /home/luriwen/workspace/kernel/kernel.org/linux-git/linux/tools/power/acpi/tools/pfrut/pfrut.c:191:
> undefined reference to `uuid_unparse'
> collect2: error: ld returned 1 exit status
>
> $ make tools/firewire
> SYNC include/config/auto.conf.cmd
> HOSTCC scripts/basic/fixdep
> HOSTCC scripts/kconfig/conf.o
> HOSTCC scripts/kconfig/confdata.o
> HOSTCC scripts/kconfig/expr.o
> LEX scripts/kconfig/lexer.lex.c
> YACC scripts/kconfig/parser.tab.[ch]
> HOSTCC scripts/kconfig/lexer.lex.o
> HOSTCC scripts/kconfig/menu.o
> HOSTCC scripts/kconfig/parser.tab.o
> HOSTCC scripts/kconfig/preprocess.o
> HOSTCC scripts/kconfig/symbol.o
> HOSTCC scripts/kconfig/util.o
> HOSTLD scripts/kconfig/conf
> DESCEND firewire
> make[3]: *** No rule to make target 'nosy-dump.o', needed by
> 'nosy-dump'. Stop.
> make[2]: *** [Makefile:72: firewire] Error 2
> make[1]: ***
> [/home/kylin/remote/kernel/kernel.org/linux-git/linux/Makefile:1438:
> tools/firewire] Error 2
> make: *** [Makefile:251: __sub-make] Error 2
>
> Thanks
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1] tools: Fix compile error of pfrut/firewire
2025-03-31 11:52 ` Rafael J. Wysocki
@ 2025-04-01 6:56 ` Chen, Yu C
2025-04-02 2:36 ` luriwen
0 siblings, 1 reply; 6+ messages in thread
From: Chen, Yu C @ 2025-04-01 6:56 UTC (permalink / raw)
To: luriwen
Cc: Takashi Sakamoto, lenb, robert.moore, linux1394-devel,
linux-kernel, linux-acpi, acpica-devel, k2ci, Rafael J. Wysocki,
Masahiro Yamada, yu.chen.surf
Hi Riwen,
On 3/31/2025 7:52 PM, Rafael J. Wysocki wrote:
> On Mon, Mar 31, 2025 at 11:15 AM luriwen <luriwen@hotmail.com> wrote:
>>
>> 在 2025/3/29 09:07, Takashi Sakamoto 写道:
>>> Hi,
>>>
>>> On Fri, Mar 28, 2025 at 03:47:50PM +0800, Riwen Lu wrote:
>>>> The value -rR of MAKEFLAGS implicit do not use make's built-in rules and
>>>> variables. Previous commit d1d096312176 ("tools: fix annoying "mkdir -p
>>>> ..." logs when building tools in parallel") removed the MAKEFLAGS=
>>>> command for tools and caused the built-in rules for pfrut/firewire
>>>> failed to take effect.
>>>>
>>>> Reported-by: k2ci <kernel-bot@kylinos.cn>
>>>> Signed-off-by: Riwen Lu <luriwen@kylinos.cn>
>
> Yu, can you have a look at this please?
>
>>>> ---
>>>> tools/firewire/Makefile | 7 +++++++
>>>> tools/power/acpi/tools/pfrut/Makefile | 2 +-
>>>> 2 files changed, 8 insertions(+), 1 deletion(-)
>>>
>>> As long as testing with v6.14 release, I can not find such failure. I
>>> guess that some one has fixed the issue between the commit and the
>>> release.
>>>
>>> Would you please recheck the issue?
>>>
>>>
>>> Thanks
>>>
>>> Takashi Sakamoto
>>
>> I have reconfirmed that this type of error does indeed exist when using
>> make tools/all or make tools/firewire at commit 4e82c87058f4 ("Merge tag
>> 'rust-6.15' of
>> git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux") in the 6.14
>> kernel.
>> The relevant error messages are as follows:
>> $ make tools/all
>> ...
>> LD pfrut
>> /usr/bin/ld:
>> /home/luriwen/workspace/kernel/kernel.org/linux-git/linux/tools/power/acpi/tools/pfrut/pfrut.o:
>> in function `print_cap':
>> /home/luriwen/workspace/kernel/kernel.org/linux-git/linux/tools/power/acpi/tools/pfrut/pfrut.c:179:
>> undefined reference to `uuid_unparse'
>> /usr/bin/ld:
>> /home/luriwen/workspace/kernel/kernel.org/linux-git/linux/tools/power/acpi/tools/pfrut/pfrut.c:184:
>> undefined reference to `uuid_unparse'
>> /usr/bin/ld:
>> /home/luriwen/workspace/kernel/kernel.org/linux-git/linux/tools/power/acpi/tools/pfrut/pfrut.c:189:
>> undefined reference to `uuid_unparse'
>> /usr/bin/ld:
>> /home/luriwen/workspace/kernel/kernel.org/linux-git/linux/tools/power/acpi/tools/pfrut/pfrut.c:191:
>> undefined reference to `uuid_unparse'
>> collect2: error: ld returned 1 exit status
>>
>> $ make tools/firewire
>> SYNC include/config/auto.conf.cmd
>> HOSTCC scripts/basic/fixdep
>> HOSTCC scripts/kconfig/conf.o
>> HOSTCC scripts/kconfig/confdata.o
>> HOSTCC scripts/kconfig/expr.o
>> LEX scripts/kconfig/lexer.lex.c
>> YACC scripts/kconfig/parser.tab.[ch]
>> HOSTCC scripts/kconfig/lexer.lex.o
>> HOSTCC scripts/kconfig/menu.o
>> HOSTCC scripts/kconfig/parser.tab.o
>> HOSTCC scripts/kconfig/preprocess.o
>> HOSTCC scripts/kconfig/symbol.o
>> HOSTCC scripts/kconfig/util.o
>> HOSTLD scripts/kconfig/conf
>> DESCEND firewire
>> make[3]: *** No rule to make target 'nosy-dump.o', needed by
>> 'nosy-dump'. Stop.
>> make[2]: *** [Makefile:72: firewire] Error 2
>> make[1]: ***
>> [/home/kylin/remote/kernel/kernel.org/linux-git/linux/Makefile:1438:
>> tools/firewire] Error 2
>> make: *** [Makefile:251: __sub-make] Error 2
>>
Maybe add more background in the commit log that, the default
MAKEFLAGS in Makefile under Linux's root directory is with "-rR".
Before commit d1d096312176 is applied, the -rR is overwriten by
the subdirectory's MAKEFLAGS, so it will not cause problems when
compiling the sub-directory of tools. After commit d1d096312176,
the -rR takes effect, which prevents the tools from using the
built-in rules and variables. Maybe also added Fixed: tag.
Regarding the prfut Makefile, we have fixed the LDFLAGS issue,
but the CFLAGS += xxx will not take effect, right?
This reminds me that, is it possible to just remove -rR for the
sub-directories? In this way we don't have to change the code of
every tool one-by-one, pfrut, firewire...
Cced Masahiro for guidance.
Something like below:
diff --git a/Makefile b/Makefile
index d138b17b8840..853be42ca1a1 100644
--- a/Makefile
+++ b/Makefile
@@ -1431,12 +1431,11 @@ endif
tools/: FORCE
$(Q)mkdir -p $(objtree)/tools
- $(Q)$(MAKE) LDFLAGS= O=$(abspath $(objtree)) subdir=tools -C
$(srctree)/tools/
+ $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter-out rR,$(MAKEFLAGS))"
O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/
tools/%: FORCE
$(Q)mkdir -p $(objtree)/tools
- $(Q)$(MAKE) LDFLAGS= O=$(abspath $(objtree)) subdir=tools -C
$(srctree)/tools/ $*
-
+ $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter-out rR,$(MAKEFLAGS))"
O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/ $*
#
---------------------------------------------------------------------------
# Kernel selftest
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v1] tools: Fix compile error of pfrut/firewire
2025-04-01 6:56 ` Chen, Yu C
@ 2025-04-02 2:36 ` luriwen
0 siblings, 0 replies; 6+ messages in thread
From: luriwen @ 2025-04-02 2:36 UTC (permalink / raw)
To: Chen, Yu C
Cc: Takashi Sakamoto, lenb, robert.moore, linux1394-devel,
linux-kernel, linux-acpi, acpica-devel, k2ci, Rafael J. Wysocki,
Masahiro Yamada, yu.chen.surf
在 2025/4/1 14:56, Chen, Yu C 写道:
> Hi Riwen,
>
> On 3/31/2025 7:52 PM, Rafael J. Wysocki wrote:
>> On Mon, Mar 31, 2025 at 11:15 AM luriwen <luriwen@hotmail.com> wrote:
>>>
>>> 在 2025/3/29 09:07, Takashi Sakamoto 写道:
>>>> Hi,
>>>>
>>>> On Fri, Mar 28, 2025 at 03:47:50PM +0800, Riwen Lu wrote:
>>>>> The value -rR of MAKEFLAGS implicit do not use make's built-in
>>>>> rules and
>>>>> variables. Previous commit d1d096312176 ("tools: fix annoying
>>>>> "mkdir -p
>>>>> ..." logs when building tools in parallel") removed the MAKEFLAGS=
>>>>> command for tools and caused the built-in rules for pfrut/firewire
>>>>> failed to take effect.
>>>>>
>>>>> Reported-by: k2ci <kernel-bot@kylinos.cn>
>>>>> Signed-off-by: Riwen Lu <luriwen@kylinos.cn>
>>
>> Yu, can you have a look at this please?
>>
>>>>> ---
>>>>> tools/firewire/Makefile | 7 +++++++
>>>>> tools/power/acpi/tools/pfrut/Makefile | 2 +-
>>>>> 2 files changed, 8 insertions(+), 1 deletion(-)
>>>>
>>>> As long as testing with v6.14 release, I can not find such failure. I
>>>> guess that some one has fixed the issue between the commit and the
>>>> release.
>>>>
>>>> Would you please recheck the issue?
>>>>
>>>>
>>>> Thanks
>>>>
>>>> Takashi Sakamoto
>>>
>>> I have reconfirmed that this type of error does indeed exist when using
>>> make tools/all or make tools/firewire at commit 4e82c87058f4 ("Merge tag
>>> 'rust-6.15' of
>>> git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux") in the 6.14
>>> kernel.
>>> The relevant error messages are as follows:
>>> $ make tools/all
>>> ...
>>> LD pfrut
>>> /usr/bin/ld:
>>> /home/luriwen/workspace/kernel/kernel.org/linux-git/linux/tools/power/acpi/tools/pfrut/pfrut.o:
>>> in function `print_cap':
>>> /home/luriwen/workspace/kernel/kernel.org/linux-git/linux/tools/power/acpi/tools/pfrut/pfrut.c:179:
>>> undefined reference to `uuid_unparse'
>>> /usr/bin/ld:
>>> /home/luriwen/workspace/kernel/kernel.org/linux-git/linux/tools/power/acpi/tools/pfrut/pfrut.c:184:
>>> undefined reference to `uuid_unparse'
>>> /usr/bin/ld:
>>> /home/luriwen/workspace/kernel/kernel.org/linux-git/linux/tools/power/acpi/tools/pfrut/pfrut.c:189:
>>> undefined reference to `uuid_unparse'
>>> /usr/bin/ld:
>>> /home/luriwen/workspace/kernel/kernel.org/linux-git/linux/tools/power/acpi/tools/pfrut/pfrut.c:191:
>>> undefined reference to `uuid_unparse'
>>> collect2: error: ld returned 1 exit status
>>>
>>> $ make tools/firewire
>>> SYNC include/config/auto.conf.cmd
>>> HOSTCC scripts/basic/fixdep
>>> HOSTCC scripts/kconfig/conf.o
>>> HOSTCC scripts/kconfig/confdata.o
>>> HOSTCC scripts/kconfig/expr.o
>>> LEX scripts/kconfig/lexer.lex.c
>>> YACC scripts/kconfig/parser.tab.[ch]
>>> HOSTCC scripts/kconfig/lexer.lex.o
>>> HOSTCC scripts/kconfig/menu.o
>>> HOSTCC scripts/kconfig/parser.tab.o
>>> HOSTCC scripts/kconfig/preprocess.o
>>> HOSTCC scripts/kconfig/symbol.o
>>> HOSTCC scripts/kconfig/util.o
>>> HOSTLD scripts/kconfig/conf
>>> DESCEND firewire
>>> make[3]: *** No rule to make target 'nosy-dump.o', needed by
>>> 'nosy-dump'. Stop.
>>> make[2]: *** [Makefile:72: firewire] Error 2
>>> make[1]: ***
>>> [/home/kylin/remote/kernel/kernel.org/linux-git/linux/Makefile:1438:
>>> tools/firewire] Error 2
>>> make: *** [Makefile:251: __sub-make] Error 2
>>>
>
> Maybe add more background in the commit log that, the default
> MAKEFLAGS in Makefile under Linux's root directory is with "-rR".
> Before commit d1d096312176 is applied, the -rR is overwriten by
> the subdirectory's MAKEFLAGS, so it will not cause problems when
> compiling the sub-directory of tools. After commit d1d096312176,
> the -rR takes effect, which prevents the tools from using the
> built-in rules and variables. Maybe also added Fixed: tag.
>
OK. I'll enhance the commit message and add a Fixes tag.
> Regarding the prfut Makefile, we have fixed the LDFLAGS issue,
> but the CFLAGS += xxx will not take effect, right?
>
Correct. The CFLAGS += xxx is not take effect.
> This reminds me that, is it possible to just remove -rR for the
> sub-directories? In this way we don't have to change the code of
> every tool one-by-one, pfrut, firewire...
> Cced Masahiro for guidance.
>
> Something like below:
>
> diff --git a/Makefile b/Makefile
> index d138b17b8840..853be42ca1a1 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1431,12 +1431,11 @@ endif
>
> tools/: FORCE
> $(Q)mkdir -p $(objtree)/tools
> - $(Q)$(MAKE) LDFLAGS= O=$(abspath $(objtree)) subdir=tools -C
> $(srctree)/tools/
> + $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter-out rR,$(MAKEFLAGS))"
> O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/
>
> tools/%: FORCE
> $(Q)mkdir -p $(objtree)/tools
> - $(Q)$(MAKE) LDFLAGS= O=$(abspath $(objtree)) subdir=tools -C
> $(srctree)/tools/ $*
> -
> + $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter-out rR,$(MAKEFLAGS))"
> O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/ $*
> #
> ---------------------------------------------------------------------------
> # Kernel selftest
>
> I believe this modification is more appropriate.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-04-02 2:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-28 7:47 [PATCH v1] tools: Fix compile error of pfrut/firewire Riwen Lu
2025-03-29 1:07 ` Takashi Sakamoto
2025-03-31 9:14 ` luriwen
2025-03-31 11:52 ` Rafael J. Wysocki
2025-04-01 6:56 ` Chen, Yu C
2025-04-02 2:36 ` luriwen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox