mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 09:58:19 +08:00
sim: ppc: align format string settings with common code
This copies logic used in the common sim warning configure code to fix build errors for mingw targets. Turning format warnings on triggers a failure in the debug.c file, so apply a minor fix at the same time.
This commit is contained in:
6
sim/ppc/configure
vendored
6
sim/ppc/configure
vendored
@ -3489,6 +3489,12 @@ sim_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith
|
|||||||
-Wno-pointer-sign
|
-Wno-pointer-sign
|
||||||
-Wold-style-declaration -Wold-style-definition
|
-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.
|
# Check whether --enable-sim-warnings was given.
|
||||||
if test "${enable_sim_warnings+set}" = set; then :
|
if test "${enable_sim_warnings+set}" = set; then :
|
||||||
enableval=$enable_sim_warnings; case "${enableval}" in
|
enableval=$enable_sim_warnings; case "${enableval}" in
|
||||||
|
@ -430,6 +430,12 @@ sim_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith
|
|||||||
-Wno-pointer-sign
|
-Wno-pointer-sign
|
||||||
-Wold-style-declaration -Wold-style-definition
|
-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,
|
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],
|
[ --enable-sim-warnings=opts Extra CFLAGS for turning on compiler warnings except for idecode.o, semantics.o and psim.o],
|
||||||
[case "${enableval}" in
|
[case "${enableval}" in
|
||||||
|
@ -140,7 +140,7 @@ trace_usage(int verbose)
|
|||||||
printf_filtered("\n");
|
printf_filtered("\n");
|
||||||
}
|
}
|
||||||
if (verbose > 1) {
|
if (verbose > 1) {
|
||||||
const char *format = "\t%-18s%s\n";
|
static const char format[] = "\t%-18s%s\n";
|
||||||
int i;
|
int i;
|
||||||
printf_filtered(format, "all", "enable all the trace options");
|
printf_filtered(format, "all", "enable all the trace options");
|
||||||
for (i = 0; trace_description[i].option < nr_trace_options; i++)
|
for (i = 0; trace_description[i].option < nr_trace_options; i++)
|
||||||
|
Reference in New Issue
Block a user