blob: 3d3552322b335647d59d02ac0cdc5a8c2170a720 [file] [log] [blame]
xf.libdd93d52023-05-12 07:10:14 -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))
45ifeq ($(has-modd-spreg),yes)
46fpabi-modules-names += tst-abi-fpxxomod
47CFLAGS-tst-abi-fpxxomod.c += -mfpxx -modd-spreg
48endif
49endif
50ifneq (,$(filter $(o32-fpabi),xx 64a))
51ifeq ($(has-mpf64),yes)
52fpabi-modules-names += tst-abi-fp64amod
53CFLAGS-tst-abi-fp64amod.c += -mfp64 -mno-odd-spreg
54endif
55endif
56ifneq (,$(filter $(o32-fpabi),xx xxo 64a 64))
57ifeq ($(has-mpf64)-$(has-modd-spreg),yes-yes)
58fpabi-modules-names += tst-abi-fp64mod
59CFLAGS-tst-abi-fp64mod.c += -mfp64 -modd-spreg
60endif
61endif
62modules-names += $(fpabi-modules-names)
63
64comma:=,
65empty:=
66space:=$(empty) $(empty)
67fpabi_list=$(subst $(space),$(comma),$(patsubst tst-abi-%mod,o_%,\
68 $(fpabi-modules-names)))
69CPPFLAGS-tst-abi-interlink.c += -DFPABI_LIST=$(fpabi_list)
70CPPFLAGS-tst-abi-interlink.c += -DFPABI_COUNT=$(words $(fpabi-modules-names))
71CPPFLAGS-tst-abi-interlink.c += -DFPABI_NATIVE=o_fp$(o32-fpabi)
72$(objpfx)tst-abi-interlink: $(libdl)
73$(objpfx)tst-abi-interlink.out: $(patsubst %,$(objpfx)%.so,\
74 $(fpabi-modules-names))
75endif
76
77ifeq ($(mips-mode-switch),yes)
78ifeq ($(o32-fpabi),xx)
79tests += tst-mode-switch-1 tst-mode-switch-2 tst-mode-switch-3
80$(objpfx)tst-mode-switch-1: $(shared-thread-library)
81$(objpfx)tst-mode-switch-2: $(shared-thread-library)
82endif
83endif
84endif