diff --git a/src/sphere/Makefile b/src/sphere/Makefile
index 7c616b7ca9368a4e27bfaf3d2b486d08a88dfafb..f70b833d290c562539f544462ca51069c53f4a6d 100644
--- a/src/sphere/Makefile
+++ b/src/sphere/Makefile
@@ -3,7 +3,7 @@ FC=gfortran
 FCFLAGS=-std=legacy -O3
 LFLAGS=
 CXX=g++
-CXXFLAGS=-O0 -ggdb -pg -coverage
+CXXFLAGS=-O2 -ggdb -pg -coverage
 CXXLFLAGS=
 
 all: edfb sph np_sphere