Makefile.randstruct 511 B

1234567891011121314151617
  1. # SPDX-License-Identifier: GPL-2.0
  2. randstruct-cflags-y += -DRANDSTRUCT
  3. ifdef CONFIG_GCC_PLUGIN_RANDSTRUCT
  4. randstruct-cflags-y \
  5. += -fplugin=$(objtree)/scripts/gcc-plugins/randomize_layout_plugin.so
  6. randstruct-cflags-$(CONFIG_RANDSTRUCT_PERFORMANCE) \
  7. += -fplugin-arg-randomize_layout_plugin-performance-mode
  8. else
  9. randstruct-cflags-y \
  10. += -frandomize-layout-seed-file=$(objtree)/scripts/basic/randstruct.seed
  11. endif
  12. export RANDSTRUCT_CFLAGS := $(randstruct-cflags-y)
  13. KBUILD_CFLAGS += $(RANDSTRUCT_CFLAGS)