]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: vdso: Wrap -mexplicit-relocs in cc-option
authorNathan Chancellor <natechancellor@gmail.com>
Mon, 17 Feb 2020 21:11:49 +0000 (14:11 -0700)
committerPaul Burton <paulburton@kernel.org>
Wed, 19 Feb 2020 18:30:10 +0000 (10:30 -0800)
commit7339e1367298bc23d98ca462686b48e8f03cef8a
treedf1b5783ff2845b7d9218b11da7788b1653f838c
parent4158ace25d17a2ac21d10c96250a8a50c2ad4658
MIPS: vdso: Wrap -mexplicit-relocs in cc-option

Clang does not support this option and errors out:

clang-11: error: unknown argument: '-mexplicit-relocs'

Clang does not appear to need this flag like GCC does because the jalr
check that was added in commit 1c58dafc4718 ("mips: vdso: add build
time check that no 'jalr t9' calls left") passes just fine with

$ make ARCH=mips CC=clang CROSS_COMPILE=mipsel-linux-gnu- malta_defconfig arch/mips/vdso/

even before commit ebf8b7e81145 ("mips: vdso: fix 'jalr t9' crash in
vdso code").

-mrelax-pic-calls has been supported since clang 9, which is the
earliest version that could build a working MIPS kernel, and it is the
default for clang so just leave it be.

Fixes: ebf8b7e81145 ("mips: vdso: fix 'jalr t9' crash in vdso code")
Link: https://github.com/ClangBuiltLinux/linux/issues/890
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Paul Burton <paulburton@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: clang-built-linux@googlegroups.com
arch/mips/vdso/Makefile