diff options
| author | Nathan Chancellor <[email protected]> | 2023-01-12 03:05:04 +0000 |
|---|---|---|
| committer | Masahiro Yamada <[email protected]> | 2023-01-26 03:42:27 +0000 |
| commit | f0a42fbab447ed9f55bbd99751183e71f3a1f6ec (patch) | |
| tree | 78b4b1c114af7cfb0965699c58146f332d3c6216 /scripts/clang-tools/run-clang-tools.py | |
| parent | powerpc/vdso: Remove unused '-s' flag from ASFLAGS (diff) | |
| download | kernel-f0a42fbab447ed9f55bbd99751183e71f3a1f6ec.tar.gz kernel-f0a42fbab447ed9f55bbd99751183e71f3a1f6ec.zip | |
powerpc/vdso: Improve linker flags
When clang's -Qunused-arguments is dropped from KBUILD_CPPFLAGS, there
are several warnings in the PowerPC vDSO:
clang-16: error: -Wl,-soname=linux-vdso32.so.1: 'linker' input unused [-Werror,-Wunused-command-line-argument]
clang-16: error: -Wl,--hash-style=both: 'linker' input unused [-Werror,-Wunused-command-line-argument]
clang-16: error: argument unused during compilation: '-shared' [-Werror,-Wunused-command-line-argument]
clang-16: error: argument unused during compilation: '-nostdinc' [-Werror,-Wunused-command-line-argument]
clang-16: error: argument unused during compilation: '-Wa,-maltivec' [-Werror,-Wunused-command-line-argument]
The first group of warnings point out that linker flags were being added
to all invocations of $(CC), even though they will only be used during
the final vDSO link. Move those flags to ldflags-y.
The second group of warnings are compiler or assembler flags that will
be unused during linking. Filter them out from KBUILD_CFLAGS so that
they are not used during linking.
Additionally, '-z noexecstack' was added directly to the ld_and_check
rule in commit 1d53c0192b15 ("powerpc/vdso: link with -z noexecstack")
but now that there is a common ldflags variable, it can be moved there.
Signed-off-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nick Desaulniers <[email protected]>
Tested-by: Linux Kernel Functional Testing <[email protected]>
Tested-by: Anders Roxell <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
Diffstat (limited to 'scripts/clang-tools/run-clang-tools.py')
0 files changed, 0 insertions, 0 deletions
