diff options
Diffstat (limited to 'sysdeps/x86/Makefile')
-rw-r--r-- | sysdeps/x86/Makefile | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/sysdeps/x86/Makefile b/sysdeps/x86/Makefile index e9b2d0b35d..672bb19489 100644 --- a/sysdeps/x86/Makefile +++ b/sysdeps/x86/Makefile @@ -17,6 +17,44 @@ endif ifeq ($(enable-cet),yes) ifeq ($(subdir),elf) sysdep-dl-routines += dl-cet + +tests += tst-cet-legacy-1 tst-cet-legacy-2 tst-cet-legacy-2a \ + tst-cet-legacy-3 tst-cet-legacy-4 +ifneq (no,$(have-tunables)) +tests += tst-cet-legacy-4a tst-cet-legacy-4b tst-cet-legacy-4c +endif +modules-names += tst-cet-legacy-mod-1 tst-cet-legacy-mod-2 \ + tst-cet-legacy-mod-4 + +CFLAGS-tst-cet-legacy-2.c += -fcf-protection=branch +CFLAGS-tst-cet-legacy-2a.c += -fcf-protection +CFLAGS-tst-cet-legacy-mod-1.c += -fcf-protection=none +CFLAGS-tst-cet-legacy-mod-2.c += -fcf-protection=none +CFLAGS-tst-cet-legacy-3.c += -fcf-protection=none +CFLAGS-tst-cet-legacy-4.c += -fcf-protection=branch +CFLAGS-tst-cet-legacy-4a.c += -fcf-protection +CFLAGS-tst-cet-legacy-4b.c += -fcf-protection +CFLAGS-tst-cet-legacy-mod-4.c += -fcf-protection=none + +$(objpfx)tst-cet-legacy-1: $(objpfx)tst-cet-legacy-mod-1.so \ + $(objpfx)tst-cet-legacy-mod-2.so +$(objpfx)tst-cet-legacy-2: $(objpfx)tst-cet-legacy-mod-2.so $(libdl) +$(objpfx)tst-cet-legacy-2.out: $(objpfx)tst-cet-legacy-mod-1.so +$(objpfx)tst-cet-legacy-2a: $(objpfx)tst-cet-legacy-mod-2.so $(libdl) +$(objpfx)tst-cet-legacy-2a.out: $(objpfx)tst-cet-legacy-mod-1.so +$(objpfx)tst-cet-legacy-4: $(libdl) +$(objpfx)tst-cet-legacy-4.out: $(objpfx)tst-cet-legacy-mod-4.so +ifneq (no,$(have-tunables)) +$(objpfx)tst-cet-legacy-4a: $(libdl) +$(objpfx)tst-cet-legacy-4a.out: $(objpfx)tst-cet-legacy-mod-4.so +tst-cet-legacy-4a-ENV = GLIBC_TUNABLES=glibc.tune.x86_shstk=permissive +$(objpfx)tst-cet-legacy-4b: $(libdl) +$(objpfx)tst-cet-legacy-4b.out: $(objpfx)tst-cet-legacy-mod-4.so +tst-cet-legacy-4b-ENV = GLIBC_TUNABLES=glibc.tune.x86_shstk=on +$(objpfx)tst-cet-legacy-4c: $(libdl) +$(objpfx)tst-cet-legacy-4c.out: $(objpfx)tst-cet-legacy-mod-4.so +tst-cet-legacy-4c-ENV = GLIBC_TUNABLES=glibc.tune.x86_shstk=off +endif endif # Add -fcf-protection to CFLAGS when CET is enabled. |