* [PATCH] kbuild, link-vmlinux: Don't delete output files with make -i
@ 2021-04-25 21:35 Andi Kleen
2021-04-26 9:01 ` Masahiro Yamada
0 siblings, 1 reply; 6+ messages in thread
From: Andi Kleen @ 2021-04-25 21:35 UTC (permalink / raw)
To: masahiroy; +Cc: linux-kbuild, Andi Kleen, Andi Kleen
From: Andi Kleen <andi@firstfloor.org>
make -i is useful to see output files which normally get deleted on an
error. Make this work with link-vmlinux.sh too. Don't delete the output
files on error when make -i is used.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
scripts/link-vmlinux.sh | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index 0e039a4cf2cb..a1a57f214c58 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -300,6 +300,11 @@ sorttable()
# Delete output files in case of error
cleanup()
{
+ # don't delete for make -i
+ case "$MFLAGS" in
+ *-i*) return ;;
+ esac
+
rm -f .btf.*
rm -f .tmp_System.map
rm -f .tmp_initcalls.lds
--
2.25.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] kbuild, link-vmlinux: Don't delete output files with make -i
2021-04-25 21:35 [PATCH] kbuild, link-vmlinux: Don't delete output files with make -i Andi Kleen
@ 2021-04-26 9:01 ` Masahiro Yamada
2021-04-26 14:20 ` Andi Kleen
0 siblings, 1 reply; 6+ messages in thread
From: Masahiro Yamada @ 2021-04-26 9:01 UTC (permalink / raw)
To: Andi Kleen; +Cc: Linux Kbuild mailing list, Andi Kleen
On Mon, Apr 26, 2021 at 6:35 AM Andi Kleen <ak@linux.intel.com> wrote:
>
> From: Andi Kleen <andi@firstfloor.org>
>
> make -i is useful to see output files which normally get deleted on an
> error. Make this work with link-vmlinux.sh too. Don't delete the output
> files on error when make -i is used.
>
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> ---
> scripts/link-vmlinux.sh | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
> index 0e039a4cf2cb..a1a57f214c58 100755
> --- a/scripts/link-vmlinux.sh
> +++ b/scripts/link-vmlinux.sh
> @@ -300,6 +300,11 @@ sorttable()
> # Delete output files in case of error
> cleanup()
> {
> + # don't delete for make -i
> + case "$MFLAGS" in
> + *-i*) return ;;
> + esac
> +
> rm -f .btf.*
> rm -f .tmp_System.map
> rm -f .tmp_initcalls.lds
> --
> 2.25.4
>
How about removing on_exit() and on_signals() entirely?
.DELETE_ON_ERROR target removes vmlinux on error anyway.
Leaving intermediate files is safe, I think.
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] kbuild, link-vmlinux: Don't delete output files with make -i
@ 2022-06-23 8:31 Jiri Slaby
2022-06-23 9:45 ` Masahiro Yamada
0 siblings, 1 reply; 6+ messages in thread
From: Jiri Slaby @ 2022-06-23 8:31 UTC (permalink / raw)
To: masahiroy
Cc: linux-kernel, Andi Kleen, Michal Marek, Nick Desaulniers,
linux-kbuild, Andi Kleen, Jiri Slaby
From: Andi Kleen <andi@firstfloor.org>
make -i is useful to see output files which normally get deleted on an
error. Make this work with link-vmlinux.sh too. Don't delete the output
files on error when make -i is used.
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Michal Marek <michal.lkml@markovi.net>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: linux-kbuild@vger.kernel.org
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
scripts/link-vmlinux.sh | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index eecc1863e556..d21759aad4f3 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -193,6 +193,11 @@ sorttable()
# Delete output files in case of error
cleanup()
{
+ # don't delete for make -i
+ case "$MFLAGS" in
+ *-i*) return ;;
+ esac
+
rm -f .btf.*
rm -f System.map
rm -f vmlinux
--
2.36.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] kbuild, link-vmlinux: Don't delete output files with make -i
2022-06-23 8:31 Jiri Slaby
@ 2022-06-23 9:45 ` Masahiro Yamada
2022-06-23 9:50 ` Jiri Slaby
0 siblings, 1 reply; 6+ messages in thread
From: Masahiro Yamada @ 2022-06-23 9:45 UTC (permalink / raw)
To: Jiri Slaby
Cc: Linux Kernel Mailing List, Andi Kleen, Michal Marek,
Nick Desaulniers, Linux Kbuild mailing list, Andi Kleen
On Thu, Jun 23, 2022 at 5:31 PM Jiri Slaby <jslaby@suse.cz> wrote:
>
> From: Andi Kleen <andi@firstfloor.org>
>
> make -i is useful to see output files which normally get deleted on an
> error. Make this work with link-vmlinux.sh too. Don't delete the output
> files on error when make -i is used.
>
> Cc: Masahiro Yamada <masahiroy@kernel.org>
> Cc: Michal Marek <michal.lkml@markovi.net>
> Cc: Nick Desaulniers <ndesaulniers@google.com>
> Cc: linux-kbuild@vger.kernel.org
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> ---
I am afraid you missed this commit:
commit 51eb95e2da41802454f48b9afeb4d96a77295035
Author: Andi Kleen <ak@linux.intel.com>
Date: Tue May 4 20:35:27 2021 -0700
kbuild: Don't remove link-vmlinux temporary files on exit/signal
Keep them around until they are cleaned up by make clean. This
uses a bit more disk space, but makes it easier to debug any
problems with the kernel link process.
Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> scripts/link-vmlinux.sh | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
> index eecc1863e556..d21759aad4f3 100755
> --- a/scripts/link-vmlinux.sh
> +++ b/scripts/link-vmlinux.sh
> @@ -193,6 +193,11 @@ sorttable()
> # Delete output files in case of error
> cleanup()
> {
> + # don't delete for make -i
> + case "$MFLAGS" in
> + *-i*) return ;;
> + esac
> +
> rm -f .btf.*
> rm -f System.map
> rm -f vmlinux
> --
> 2.36.1
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] kbuild, link-vmlinux: Don't delete output files with make -i
2022-06-23 9:45 ` Masahiro Yamada
@ 2022-06-23 9:50 ` Jiri Slaby
0 siblings, 0 replies; 6+ messages in thread
From: Jiri Slaby @ 2022-06-23 9:50 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Linux Kernel Mailing List, Andi Kleen, Michal Marek,
Nick Desaulniers, Linux Kbuild mailing list, Andi Kleen
On 23. 06. 22, 11:45, Masahiro Yamada wrote:
> On Thu, Jun 23, 2022 at 5:31 PM Jiri Slaby <jslaby@suse.cz> wrote:
>>
>> From: Andi Kleen <andi@firstfloor.org>
>>
>> make -i is useful to see output files which normally get deleted on an
>> error. Make this work with link-vmlinux.sh too. Don't delete the output
>> files on error when make -i is used.
>>
>> Cc: Masahiro Yamada <masahiroy@kernel.org>
>> Cc: Michal Marek <michal.lkml@markovi.net>
>> Cc: Nick Desaulniers <ndesaulniers@google.com>
>> Cc: linux-kbuild@vger.kernel.org
>> Signed-off-by: Andi Kleen <ak@linux.intel.com>
>> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
>> ---
>
>
>
> I am afraid you missed this commit:
>
>
>
> commit 51eb95e2da41802454f48b9afeb4d96a77295035
> Author: Andi Kleen <ak@linux.intel.com>
> Date: Tue May 4 20:35:27 2021 -0700
>
> kbuild: Don't remove link-vmlinux temporary files on exit/signal
Oops, thanks a lot for pointing out. We are going through the Andi's LTO
patches and this went unnoticed as it was changed differently (and
rebase succeeded). Now dropped from the queue.
thanks,
--
js
suse labs
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-06-23 9:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-25 21:35 [PATCH] kbuild, link-vmlinux: Don't delete output files with make -i Andi Kleen
2021-04-26 9:01 ` Masahiro Yamada
2021-04-26 14:20 ` Andi Kleen
-- strict thread matches above, loose matches on Subject: below --
2022-06-23 8:31 Jiri Slaby
2022-06-23 9:45 ` Masahiro Yamada
2022-06-23 9:50 ` Jiri Slaby
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox