Skip to content

Commit dad99d2

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>
1 parent 460f066 commit dad99d2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/zdtm/Makefile.inc

Lines changed: 6 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
@@ -74,6 +79,7 @@ define pkg-cflags
7479
$(shell PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" $(PKG_CONFIG) --cflags $(1))
7580
endef
7681

82+
7783
%.d: %.c
7884
$(E) " DEP " $@
7985
$(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -MM -MP $< -o $@

0 commit comments

Comments
 (0)