--- a/configure.ac	2022-04-17 07:41:11.000000000 -0400
+++ b/configure.ac	2022-12-25 13:24:02.551681208 -0500
@@ -21,7 +21,7 @@
 DC_DOVECOT
 DC_DOVECOT_MODULEDIR
 LIBDOVECOT_INCLUDE="$LIBDOVECOT_INCLUDE"
-CFLAGS="$CFLAGS $EXTRA_CFLAGS $DOVECOT_FLAGS -O2"
+CFLAGS="-O2 $CFLAGS $EXTRA_CFLAGS $DOVECOT_FLAGS"
 LIBS="$DOVECOT_LIBS"
 BINARY_LDFLAGS="$PIE_LDFLAGS $RELRO_LDFLAGS"
 BINARY_CFLAGS="$PIE_CFLAGS"
