blob: 463b121758e7bf9345a02070121773fac425e800 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001ifeq ($(subdir),misc)
2sysdep_headers += regdef.h fpregdef.h sys/regdef.h sys/fpregdef.h \
3 sys/asm.h sgidefs.h
4endif
5
6ifeq ($(subdir),setjmp)
7sysdep_routines += setjmp_aux
8endif
9
10ifeq ($(subdir),rt)
11librt-sysdep_routines += rt-sysdep
12endif
13
14ifeq ($(subdir),debug)
15CFLAGS-backtrace.c += -funwind-tables
16endif
17
18ifeq ($(subdir),csu)
19CPPFLAGS-crti.S += $(pic-ccflag)
20CPPFLAGS-crtn.S += $(pic-ccflag)
21endif
22
23ifeq ($(subdir),nptl)
24CPPFLAGS-pt-crti.S += $(pic-ccflag)
25CPPFLAGS-crtn.S += $(pic-ccflag)
26endif
27
28ASFLAGS-.os += $(pic-ccflag)
29
30ifeq ($(subdir),elf)
31ifneq ($(o32-fpabi),)
32tests += tst-abi-interlink
33
34fpabi-modules-names =
35fpabi_list =
36ifneq (,$(filter $(o32-fpabi),32 xx xxo))
37fpabi-modules-names += tst-abi-fp32mod
38CFLAGS-tst-abi-fp32mod.c += -mfp32
39endif
40ifneq (,$(filter $(o32-fpabi),xx))
41fpabi-modules-names += tst-abi-fpxxmod
42CFLAGS-tst-abi-fpxxmod.c += -mfpxx -mno-odd-spreg
43endif
44ifneq (,$(filter $(o32-fpabi),xx xxo))
45fpabi-modules-names += tst-abi-fpxxomod
46CFLAGS-tst-abi-fpxxomod.c += -mfpxx -modd-spreg
47endif
48ifneq (,$(filter $(o32-fpabi),xx 64a))
49fpabi-modules-names += tst-abi-fp64amod
50CFLAGS-tst-abi-fp64amod.c += -mfp64 -mno-odd-spreg
51endif
52ifneq (,$(filter $(o32-fpabi),xx xxo 64a 64))
53fpabi-modules-names += tst-abi-fp64mod
54CFLAGS-tst-abi-fp64mod.c += -mfp64 -modd-spreg
55endif
56modules-names += $(fpabi-modules-names)
57
58comma:=,
59empty:=
60space:=$(empty) $(empty)
61fpabi_list=$(subst $(space),$(comma),$(patsubst tst-abi-%mod,o_%,\
62 $(fpabi-modules-names)))
63CPPFLAGS-tst-abi-interlink.c += -DFPABI_LIST=$(fpabi_list)
64CPPFLAGS-tst-abi-interlink.c += -DFPABI_COUNT=$(words $(fpabi-modules-names))
65CPPFLAGS-tst-abi-interlink.c += -DFPABI_NATIVE=o_fp$(o32-fpabi)
66$(objpfx)tst-abi-interlink: $(libdl)
67$(objpfx)tst-abi-interlink.out: $(patsubst %,$(objpfx)%.so,\
68 $(fpabi-modules-names))
69endif
70
71ifeq ($(mips-mode-switch),yes)
72ifeq ($(o32-fpabi),xx)
73tests += tst-mode-switch-1 tst-mode-switch-2 tst-mode-switch-3
74$(objpfx)tst-mode-switch-1: $(shared-thread-library)
75$(objpfx)tst-mode-switch-2: $(shared-thread-library)
76endif
77endif
78endif