mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 22:07:58 +08:00
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.
This commit is contained in:
@ -68,7 +68,6 @@ FLOAT_CFLAGS = @sim_float@
|
||||
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 @@ CONFIG_CFLAGS = \
|
||||
$(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@
|
||||
|
||||
|
62
sim/ppc/configure
vendored
62
sim/ppc/configure
vendored
@ -651,7 +651,6 @@ sim_switch
|
||||
sim_opcode
|
||||
sim_config
|
||||
sim_line_nr
|
||||
sim_warnings
|
||||
EGREP
|
||||
GREP
|
||||
CPP
|
||||
@ -726,7 +725,6 @@ enable_sim_packages
|
||||
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 @@ Optional Features:
|
||||
--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 @@ else
|
||||
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
|
||||
@ -4300,7 +4239,6 @@ fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files Makefile"
|
||||
|
@ -418,49 +418,6 @@ if test x"$silent" != x"yes" && test x"$sim_timebase" != x""; then
|
||||
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 @@ else
|
||||
rm -rf $tempdir
|
||||
fi
|
||||
|
||||
AC_SUBST(sim_warnings)
|
||||
AC_SUBST(sim_line_nr)
|
||||
AC_SUBST(sim_config)
|
||||
AC_SUBST(sim_opcode)
|
||||
|
Reference in New Issue
Block a user