Skip to content

Commit 61e8a76

Browse files
svilenkovavagin
authored andcommitted
zdtm: shstk: add SHSTK_ENABLE test build option
* add SHSTK_ENABLE=1 toggle * passes -mshstk to compiler and -z shstk to linker Example: $ make -C test/zdtm/static clean $ make -C test/zdtm/static V=1 SHSTK_ENABLE=1 env00 $ readelf --notes test/zdtm/static/env00 | grep SHSTK Properties: x86 feature: SHSTK Signed-off-by: Igor Svilenkov Bozic <svilenkov@gmail.com> Co-Authored-By: Andrei Vagin <avagin@gmail.com> Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
1 parent a0fc753 commit 61e8a76

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/zdtm/Makefile.inc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ endif
6666
export PKG_CONFIG_PATH
6767
endif
6868

69+
ifeq ($(SHSTK_ENABLE),1)
70+
CFLAGS += -mshstk
71+
LDFLAGS += -Wl,-z,shstk
72+
endif
73+
6974
define pkg-libs
7075
$(shell PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" $(PKG_CONFIG) --libs $(1))
7176
endef

0 commit comments

Comments
 (0)