From: Mathieu Desnoyers Date: Mon, 29 Apr 2019 15:28:03 +0000 (-0400) Subject: rseq/selftests: add -no-integrated-as for clang X-Git-Tag: v5.4-rc1~948^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fdeb89d84eb28241f5168cc13cc53a5c39f5d111;p=platform%2Fkernel%2Flinux-rpi.git rseq/selftests: add -no-integrated-as for clang Ongoing work for asm goto support from clang requires the -no-integrated-as compiler flag. This compiler flag is present in the toplevel kernel Makefile, but is not replicated for selftests. Add it specifically for the rseq selftest which requires asm goto. Link: https://reviews.llvm.org/D56571 Signed-off-by: Mathieu Desnoyers CC: Nick Desaulniers CC: Thomas Gleixner CC: Joel Fernandes CC: Peter Zijlstra CC: Catalin Marinas CC: Dave Watson CC: Will Deacon CC: Shuah Khan CC: Andi Kleen CC: linux-kselftest@vger.kernel.org CC: "H . Peter Anvin" CC: Chris Lameter CC: Russell King CC: Michael Kerrisk CC: "Paul E . McKenney" CC: Paul Turner CC: Boqun Feng CC: Josh Triplett CC: Steven Rostedt CC: Ben Maurer CC: linux-api@vger.kernel.org CC: Andy Lutomirski CC: Andrew Morton CC: Linus Torvalds Reviewed-by: Nick Desaulniers Signed-off-by: Shuah Khan --- diff --git a/tools/testing/selftests/rseq/Makefile b/tools/testing/selftests/rseq/Makefile index c30c52e..d646953 100644 --- a/tools/testing/selftests/rseq/Makefile +++ b/tools/testing/selftests/rseq/Makefile @@ -1,5 +1,11 @@ # SPDX-License-Identifier: GPL-2.0+ OR MIT -CFLAGS += -O2 -Wall -g -I./ -I../../../../usr/include/ -L./ -Wl,-rpath=./ + +ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),) +CLANG_FLAGS += -no-integrated-as +endif + +CFLAGS += -O2 -Wall -g -I./ -I../../../../usr/include/ -L./ -Wl,-rpath=./ \ + $(CLANG_FLAGS) LDLIBS += -lpthread # Own dependencies because we only want to build against 1st prerequisite, but