diff options
author | John Hubbard <jhubbard@nvidia.com> | 2024-07-04 09:24:25 +0200 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2024-07-11 19:23:54 +0200 |
commit | 825658b790330ed474547d2b1f87436879ca7da6 (patch) | |
tree | 6625ad7471209cab23595165d7e2498bc8cbf53b /tools/testing/selftests/thermal/intel | |
parent | selftests/timers: remove unused irqcount variable (diff) | |
download | linux-825658b790330ed474547d2b1f87436879ca7da6.tar.xz linux-825658b790330ed474547d2b1f87436879ca7da6.zip |
selftests/x86: fix Makefile dependencies to work with clang
When building with clang, via:
make LLVM=1 -C tools/testing/selftests
...the following build failure occurs in selftests/x86:
clang: error: cannot specify -o when generating multiple output files
This happens because, although gcc doesn't complain if you invoke it
like this:
gcc file1.c header2.h
...clang won't accept that form--it rejects the .h file(s). Also, the
above approach is inaccurate anyway, because file.c includes header2.h
in this case, and the inclusion of header2.h on the invocation is an
artifact of the Makefile's desire to maintain dependencies.
In Makefiles of this type, a better way to do it is to use Makefile
dependencies to trigger the appropriate incremental rebuilds, and
separately use file lists (see EXTRA_FILES in this commit) to track what
to pass to the compiler.
This commit splits those concepts up, by setting up both EXTRA_FILES and
the Makefile dependencies with a single call to the new Makefile
function extra-files.
That fixes the build failure, while still providing the correct
dependencies in all cases.
Acked-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/thermal/intel')
0 files changed, 0 insertions, 0 deletions