Get rid of all the duplicated settings of AM_CFLAGS in the makefiles
for the various core modules and use a single global setting so that
the flags are actually consistent everywhere.

Also get rid of most the USE_PIE blocks in the makefiles by having
configure pass expand a variable in the new global AM_CFLAGS to one
of "-fpie" or "" depending on whether PIE is in use.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3760 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/Makefile.core-AM_CPPFLAGS.am b/Makefile.core-AM_CPPFLAGS.am
index fe9d406..5055b21 100644
--- a/Makefile.core-AM_CPPFLAGS.am
+++ b/Makefile.core-AM_CPPFLAGS.am
@@ -12,6 +12,11 @@
 		-DVGO_$(VG_OS)=1 \
 		-DVGP_$(VG_ARCH)_$(VG_OS)=1
 
+BASE_AM_CFLAGS = @ARCH_CORE_AM_CFLAGS@ -Wmissing-prototypes -Winline -Wall -Wshadow -O -g
+
+PIC_AM_CFLAGS = $(BASE_AM_CFLAGS) -fpic -fno-omit-frame-pointer
+
 AM_CPPFLAGS = $(add_includes)
+AM_CFLAGS = $(WERROR) @PIE_AM_CFLAGS@ $(BASE_AM_CFLAGS)
 AM_CCASFLAGS = $(add_includes) @ARCH_CORE_AM_CCASFLAGS@ -Wa,-gstabs