1
0
Fork 0
alistair23-linux/tools/testing/selftests/rseq
Michael Ellerman c35aa36fec selftests/rseq: Fix out-of-tree compilation
[ Upstream commit ef89d05451 ]

Currently if you build with O=... the rseq tests don't build:

  $ make O=$PWD/output -C tools/testing/selftests/ TARGETS=rseq
  make: Entering directory '/linux/tools/testing/selftests'
  ...
  make[1]: Entering directory '/linux/tools/testing/selftests/rseq'
  gcc -O2 -Wall -g -I./ -I../../../../usr/include/ -L./ -Wl,-rpath=./  -shared -fPIC rseq.c -lpthread -o /linux/output/rseq/librseq.so
  gcc -O2 -Wall -g -I./ -I../../../../usr/include/ -L./ -Wl,-rpath=./  basic_test.c -lpthread -lrseq -o /linux/output/rseq/basic_test
  /usr/bin/ld: cannot find -lrseq
  collect2: error: ld returned 1 exit status

This is because the library search path points to the source
directory, not the output.

We can fix it by changing the library search path to $(OUTPUT).

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-03-21 08:11:49 +01:00
..
.gitignore rseq/selftests: Provide Makefile, scripts, gitignore 2018-06-06 11:58:35 +02:00
Makefile selftests/rseq: Fix out-of-tree compilation 2020-03-21 08:11:49 +01:00
basic_percpu_ops_test.c rseq/selftests: Provide basic percpu ops test 2018-06-06 11:58:35 +02:00
basic_test.c rseq/selftests: Provide basic test 2018-06-06 11:58:35 +02:00
param_test.c rseq/selftests: Fix: Namespace gettid() for compatibility with glibc 2.30 2020-01-09 10:19:59 +01:00
rseq-arm.h rseq/selftests: Fix Thumb mode build failure on arm32 2019-07-08 13:00:41 -06:00
rseq-arm64.h rseq/selftests: aarch64 code signature: handle big-endian environment 2019-05-07 15:32:51 -06:00
rseq-mips.h rseq/selftests: mips: use break instruction for RSEQ_SIG 2019-05-07 15:33:09 -06:00
rseq-ppc.h rseq/selftests: powerpc code signature: generate valid instructions 2019-05-07 15:33:00 -06:00
rseq-s390.h linux-kselftest-5.2-rc1-2 2019-05-16 18:57:58 -07:00
rseq-skip.h
rseq-x86.h rseq/selftests: x86: use ud1 instruction as RSEQ_SIG opcode 2019-05-07 15:32:05 -06:00
rseq.c rseq/selftests: Use __rseq_handled symbol to coexist with glibc 2019-05-07 15:31:46 -06:00
rseq.h rseq/selftests: Use __rseq_handled symbol to coexist with glibc 2019-05-07 15:31:46 -06:00
run_param_test.sh rseq/selftests: Adapt number of threads to the number of detected cpus 2019-04-08 16:44:21 -06:00
settings rseq/selftests: Turn off timeout setting 2020-01-17 19:49:04 +01:00