Patch "kbuild: Do not clean resolve_btfids if the output does not exist" has been added to the 5.10-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    kbuild: Do not clean resolve_btfids if the output does not exist

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     kbuild-do-not-clean-resolve_btfids-if-the-output-doe.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 23dc60f7282a226c42d040b5167a4d50b3ddb277
Author: Jiri Olsa <jolsa@xxxxxxxxxx>
Date:   Thu Feb 11 13:40:04 2021 +0100

    kbuild: Do not clean resolve_btfids if the output does not exist
    
    [ Upstream commit 0e1aa629f1ce9e8cb89e0cefb9e3bfb3dfa94821 ]
    
    Nathan reported issue with cleaning empty build directory:
    
      $ make -s O=build distclean
      ../../scripts/Makefile.include:4: *** \
      O=/ho...build/tools/bpf/resolve_btfids does not exist.  Stop.
    
    The problem that tools scripts require existing output
    directory, otherwise it fails.
    
    Adding check around the resolve_btfids clean target to
    ensure the output directory is in place.
    
    Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
    Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
    Tested-by: Nathan Chancellor <nathan@xxxxxxxxxx>
    Link: https://lore.kernel.org/bpf/20210211124004.1144344-1-jolsa@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/Makefile b/Makefile
index 3a3937ab7ed0..4420131d4709 100644
--- a/Makefile
+++ b/Makefile
@@ -1085,8 +1085,14 @@ endif
 
 PHONY += resolve_btfids_clean
 
+resolve_btfids_O = $(abspath $(objtree))/tools/bpf/resolve_btfids
+
+# tools/bpf/resolve_btfids directory might not exist
+# in output directory, skip its clean in that case
 resolve_btfids_clean:
-	$(Q)$(MAKE) -sC $(srctree)/tools/bpf/resolve_btfids O=$(abspath $(objtree))/tools/bpf/resolve_btfids clean
+ifneq ($(wildcard $(resolve_btfids_O)),)
+	$(Q)$(MAKE) -sC $(srctree)/tools/bpf/resolve_btfids O=$(resolve_btfids_O) clean
+endif
 
 ifdef CONFIG_BPF
 ifdef CONFIG_DEBUG_INFO_BTF



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux