change: no longer pass -O0 to gcc when --with-debug is specified because gcc often generates bogus DWARF info when optimization is disabled.
updated tests to reflect the changes in the previous commit.