https://bugs.openldap.org/show_bug.cgi?id=9528
--- Comment #1 from Howard Chu hyc@openldap.org --- (In reply to Quanah Gibson-Mount from comment #0)
When building LMDB, specified hardening flags are thrown away due to the Makefile overriding CFLAGS:
Makefile:CFLAGS = $(THREADS) $(OPT) $(W) $(XCFLAGS)
Put them in XCFLAGS.