2022-07-19 01:22:07 +00:00
|
|
|
ifeq ($(subdir),misc)
|
2024-05-08 02:06:15 +00:00
|
|
|
sysdep_headers += \
|
|
|
|
sys/asm.h \
|
|
|
|
# sysdep_headers
|
2023-09-15 09:35:19 +00:00
|
|
|
|
|
|
|
tests += \
|
|
|
|
tst-hwcap-tunables \
|
|
|
|
# tests
|
|
|
|
|
|
|
|
tst-hwcap-tunables-ARGS = -- $(host-test-program-cmd)
|
2022-07-19 01:22:07 +00:00
|
|
|
endif
|
|
|
|
|
2023-03-20 01:25:36 +00:00
|
|
|
ifeq ($(subdir),elf)
|
2024-05-08 02:06:15 +00:00
|
|
|
sysdep-dl-routines += \
|
|
|
|
dl-tlsdesc \
|
|
|
|
tlsdesc \
|
|
|
|
# sysdep-dl-routines
|
|
|
|
|
|
|
|
gen-as-const-headers += \
|
|
|
|
dl-link.sym \
|
|
|
|
# gen-as-const-headers
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(subdir),csu)
|
|
|
|
gen-as-const-headers += \
|
|
|
|
tlsdesc.sym \
|
|
|
|
# gen-as-const-headers
|
2023-03-20 01:25:36 +00:00
|
|
|
endif
|
|
|
|
|
2023-09-15 09:35:19 +00:00
|
|
|
ifeq ($(subdir),elf)
|
|
|
|
sysdep-dl-routines += \
|
|
|
|
dl-get-cpu-features \
|
|
|
|
# sysdep-dl-routines
|
2024-05-08 02:06:15 +00:00
|
|
|
|
|
|
|
# Disable the compiler from using LSX for TLS descriptor tests, or storing into
|
|
|
|
# 16B TLS variable may clobber FP/vector registers and prevent us from checking
|
|
|
|
# their contents.
|
2024-05-20 09:05:12 +00:00
|
|
|
ifeq (yes,$(loongarch-vec-com))
|
2024-05-08 02:06:15 +00:00
|
|
|
CFLAGS-tst-gnu2-tls2mod0.c += -mno-lsx
|
|
|
|
CFLAGS-tst-gnu2-tls2mod1.c += -mno-lsx
|
|
|
|
CFLAGS-tst-gnu2-tls2mod2.c += -mno-lsx
|
2023-09-15 09:35:19 +00:00
|
|
|
endif
|
2024-05-20 09:05:12 +00:00
|
|
|
endif
|
2023-09-15 09:35:19 +00:00
|
|
|
|
2022-07-19 01:22:07 +00:00
|
|
|
# LoongArch's assembler also needs to know about PIC as it changes the
|
|
|
|
# definition of some assembler macros.
|
2024-05-08 02:06:15 +00:00
|
|
|
ASFLAGS-.os += \
|
|
|
|
$(pic-ccflag) \
|
|
|
|
# ASFLAGS-.os
|
2022-09-07 02:33:00 +00:00
|
|
|
|
|
|
|
# All the objects in lib*_nonshared.a need to be compiled with medium code
|
|
|
|
# model or large applications may fail to link.
|
|
|
|
ifeq (yes,$(have-cmodel-medium))
|
2024-05-08 02:06:15 +00:00
|
|
|
CFLAGS-.oS += \
|
|
|
|
-mcmodel=medium \
|
|
|
|
# CFLAGS-.oS
|
2022-09-07 02:33:00 +00:00
|
|
|
endif
|