linux-brain/arch/mips/vdso
Nathan Chancellor 86d7c69367 MIPS: VDSO: Use CLANG_FLAGS instead of filtering out '--target='
commit 76d7fff22be3e4185ee5f9da2eecbd8188e76b2c upstream.

Commit ee67855ecd ("MIPS: vdso: Allow clang's --target flag in VDSO
cflags") allowed the '--target=' flag from the main Makefile to filter
through to the vDSO. However, it did not bring any of the other clang
specific flags for controlling the integrated assembler and the GNU
tools locations (--prefix=, --gcc-toolchain=, and -no-integrated-as).
Without these, we will get a warning (visible with tinyconfig):

arch/mips/vdso/elf.S:14:1: warning: DWARF2 only supports one section per
compilation unit
.pushsection .note.Linux, "a",@note ; .balign 4 ; .long 2f - 1f ; .long
4484f - 3f ; .long 0 ; 1:.asciz "Linux" ; 2:.balign 4 ; 3:
^
arch/mips/vdso/elf.S:34:2: warning: DWARF2 only supports one section per
compilation unit
 .section .mips_abiflags, "a"
 ^

All of these flags are bundled up under CLANG_FLAGS in the main Makefile
and exported so that they can be added to Makefiles that set their own
CFLAGS. Use this value instead of filtering out '--target=' so there is
no warning and all of the tools are properly used.

Cc: stable@vger.kernel.org
Fixes: ee67855ecd ("MIPS: vdso: Allow clang's --target flag in VDSO cflags")
Link: https://github.com/ClangBuiltLinux/linux/issues/1256
Reported-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
[nc: Fix conflict due to lack of 99570c3da96a in 5.4]
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-07 12:20:41 +01:00
..
.gitignore MIPS: Initial implementation of a VDSO 2015-11-11 08:36:36 +01:00
Makefile MIPS: VDSO: Use CLANG_FLAGS instead of filtering out '--target=' 2021-03-07 12:20:41 +01:00
config-n32-o32-env.c mips: compat: vdso: Use legacy syscalls as fallback 2019-09-03 15:35:23 +01:00
elf.S mips: Add support for generic vDSO 2019-07-25 21:45:05 -07:00
genvdso.c mips/vdso: Fix resource leaks in genvdso.c 2020-09-03 11:26:45 +02:00
genvdso.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
sigreturn.S mips: Add support for generic vDSO 2019-07-25 21:45:05 -07:00
vdso.lds.S mips: Add clock_gettime64 entry point 2019-07-25 21:45:52 -07:00
vgettimeofday.c mips: Fix gettimeofday() in the vdso library 2020-01-17 19:49:04 +01:00