Separate -O and -g

Since it appears to be a source of great controversy, let's make setting -g and -O independent.