--- libaio-0.3.111/src/Makefile.orig	2018-03-06 19:24:47.000000000 -0300
+++ libaio-0.3.111/src/Makefile	2018-11-20 17:21:39.579091976 -0300
@@ -2,8 +2,7 @@
 includedir=$(prefix)/include
 libdir=$(prefix)/lib
 
-CFLAGS ?= -g -fomit-frame-pointer -O2
-CFLAGS += -nostdlib -nostartfiles -Wall -I. -fPIC
+CFLAGS += $(OPT_FLAGS) -fomit-frame-pointer -nostdlib -nostartfiles -Wall -I. -fPIC
 SO_CFLAGS=-shared $(CFLAGS)
 L_CFLAGS=$(CFLAGS)
 LINK_FLAGS=
