handle CONFIG_SEAL_METADATA option like the others

This commit is contained in:
Daniel Micay 2019-08-18 01:56:20 -04:00
parent defd55f302
commit d8ebdea05f
2 changed files with 4 additions and 3 deletions

View File

@ -53,8 +53,8 @@ ifeq ($(CONFIG_UBSAN),true)
CXXFLAGS += -fsanitize=undefined CXXFLAGS += -fsanitize=undefined
endif endif
ifeq ($(CONFIG_SEAL_METADATA),true) ifeq (,$(filter $(CONFIG_SEAL_METADATA),true false))
CPPFLAGS += -DCONFIG_SEAL_METADATA $(error CONFIG_SEAL_METADATA must be true or false)
endif endif
ifeq (,$(filter $(CONFIG_ZERO_ON_FREE),true false)) ifeq (,$(filter $(CONFIG_ZERO_ON_FREE),true false))
@ -86,6 +86,7 @@ ifeq (,$(filter $(CONFIG_STATS),true false))
endif endif
CPPFLAGS += \ CPPFLAGS += \
-DCONFIG_SEAL_METADATA=$(CONFIG_SEAL_METADATA) \
-DZERO_ON_FREE=$(CONFIG_ZERO_ON_FREE) \ -DZERO_ON_FREE=$(CONFIG_ZERO_ON_FREE) \
-DWRITE_AFTER_FREE_CHECK=$(CONFIG_WRITE_AFTER_FREE_CHECK) \ -DWRITE_AFTER_FREE_CHECK=$(CONFIG_WRITE_AFTER_FREE_CHECK) \
-DSLOT_RANDOMIZE=$(CONFIG_SLOT_RANDOMIZE) \ -DSLOT_RANDOMIZE=$(CONFIG_SLOT_RANDOMIZE) \

2
util.h
View File

@ -51,7 +51,7 @@ extern int __register_atfork(void (*)(void), void (*)(void), void (*)(void), voi
#define atfork pthread_atfork #define atfork pthread_atfork
#endif #endif
#ifdef CONFIG_SEAL_METADATA #if CONFIG_SEAL_METADATA
#ifdef __GLIBC__ #ifdef __GLIBC__
#if __GLIBC_PREREQ(2, 27) #if __GLIBC_PREREQ(2, 27)