Commit 1234c169 authored by Nathan Chancellor's avatar Nathan Chancellor Committed by Greg Kroah-Hartman
Browse files

powerpc/vdso: Remove an unsupported flag from vgettimeofday-32.o with clang



[ Upstream commit 05e05bfc ]

When clang's -Qunused-arguments is dropped from KBUILD_CPPFLAGS, it
warns:

  clang-16: error: argument unused during compilation: '-fno-stack-clash-protection' [-Werror,-Wunused-command-line-argument]

This warning happens because vgettimeofday-32.c gets its base CFLAGS
from the main kernel, which may contain flags that are only supported on
a 64-bit target but not a 32-bit one, which is the case here.
-fstack-clash-protection and its negation are only suppported by the
64-bit powerpc target but that flag is included in an invocation for a
32-bit powerpc target, so clang points out that while the flag is one
that it recognizes, it is not actually used by this compiler job.

To eliminate the warning, remove -fno-stack-clash-protection from
vgettimeofday-32.c's CFLAGS when using clang, as has been done for other
flags previously.

Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Tested-by: default avatarLinux Kernel Functional Testing <lkft@linaro.org>
Tested-by: default avatarAnders Roxell <anders.roxell@linaro.org>
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Stable-dep-of: d677ce52 ("powerpc/vdso: Drop -mstack-protector-guard flags in 32-bit files with clang")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 8d1d3940
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment