Patch "selftests/resctrl: fix clang build failure: use LOCAL_HDRS" has been added to the 6.6-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

    selftests/resctrl: fix clang build failure: use LOCAL_HDRS

to the 6.6-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:
     selftests-resctrl-fix-clang-build-failure-use-local_.patch
and it can be found in the queue-6.6 subdirectory.

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



commit 8df900625416e5c37d7f7a077efa798196803de2
Author: John Hubbard <jhubbard@xxxxxxxxxx>
Date:   Thu May 2 19:17:12 2024 -0700

    selftests/resctrl: fix clang build failure: use LOCAL_HDRS
    
    [ Upstream commit d8171aa4ca72f1a67bf3c14c59441d63c1d2585f ]
    
    First of all, in order to build with clang at all, one must first apply
    Valentin Obst's build fix for LLVM [1]. Once that is done, then when
    building with clang, via:
    
        make LLVM=1 -C tools/testing/selftests
    
    ...the following error occurs:
    
       clang: error: cannot specify -o when generating multiple output files
    
    This is because clang, unlike gcc, won't accept invocations of this
    form:
    
        clang file1.c header2.h
    
    Fix this by using selftests/lib.mk facilities for tracking local header
    file dependencies: add them to LOCAL_HDRS, leaving only the .c files to
    be passed to the compiler.
    
    [1] https://lore.kernel.org/all/20240329-selftests-libmk-llvm-rfc-v1-1-2f9ed7d1c49f@xxxxxxxxxxxxxxx/
    
    Fixes: 8e289f454289 ("selftests/resctrl: Add resctrl.h into build deps")
    Cc: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
    Signed-off-by: John Hubbard <jhubbard@xxxxxxxxxx>
    Acked-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
    Signed-off-by: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/resctrl/Makefile b/tools/testing/selftests/resctrl/Makefile
index 2deac2031de9e..021863f86053a 100644
--- a/tools/testing/selftests/resctrl/Makefile
+++ b/tools/testing/selftests/resctrl/Makefile
@@ -5,6 +5,8 @@ CFLAGS += $(KHDR_INCLUDES)
 
 TEST_GEN_PROGS := resctrl_tests
 
+LOCAL_HDRS += $(wildcard *.h)
+
 include ../lib.mk
 
-$(OUTPUT)/resctrl_tests: $(wildcard *.[ch])
+$(OUTPUT)/resctrl_tests: $(wildcard *.c)




[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