0001
0002
0003 randstruct-cflags-y += -DRANDSTRUCT
0004
0005 ifdef CONFIG_GCC_PLUGIN_RANDSTRUCT
0006 randstruct-cflags-y \
0007 += -fplugin=$(objtree)/scripts/gcc-plugins/randomize_layout_plugin.so
0008 randstruct-cflags-$(CONFIG_RANDSTRUCT_PERFORMANCE) \
0009 += -fplugin-arg-randomize_layout_plugin-performance-mode
0010 else
0011 randstruct-cflags-y \
0012 += -frandomize-layout-seed-file=$(objtree)/scripts/basic/randstruct.seed
0013 endif
0014
0015 export RANDSTRUCT_CFLAGS := $(randstruct-cflags-y)
0016
0017 KBUILD_CFLAGS += $(RANDSTRUCT_CFLAGS)