diff --git a/contrib/pagehack/Makefile b/contrib/pagehack/Makefile index 8dd753521083024300c0d566f3f5ad60930ca052..4c944b7671b0ed81985c11c31d4d01a7c9dd92f7 100644 --- a/contrib/pagehack/Makefile +++ b/contrib/pagehack/Makefile @@ -7,6 +7,9 @@ OBJS = pagehack.o \ PROGRAM = pagehack all: submake-pagecompression +exclude_option = -fPIC +override CPPFLAGS := $(filter-out $(exclude_option),$(CPPFLAGS)) + ifdef USE_PGXS PG_CONFIG = pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) diff --git a/contrib/pagehack/pagehack.cpp b/contrib/pagehack/pagehack.cpp index 0ffc38ac827e667c06061b61367dddfec6bfbeb4..08b10845e19c65f7399fb15b9ea2434c5a9bbb06 100644 --- a/contrib/pagehack/pagehack.cpp +++ b/contrib/pagehack/pagehack.cpp @@ -198,7 +198,11 @@ static int PgIndexRelTupleParserCursor = -1; /* For Assert(...) macros. */ +#ifdef USE_ASSERT_CHECKING THR_LOCAL bool assert_enabled = true; +#else +THR_LOCAL bool assert_enabled = false; +#endif /* Options */ bool only_vm = false;