Makefile 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # SPDX-License-Identifier: GPL-2.0
  2. include ../../../scripts/Makefile.arch
  3. TEST_GEN_PROGS := vdso_test_gettimeofday
  4. TEST_GEN_PROGS += vdso_test_getcpu
  5. TEST_GEN_PROGS += vdso_test_abi
  6. TEST_GEN_PROGS += vdso_test_clock_getres
  7. ifeq ($(ARCH),$(filter $(ARCH),x86 x86_64))
  8. TEST_GEN_PROGS += vdso_standalone_test_x86
  9. endif
  10. TEST_GEN_PROGS += vdso_test_correctness
  11. TEST_GEN_PROGS += vdso_test_getrandom
  12. TEST_GEN_PROGS += vdso_test_chacha
  13. CFLAGS := -std=gnu99 -O2
  14. ifeq ($(CONFIG_X86_32),y)
  15. LDLIBS += -lgcc_s
  16. endif
  17. include ../lib.mk
  18. $(OUTPUT)/vdso_test_gettimeofday: parse_vdso.c vdso_test_gettimeofday.c
  19. $(OUTPUT)/vdso_test_getcpu: parse_vdso.c vdso_test_getcpu.c
  20. $(OUTPUT)/vdso_test_abi: parse_vdso.c vdso_test_abi.c
  21. $(OUTPUT)/vdso_test_clock_getres: vdso_test_clock_getres.c
  22. $(OUTPUT)/vdso_standalone_test_x86: vdso_standalone_test_x86.c parse_vdso.c
  23. $(OUTPUT)/vdso_standalone_test_x86: CFLAGS +=-nostdlib -fno-asynchronous-unwind-tables -fno-stack-protector
  24. $(OUTPUT)/vdso_test_correctness: vdso_test_correctness.c
  25. $(OUTPUT)/vdso_test_correctness: LDFLAGS += -ldl
  26. $(OUTPUT)/vdso_test_getrandom: parse_vdso.c
  27. $(OUTPUT)/vdso_test_getrandom: CFLAGS += -isystem $(top_srcdir)/tools/include \
  28. $(KHDR_INCLUDES) \
  29. -isystem $(top_srcdir)/include/uapi
  30. $(OUTPUT)/vdso_test_chacha: vgetrandom-chacha.S
  31. $(OUTPUT)/vdso_test_chacha: CFLAGS += -idirafter $(top_srcdir)/tools/include \
  32. -idirafter $(top_srcdir)/tools/include/generated \
  33. -idirafter $(top_srcdir)/arch/$(SRCARCH)/include \
  34. -idirafter $(top_srcdir)/include \
  35. -Wa,--noexecstack