| 1 |
ifeq ($(subdir),csu) |
| 2 |
gen-as-const-headers += cpu-features-offsets.sym features-offsets.sym |
| 3 |
endif |
| 4 |
|
| 5 |
ifeq ($(subdir),elf) |
| 6 |
sysdep_routines += get-cpuid-feature-leaf |
| 7 |
sysdep-dl-routines += \ |
| 8 |
dl-get-cpu-features \ |
| 9 |
dl-tlsdesc \ |
| 10 |
tls_get_addr \ |
| 11 |
tlsdesc \ |
| 12 |
# sysdep-dl-routines |
| 13 |
|
| 14 |
sysdep_headers += \ |
| 15 |
bits/platform/features.h \ |
| 16 |
bits/platform/x86.h \ |
| 17 |
sys/platform/x86.h \ |
| 18 |
# sysdep_headers |
| 19 |
|
| 20 |
CFLAGS-dl-get-cpu-features.os += $(rtld-early-cflags) |
| 21 |
CFLAGS-get-cpuid-feature-leaf.o += $(no-stack-protector) |
| 22 |
|
| 23 |
tests += \ |
| 24 |
tst-cpu-features-cpuinfo \ |
| 25 |
tst-cpu-features-cpuinfo-static \ |
| 26 |
tst-cpu-features-supports \ |
| 27 |
tst-cpu-features-supports-static \ |
| 28 |
tst-get-cpu-features \ |
| 29 |
tst-get-cpu-features-static \ |
| 30 |
tst-gnu2-tls2-x86-noxsave \ |
| 31 |
tst-gnu2-tls2-x86-noxsavec \ |
| 32 |
tst-gnu2-tls2-x86-noxsavexsavec \ |
| 33 |
tst-hwcap-tunables \ |
| 34 |
# tests |
| 35 |
tests-static += \ |
| 36 |
tst-cpu-features-cpuinfo-static \ |
| 37 |
tst-cpu-features-supports-static \ |
| 38 |
tst-get-cpu-features-static \ |
| 39 |
# tests-static |
| 40 |
ifeq (yes,$(have-ifunc)) |
| 41 |
ifeq (yes,$(have-gcc-ifunc)) |
| 42 |
tests += \ |
| 43 |
tst-ifunc-isa-1 \ |
| 44 |
tst-ifunc-isa-1-static \ |
| 45 |
# tests |
| 46 |
tests-static += \ |
| 47 |
tst-ifunc-isa-1-static \ |
| 48 |
# tests-static |
| 49 |
test-xfail-tst-ifunc-isa-1 = $(with-lld) |
| 50 |
test-xfail-tst-ifunc-isa-1-static = $(with-lld) |
| 51 |
tests += \ |
| 52 |
tst-ifunc-isa-2 \ |
| 53 |
tst-ifunc-isa-2-static \ |
| 54 |
# tests |
| 55 |
tests-static += \ |
| 56 |
tst-ifunc-isa-2-static \ |
| 57 |
# tests-static |
| 58 |
test-xfail-tst-ifunc-isa-2 = $(with-lld) |
| 59 |
test-xfail-tst-ifunc-isa-2-static = $(with-lld) |
| 60 |
endif |
| 61 |
endif |
| 62 |
ifeq (yes,$(enable-x86-isa-level)) |
| 63 |
tests += \ |
| 64 |
tst-isa-level-1 \ |
| 65 |
# tests |
| 66 |
modules-names += \ |
| 67 |
tst-isa-level-mod-1-baseline \ |
| 68 |
tst-isa-level-mod-1-v2 \ |
| 69 |
tst-isa-level-mod-1-v3 \ |
| 70 |
tst-isa-level-mod-1-v4 \ |
| 71 |
# modules-names |
| 72 |
|
| 73 |
|
| 74 |
CFLAGS-tst-isa-level-mod-1-baseline.c += -DINCLUDE_X86_ISA_LEVEL \ |
| 75 |
-DISA_LEVEL=0x1 \ |
| 76 |
-march=x86-64 |
| 77 |
|
| 78 |
CFLAGS-tst-isa-level-mod-1-v2.c += -DINCLUDE_X86_ISA_LEVEL \ |
| 79 |
-DISA_LEVEL=0x3 \ |
| 80 |
-march=x86-64 |
| 81 |
|
| 82 |
CFLAGS-tst-isa-level-mod-1-v3.c += -DINCLUDE_X86_ISA_LEVEL \ |
| 83 |
-DISA_LEVEL=0x7 \ |
| 84 |
-march=x86-64 |
| 85 |
|
| 86 |
CFLAGS-tst-isa-level-mod-1-v4.c += -DINCLUDE_X86_ISA_LEVEL \ |
| 87 |
-DISA_LEVEL=0xf \ |
| 88 |
-march=x86-64 |
| 89 |
|
| 90 |
$(objpfx)tst-isa-level-1.out: $(objpfx)tst-isa-level-mod-1-baseline.so \ |
| 91 |
$(objpfx)tst-isa-level-mod-1-v2.so \ |
| 92 |
$(objpfx)tst-isa-level-mod-1-v3.so \ |
| 93 |
$(objpfx)tst-isa-level-mod-1-v4.so |
| 94 |
endif |
| 95 |
tst-ifunc-isa-2-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-SSE4_2,-AVX,-AVX2,-AVX512F |
| 96 |
tst-ifunc-isa-2-static-ENV = $(tst-ifunc-isa-2-ENV) |
| 97 |
tst-hwcap-tunables-ARGS = -- $(host-test-program-cmd) |
| 98 |
|
| 99 |
CFLAGS-tst-gnu2-tls2.c += -msse2 |
| 100 |
CFLAGS-tst-gnu2-tls2mod0.c += -msse2 -mtune=haswell |
| 101 |
CFLAGS-tst-gnu2-tls2mod1.c += -msse2 -mtune=haswell |
| 102 |
CFLAGS-tst-gnu2-tls2mod2.c += -msse2 -mtune=haswell |
| 103 |
|
| 104 |
LDFLAGS-tst-gnu2-tls2 += -rdynamic |
| 105 |
LDFLAGS-tst-gnu2-tls2mod0.so += -Wl,-z,undefs |
| 106 |
LDFLAGS-tst-gnu2-tls2mod1.so += -Wl,-z,undefs |
| 107 |
LDFLAGS-tst-gnu2-tls2mod2.so += -Wl,-z,undefs |
| 108 |
|
| 109 |
CFLAGS-tst-gnu2-tls2-x86-noxsave.c += -msse2 |
| 110 |
CFLAGS-tst-gnu2-tls2-x86-noxsavec.c += -msse2 |
| 111 |
CFLAGS-tst-gnu2-tls2-x86-noxsavexsavec.c += -msse2 |
| 112 |
LDFLAGS-tst-gnu2-tls2-x86-noxsave += -Wl,-z,lazy -rdynamic |
| 113 |
LDFLAGS-tst-gnu2-tls2-x86-noxsavec += -Wl,-z,lazy -rdynamic |
| 114 |
LDFLAGS-tst-gnu2-tls2-x86-noxsavexsavec += -Wl,-z,lazy -rdynamic |
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
tst-gnu2-tls2-x86-noxsave-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-XSAVE |
| 119 |
tst-gnu2-tls2-x86-noxsavec-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-XSAVEC |
| 120 |
tst-gnu2-tls2-x86-noxsavexsavec-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-XSAVE,-XSAVEC |
| 121 |
$(objpfx)tst-gnu2-tls2-x86-noxsave: $(shared-thread-library) |
| 122 |
$(objpfx)tst-gnu2-tls2-x86-noxsavec: $(shared-thread-library) |
| 123 |
$(objpfx)tst-gnu2-tls2-x86-noxsavexsavec: $(shared-thread-library) |
| 124 |
$(objpfx)tst-gnu2-tls2-x86-noxsave.out \ |
| 125 |
$(objpfx)tst-gnu2-tls2-x86-noxsavec.out \ |
| 126 |
$(objpfx)tst-gnu2-tls2-x86-noxsavexsavec.out: \ |
| 127 |
$(objpfx)tst-gnu2-tls2mod0.so \ |
| 128 |
$(objpfx)tst-gnu2-tls2mod1.so \ |
| 129 |
$(objpfx)tst-gnu2-tls2mod2.so |
| 130 |
|
| 131 |
CFLAGS-tst-tls23.c += -msse2 |
| 132 |
CFLAGS-tst-tls23-mod.c += -msse2 -mtune=haswell |
| 133 |
|
| 134 |
LDFLAGS-tst-tls23 += -rdynamic |
| 135 |
tst-tls23-mod.so-no-z-defs = yes |
| 136 |
|
| 137 |
$(objpfx)tst-tls23-mod.so: $(libsupport) |
| 138 |
|
| 139 |
tests-special += $(objpfx)check-gnu2-tls.out |
| 140 |
|
| 141 |
$(objpfx)check-gnu2-tls.out: $(common-objpfx)libc.so |
| 142 |
LC_ALL=C $(READELF) -V -W $< \ |
| 143 |
| sed -ne '/.gnu.version_d/, /.gnu.version_r/ p' \ |
| 144 |
| grep GLIBC_ABI_GNU2_TLS > $@; \ |
| 145 |
$(evaluate-test) |
| 146 |
generated += check-gnu2-tls.out |
| 147 |
|
| 148 |
ifneq (,$(test-cc-cflags-no-direct-extern-access)) |
| 149 |
CFLAGS-tst-protected1a.c += $(test-cc-cflags-no-direct-extern-access) |
| 150 |
CFLAGS-tst-protected1b.c += $(test-cc-cflags-no-direct-extern-access) |
| 151 |
CFLAGS-vismain.c += $(test-cc-cflags-no-direct-extern-access) |
| 152 |
endif |
| 153 |
endif |
| 154 |
|
| 155 |
ifeq ($(subdir),gmon) |
| 156 |
CFLAGS-mcount.c += -mgeneral-regs-only |
| 157 |
endif |
| 158 |
|
| 159 |
ifeq ($(subdir),math) |
| 160 |
tests += \ |
| 161 |
tst-ldbl-nonnormal-printf \ |
| 162 |
# tests |
| 163 |
endif |
| 164 |
|
| 165 |
ifeq ($(subdir),setjmp) |
| 166 |
gen-as-const-headers += jmp_buf-ssp.sym |
| 167 |
sysdep_routines += __longjmp_cancel |
| 168 |
endif |
| 169 |
|
| 170 |
ifeq ($(subdir),string) |
| 171 |
sysdep_routines += cacheinfo |
| 172 |
|
| 173 |
tests += \ |
| 174 |
tst-memchr-rtm \ |
| 175 |
tst-memcmp-rtm \ |
| 176 |
tst-memmove-rtm \ |
| 177 |
tst-memrchr-rtm \ |
| 178 |
tst-memset-rtm \ |
| 179 |
tst-strcasecmp-rtm \ |
| 180 |
tst-strchr-rtm \ |
| 181 |
tst-strcmp-rtm \ |
| 182 |
tst-strcpy-rtm \ |
| 183 |
tst-strlen-rtm \ |
| 184 |
tst-strncasecmp-rtm \ |
| 185 |
tst-strncmp-rtm \ |
| 186 |
tst-strrchr-rtm \ |
| 187 |
tst-wcscmp-rtm \ |
| 188 |
tst-wcsncmp-rtm \ |
| 189 |
# tests |
| 190 |
|
| 191 |
CFLAGS-tst-memchr-rtm.c += -mrtm |
| 192 |
CFLAGS-tst-memcmp-rtm.c += -mrtm |
| 193 |
CFLAGS-tst-memmove-rtm.c += -mrtm |
| 194 |
CFLAGS-tst-memrchr-rtm.c += -mrtm |
| 195 |
CFLAGS-tst-memset-rtm.c += -mrtm |
| 196 |
CFLAGS-tst-strcasecmp-rtm.c += -mrtm |
| 197 |
CFLAGS-tst-strchr-rtm.c += -mrtm |
| 198 |
CFLAGS-tst-strcmp-rtm.c += -mrtm |
| 199 |
CFLAGS-tst-strcpy-rtm.c += -mrtm |
| 200 |
CFLAGS-tst-strlen-rtm.c += -mrtm |
| 201 |
CFLAGS-tst-strncasecmp-rtm.c += -mrtm -Wno-error |
| 202 |
CFLAGS-tst-strncmp-rtm.c += -mrtm -Wno-error |
| 203 |
CFLAGS-tst-strrchr-rtm.c += -mrtm |
| 204 |
CFLAGS-tst-wcscmp-rtm.c += -mrtm |
| 205 |
CFLAGS-tst-wcsncmp-rtm.c += -mrtm -Wno-error |
| 206 |
endif |
| 207 |
|
| 208 |
ifeq ($(subdir),posix) |
| 209 |
tests += \ |
| 210 |
tst-sysconf-cache-linesize \ |
| 211 |
tst-sysconf-cache-linesize-static \ |
| 212 |
# tests |
| 213 |
tests-static += \ |
| 214 |
tst-sysconf-cache-linesize-static \ |
| 215 |
# tests-static |
| 216 |
endif |