filter out debug flag and redundant -O2