Revert "Allow glibc to be compiled without EXEC_PAGESIZE"
[glibc.git] / sysdeps / unix / sysv / linux / x86_64 / Makefile
blobfcbffd81cbaa031d7b75ed29e9b374d342ce9bb2
1 ifeq ($(subdir),misc)
2 sysdep_routines += ioperm iopl
3 endif
5 ifeq ($(subdir),stdlib)
6 sysdep_routines += __start_context allocate-shadow-stack
7 endif
9 ifeq ($(subdir),csu)
10 gen-as-const-headers += ucontext_i.sym
11 endif
13 ifeq ($(subdir),misc)
14 gen-as-const-headers += sigaltstack-offsets.sym
15 endif
17 ifeq ($(subdir),elf)
18 ifeq (yes,$(enable-x86-isa-level))
19 tests += \
20 tst-glibc-hwcaps-2 \
21 # tests
22 ifeq (no,$(build-hardcoded-path-in-tests))
23 # This is an ld.so.cache test, and RPATH/RUNPATH in the executable
24 # interferes with its test objectives.
25 tests-container += \
26 tst-glibc-hwcaps-2-cache \
27 # tests-container
28 endif
29 modules-names += \
30 libx86-64-isa-level-1 \
31 libx86-64-isa-level-2 \
32 libx86-64-isa-level-3 \
33 libx86-64-isa-level-4 \
34 # modules-names
36 $(objpfx)tst-glibc-hwcaps-2: $(objpfx)libx86-64-isa-level.so
38 $(objpfx)tst-glibc-hwcaps-2.out: \
39 $(objpfx)glibc-hwcaps/x86-64-v2/libx86-64-isa-level.so \
40 $(objpfx)glibc-hwcaps/x86-64-v4/libx86-64-isa-level.so \
41 $(objpfx)glibc-hwcaps/x86-64-v3/libx86-64-isa-level.so
42 $(objpfx)glibc-hwcaps/x86-64-v2/libx86-64-isa-level.so: \
43 $(objpfx)libx86-64-isa-level-2.so
44 $(make-target-directory)
45 cp $< $@
46 $(objpfx)glibc-hwcaps/x86-64-v3/libx86-64-isa-level.so: \
47 $(objpfx)libx86-64-isa-level-3.so
48 $(make-target-directory)
49 cp $< $@
50 $(objpfx)glibc-hwcaps/x86-64-v4/libx86-64-isa-level.so: \
51 $(objpfx)libx86-64-isa-level-4.so
52 $(make-target-directory)
53 cp $< $@
55 CFLAGS-libx86-64-isa-level-1.os += -march=x86-64
56 CFLAGS-libx86-64-isa-level-2.os += -march=x86-64
57 CFLAGS-libx86-64-isa-level-3.os += -march=x86-64
58 CFLAGS-libx86-64-isa-level-4.os += -march=x86-64
60 # The test modules are parameterized by preprocessor macros.
61 LDFLAGS-libx86-64-isa-level-1.so += -Wl,-soname,libx86-64-isa-level.so
62 LDFLAGS-libx86-64-isa-level-4.so += -Wl,-soname,libx86-64-isa-level.so
63 $(objpfx)libx86-64-isa-level%.os: $(..)/sysdeps/unix/sysv/linux/x86_64/x86-64-isa-level-VALUE.c
64 $(compile-command.c) -DVALUE=$(lastword $(subst -, ,$*)) \
65 -DISA_LEVEL="(1 << ($(lastword $(subst -, ,$*)) - 1))"
66 $(objpfx)libx86-64-isa-level.so: $(objpfx)libx86-64-isa-level-1.so
67 cp $< $@
68 endif
70 ifeq (yes,$(have-mamx-tile))
71 tests += \
72 tst-gnu2-tls2-amx \
73 # tests
75 modules-names += \
76 tst-gnu2-tls2-amx-mod0 \
77 tst-gnu2-tls2-amx-mod1 \
78 tst-gnu2-tls2-amx-mod2 \
79 # modules-names
81 $(objpfx)tst-gnu2-tls2-amx: $(shared-thread-library)
82 $(objpfx)tst-gnu2-tls2-amx.out: \
83 $(objpfx)tst-gnu2-tls2-amx-mod0.so \
84 $(objpfx)tst-gnu2-tls2-amx-mod1.so \
85 $(objpfx)tst-gnu2-tls2-amx-mod2.so
86 $(objpfx)tst-gnu2-tls2-amx-mod0.so: $(libsupport)
87 $(objpfx)tst-gnu2-tls2-amx-mod1.so: $(libsupport)
88 $(objpfx)tst-gnu2-tls2-amx-mod2.so: $(libsupport)
90 CFLAGS-tst-gnu2-tls2-amx.c += -mamx-tile
91 CFLAGS-tst-gnu2-tls2-amx-mod0.c += -mamx-tile -mtls-dialect=gnu2
92 CFLAGS-tst-gnu2-tls2-amx-mod1.c += -mamx-tile -mtls-dialect=gnu2
93 CFLAGS-tst-gnu2-tls2-amx-mod2.c += -mamx-tile -mtls-dialect=gnu2
94 endif
96 endif # $(subdir) == elf
98 ifneq ($(enable-cet),no)
99 ifeq ($(subdir),elf)
100 tests += tst-cet-property-1 tst-cet-property-2
102 CFLAGS-tst-cet-property-1.o += -fcf-protection
103 ASFLAGS-tst-cet-property-dep-2.o += -fcf-protection
105 $(objpfx)tst-cet-property-2: $(objpfx)tst-cet-property-dep-2.o
106 $(objpfx)tst-cet-property-2.out: $(objpfx)tst-cet-property-2 \
107 $(objpfx)tst-cet-property-1.out
108 env $(run-program-env) $(test-via-rtld-prefix) \
109 $(objpfx)tst-cet-property-2 \
110 < $(objpfx)tst-cet-property-1.out > $@; \
111 $(evaluate-test)
112 endif
114 ifeq ($(subdir),posix)
115 tests += tst-cet-vfork-1
116 CFLAGS-tst-cet-vfork-1.c += -mshstk
117 endif
119 ifeq ($(subdir),stdlib)
120 tests += tst-cet-setcontext-1
121 CFLAGS-tst-cet-setcontext-1.c += -mshstk
122 endif
123 endif