Change the baseline optimisation level from -O to -O2.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7162 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/Makefile.flags.am b/Makefile.flags.am
index 30c2535..0acb2d7 100644
--- a/Makefile.flags.am
+++ b/Makefile.flags.am
@@ -1,9 +1,14 @@
 
-# Baseline flags for all compilations
-AM_CFLAGS_BASE = -O -g -Wmissing-prototypes -Winline -Wall -Wshadow \
+# Baseline flags for all compilations.  Aim here is to maximise
+# performance and get whatever useful warnings we can out of gcc.
+AM_CFLAGS_BASE = -O2 -g -Wmissing-prototypes -Winline -Wall -Wshadow \
                  -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations
 
-AM_CFLAGS_PIC = -fpic -fno-omit-frame-pointer
+# These flags are used for building the preload shared objects.
+# The aim is to give reasonable performance but also to have good
+# stack traces, since users often see stack traces extending 
+# into (and through) the preloads.
+AM_CFLAGS_PIC = -O -g -fpic -fno-omit-frame-pointer
 
 # Flags for specific targets
 AM_FLAG_M3264_X86_LINUX   = @FLAG_M32@