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