Makefile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. ifeq ($(subdir),misc)
  2. sysdep_headers += \
  3. sys/asm.h \
  4. # sysdep_headers
  5. tests += \
  6. tst-hwcap-tunables \
  7. # tests
  8. tst-hwcap-tunables-ARGS = -- $(host-test-program-cmd)
  9. endif
  10. ifeq ($(subdir),elf)
  11. sysdep-dl-routines += \
  12. dl-tlsdesc \
  13. tlsdesc \
  14. # sysdep-dl-routines
  15. gen-as-const-headers += \
  16. dl-link.sym \
  17. # gen-as-const-headers
  18. endif
  19. ifeq ($(subdir),csu)
  20. gen-as-const-headers += \
  21. tlsdesc.sym \
  22. # gen-as-const-headers
  23. endif
  24. ifeq ($(subdir),elf)
  25. sysdep-dl-routines += \
  26. dl-get-cpu-features \
  27. # sysdep-dl-routines
  28. # Disable the compiler from using LSX for TLS descriptor tests, or storing into
  29. # 16B TLS variable may clobber FP/vector registers and prevent us from checking
  30. # their contents.
  31. ifeq (yes,$(loongarch-vec-com))
  32. CFLAGS-tst-gnu2-tls2mod0.c += -mno-lsx
  33. CFLAGS-tst-gnu2-tls2mod1.c += -mno-lsx
  34. CFLAGS-tst-gnu2-tls2mod2.c += -mno-lsx
  35. endif
  36. endif
  37. # LoongArch's assembler also needs to know about PIC as it changes the
  38. # definition of some assembler macros.
  39. ASFLAGS-.os += \
  40. $(pic-ccflag) \
  41. # ASFLAGS-.os
  42. # All the objects in lib*_nonshared.a need to be compiled with medium code
  43. # model or large applications may fail to link.
  44. ifeq (yes,$(have-cmodel-medium))
  45. CFLAGS-.oS += \
  46. -mcmodel=medium \
  47. # CFLAGS-.oS
  48. endif