sim: ppc: switch to common warning flags

Now that the ppc code has been cleaned up enough to use the same set
of warning flags as the common code, delete the ppc-specific configure
logic so we can leverage what the common code already defined for us.
diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in
index 172965c..b0d2ae9 100644
--- a/sim/ppc/Makefile.in
+++ b/sim/ppc/Makefile.in
@@ -68,7 +68,6 @@
 MONITOR_CFLAGS = @sim_monitor@
 MODEL_CFLAGS = @sim_model@ @sim_default_model@ @sim_model_issue@
 TERMIO_CFLAGS = @sim_termio@
-WARNING_CFLAGS = @sim_warnings@
 DEVZERO_CFLAGS = @sim_devzero@
 CONFIG_CFLAGS = \
   $(SMP_CFLAGS) \
@@ -83,9 +82,9 @@
   $(DEVZERO_CFLAGS)
 SIM_FPU_CFLAGS = @sim_fpu_cflags@
 
-STD_CFLAGS	= $(CFLAGS) $(WERROR_CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(INCLUDES) $(INTL_CFLAGS) $(SIM_FPU_CFLAGS)
+STD_CFLAGS	= $(CFLAGS) $(WERROR_CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARN_CFLAGS) $(INCLUDES) $(INTL_CFLAGS) $(SIM_FPU_CFLAGS)
 NOWARN_CFLAGS	= $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(INCLUDES) $(SIM_FPU_CFLAGS)
-BUILD_CFLAGS	= $(CFLAGS_FOR_BUILD) $(INCLUDES) $(WARNING_CFLAGS)
+BUILD_CFLAGS	= $(CFLAGS_FOR_BUILD) $(INCLUDES) $(WARN_CFLAGS)
 
 LIBS = $(COMMON_LIBS) @LIBS@
 
diff --git a/sim/ppc/configure b/sim/ppc/configure
index a53a30f..7b41344 100755
--- a/sim/ppc/configure
+++ b/sim/ppc/configure
@@ -651,7 +651,6 @@
 sim_opcode
 sim_config
 sim_line_nr
-sim_warnings
 EGREP
 GREP
 CPP
@@ -726,7 +725,6 @@
 enable_sim_smp
 enable_sim_switch
 enable_sim_timebase
-enable_sim_warnings
 enable_sim_xor_endian
 '
       ac_precious_vars='build_alias
@@ -1365,7 +1363,6 @@
   --enable-sim-smp=n			Specify number of processors to configure for.
   --enable-sim-switch			Use a switch instead of a table for instruction call.
   --enable-sim-timebase			Specify whether the PPC timebase is supported.
-  --enable-sim-warnings=opts		Extra CFLAGS for turning on compiler warnings except for idecode.o, semantics.o and psim.o
   --enable-sim-xor-endian=n		Specify number bytes involved in PowerPC XOR bi-endian mode (default 8).
 
 Some influential environment variables:
@@ -3478,64 +3475,6 @@
 fi
 
 
-sim_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith
--Wno-unused -Wunused-value -Wunused-function
--Wno-switch -Wno-char-subscripts
--Wempty-body -Wunused-but-set-parameter
--Wno-error=maybe-uninitialized
--Wmissing-declarations
--Wmissing-prototypes
--Wdeclaration-after-statement -Wmissing-parameter-type
--Wpointer-sign
--Wold-style-declaration -Wold-style-definition
-"
-# Enable -Wno-format by default when using gcc on mingw since many
-# GCC versions complain about %I64.
-case "${host}" in
-  *-*-mingw32*) sim_warnings="$sim_warnings -Wno-format" ;;
-  *) sim_warnings="$sim_warnings -Wformat-nonliteral" ;;
-esac
-# Check whether --enable-sim-warnings was given.
-if test "${enable_sim_warnings+set}" = set; then :
-  enableval=$enable_sim_warnings; case "${enableval}" in
-  yes)	;;
-  no)	sim_warnings="-w";;
-  *)	sim_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$sim_warnings" != x""; then
-  echo "Setting warning flags = $sim_warnings" 6>&1
-fi
-fi
-if test "x${sim_warnings}" != x -a "x$GCC" = xyes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
-$as_echo_n "checking compiler warning flags... " >&6; }
-  build_warnings="${sim_warnings}"
-  sim_warnings=
-  for w in ${build_warnings}; do
-        saved_CFLAGS="$CFLAGS"
-    CFLAGS="$CFLAGS -Werror $w"
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  sim_warnings="${sim_warnings} $w"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    CFLAGS="$saved_CFLAGS"
-  done
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${sim_warnings}" >&5
-$as_echo "${sim_warnings}" >&6; }
-fi
-
-
 # Check whether --enable-sim-xor-endian was given.
 if test "${enable_sim_xor_endian+set}" = set; then :
   enableval=$enable_sim_xor_endian; case "${enableval}" in
@@ -4302,7 +4241,6 @@
 
 
 
-
 ac_config_files="$ac_config_files Makefile"
 
 ac_config_commands="$ac_config_commands default"
diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac
index d1e9c09..e264c87 100644
--- a/sim/ppc/configure.ac
+++ b/sim/ppc/configure.ac
@@ -418,49 +418,6 @@
 fi],[sim_timebase=""])dnl
 
 
-dnl TODO: Switch to common $(WARN_CFLAGS).
-sim_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith
--Wno-unused -Wunused-value -Wunused-function
--Wno-switch -Wno-char-subscripts
--Wempty-body -Wunused-but-set-parameter
--Wno-error=maybe-uninitialized
--Wmissing-declarations
--Wmissing-prototypes
--Wdeclaration-after-statement -Wmissing-parameter-type
--Wpointer-sign
--Wold-style-declaration -Wold-style-definition
-"
-# Enable -Wno-format by default when using gcc on mingw since many
-# GCC versions complain about %I64.
-case "${host}" in
-  *-*-mingw32*) sim_warnings="$sim_warnings -Wno-format" ;;
-  *) sim_warnings="$sim_warnings -Wformat-nonliteral" ;;
-esac
-AC_ARG_ENABLE(sim-warnings,
-[  --enable-sim-warnings=opts		Extra CFLAGS for turning on compiler warnings except for idecode.o, semantics.o and psim.o],
-[case "${enableval}" in
-  yes)	;;
-  no)	sim_warnings="-w";;
-  *)	sim_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$sim_warnings" != x""; then
-  echo "Setting warning flags = $sim_warnings" 6>&1
-fi])dnl
-if test "x${sim_warnings}" != x -a "x$GCC" = xyes; then
-  AC_MSG_CHECKING(compiler warning flags)
-  build_warnings="${sim_warnings}"
-  sim_warnings=
-  for w in ${build_warnings}; do
-    dnl Check that GCC accepts it
-    saved_CFLAGS="$CFLAGS"
-    CFLAGS="$CFLAGS -Werror $w"
-    AC_TRY_COMPILE([],[],sim_warnings="${sim_warnings} $w",)
-    CFLAGS="$saved_CFLAGS"
-  done
-  AC_MSG_RESULT(${sim_warnings})
-fi
-
-
 AC_ARG_ENABLE(sim-xor-endian,
 [  --enable-sim-xor-endian=n		Specify number bytes involved in PowerPC XOR bi-endian mode (default 8).],
 [case "${enableval}" in
@@ -663,7 +620,6 @@
   rm -rf $tempdir
 fi
 
-AC_SUBST(sim_warnings)
 AC_SUBST(sim_line_nr)
 AC_SUBST(sim_config)
 AC_SUBST(sim_opcode)