* [PATCH/submitted 1/5] sim: ppc: drop now unused config.in
@ 2024-01-02 6:42 Mike Frysinger
2024-01-02 6:42 ` [PATCH/submitted 2/5] sim: ppc: switch to AS_HELP_STRING for automatic formatting Mike Frysinger
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Mike Frysinger @ 2024-01-02 6:42 UTC (permalink / raw)
To: gdb-patches
---
sim/ppc/config.in | 19 -------------------
1 file changed, 19 deletions(-)
delete mode 100644 sim/ppc/config.in
--
2.43.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH/submitted 2/5] sim: ppc: switch to AS_HELP_STRING for automatic formatting
2024-01-02 6:42 [PATCH/submitted 1/5] sim: ppc: drop now unused config.in Mike Frysinger
@ 2024-01-02 6:42 ` Mike Frysinger
2024-01-02 6:42 ` [PATCH/submitted 3/5] sim: ppc: standardize configure option processing Mike Frysinger
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Mike Frysinger @ 2024-01-02 6:42 UTC (permalink / raw)
To: gdb-patches
---
sim/ppc/configure | 51 ++++++++++++++++++++++++++++----------------
sim/ppc/configure.ac | 36 +++++++++++++++----------------
2 files changed, 51 insertions(+), 36 deletions(-)
diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac
index a68d9727b904..dce55d8ecb05 100644
--- a/sim/ppc/configure.ac
+++ b/sim/ppc/configure.ac
@@ -4,7 +4,7 @@ AC_CONFIG_MACRO_DIRS([../.. ../../config])
AC_ARG_ENABLE(sim-bitsize,
-[ --enable-sim-bitsize=n Specify target bitsize (32 or 64).],
+[AS_HELP_STRING([--enable-sim-bitsize=n], [Specify target bitsize (32 or 64).])],
[case "${enableval}" in
32|64) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=$enableval";;
*) AC_MSG_ERROR("--enable-sim-bitsize was given $enableval. Expected 32 or 64"); sim_bitsize="";;
@@ -15,7 +15,7 @@ fi],[sim_bitsize=""])dnl
AC_ARG_ENABLE(sim-decode-mechanism,
-[ --enable-sim-decode-mechanism=which Specify the instruction decode mechanism.],
+[AS_HELP_STRING([--enable-sim-decode-mechanism=which], [Specify the instruction decode mechanism.])],
[case "${enableval}" in
yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-decode-mechanism=file");;
array|switch|padded-switch|goto-switch) sim_decode_mechanism="-T ${enableval}";;
@@ -31,7 +31,7 @@ fi])dnl
AC_ARG_ENABLE(sim-default-model,
-[ --enable-sim-default-model=which Specify default PowerPC to model.],
+[AS_HELP_STRING([--enable-sim-default-model=which], [Specify default PowerPC to model.])],
[case "${enableval}" in
yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-default-model=model");;
*) sim_default_model="-DWITH_DEFAULT_MODEL=${enableval}";;
@@ -42,7 +42,7 @@ fi],[sim_default_model=""])dnl
AC_ARG_ENABLE(sim-duplicate,
-[ --enable-sim-duplicate Expand (duplicate) semantic functions.],
+[AS_HELP_STRING([--enable-sim-duplicate], [Expand (duplicate) semantic functions.])],
[case "${enableval}" in
yes) sim_dup="-E";;
no) sim_dup="";;
@@ -57,7 +57,7 @@ fi])dnl
AC_ARG_ENABLE(sim-filter,
-[ --enable-sim-filter=rule Specify filter rules.],
+[AS_HELP_STRING([--enable-sim-filter=rule], [Specify filter rules.])],
[case "${enableval}" in
yes) AC_MSG_ERROR("--enable-sim-filter must be specified with a rule to filter or no"); sim_filter="";;
no) sim_filter="";;
@@ -72,7 +72,7 @@ fi])dnl
AC_ARG_ENABLE(sim-float,
-[ --enable-sim-float Specify whether the target has hard, soft, altivec or e500 floating point.],
+[AS_HELP_STRING([--enable-sim-float], [Specify whether the target has hard, soft, altivec or e500 floating point.])],
[case "${enableval}" in
yes | hard) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT";;
no | soft) sim_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";;
@@ -92,7 +92,7 @@ esac
AC_ARG_ENABLE(sim-hardware,
-[ --enable-sim-hardware=list Specify the hardware to be included in the build.],
+[AS_HELP_STRING([--enable-sim-hardware=list], [Specify the hardware to be included in the build.])],
[hardware="cpu,memory,nvram,iobus,htab,disk,trace,register,vm,init,core,pal,com,eeprom,opic,glue,phb,ide,sem,shm"
case "${enableval}" in
yes) ;;
@@ -114,7 +114,7 @@ fi])dnl
AC_ARG_ENABLE(sim-icache,
-[ --enable-sim-icache=size Specify instruction-decode cache size and type.],
+[AS_HELP_STRING([--enable-sim-icache=size], [Specify instruction-decode cache size and type.])],
[icache="-R"
case "${enableval}" in
yes) icache="1024"; sim_icache="-I $icache";;
@@ -141,7 +141,7 @@ fi])dnl
AC_ARG_ENABLE(sim-jump,
-[ --enable-sim-jump Jump between semantic code (instead of call/return).],
+[AS_HELP_STRING([--enable-sim-jump], [Jump between semantic code (instead of call/return).])],
[case "${enableval}" in
yes) sim_jump="-J";;
no) sim_jump="";;
@@ -156,7 +156,7 @@ fi])dnl
AC_ARG_ENABLE(sim-line-nr,
-[ --enable-sim-line-nr=opts Generate extra CPP code that references source rather than generated code],
+[AS_HELP_STRING([--enable-sim-line-nr=opts], [Generate extra CPP code that references source rather than generated code])],
[case "${enableval}" in
yes) sim_line_nr="";;
no) sim_line_nr="-L";;
@@ -168,7 +168,7 @@ fi],[sim_line_nr=""])dnl
AC_ARG_ENABLE(sim-model,
-[ --enable-sim-model=which Specify PowerPC to model.],
+[AS_HELP_STRING([--enable-sim-model=which], [Specify PowerPC to model.])],
[case "${enableval}" in
yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-model=model");;
*) sim_model="-DWITH_MODEL=${enableval}";;
@@ -179,7 +179,7 @@ fi],[sim_model=""])dnl
AC_ARG_ENABLE(sim-model-issue,
-[ --enable-sim-model-issue Specify whether to simulate model specific actions],
+[AS_HELP_STRING([--enable-sim-model-issue], [Specify whether to simulate model specific actions])],
[case "${enableval}" in
yes) sim_model_issue="-DWITH_MODEL_ISSUE=MODEL_ISSUE_PROCESS";;
no) sim_model_issue="-DWITH_MODEL_ISSUE=MODEL_ISSUE_IGNORE";;
@@ -191,7 +191,7 @@ fi],[sim_model_issue=""])dnl
AC_ARG_ENABLE(sim-monitor,
-[ --enable-sim-monitor=mon Specify whether to enable monitoring events.],
+[AS_HELP_STRING([--enable-sim-monitor=mon], [Specify whether to enable monitoring events.])],
[case "${enableval}" in
yes) sim_monitor="-DWITH_MON='MONITOR_INSTRUCTION_ISSUE | MONITOR_LOAD_STORE_UNIT'";;
no) sim_monitor="-DWITH_MON=0";;
@@ -205,7 +205,7 @@ fi],[sim_monitor=""])dnl
AC_ARG_ENABLE(sim-opcode,
-[ --enable-sim-opcode=which Override default opcode lookup.],
+[AS_HELP_STRING([--enable-sim-opcode=which], [Override default opcode lookup.])],
[case "${enableval}" in
yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-opcode=file");;
*) if test -f "${srcdir}/${enableval}"; then
@@ -226,7 +226,7 @@ fi])dnl
AC_ARG_ENABLE(sim-smp,
-[ --enable-sim-smp=n Specify number of processors to configure for.],
+[AS_HELP_STRING([--enable-sim-smp=n], [Specify number of processors to configure for.])],
[case "${enableval}" in
yes) sim_smp="-DWITH_SMP=5" ; sim_igen_smp="-N 5";;
no) sim_smp="-DWITH_SMP=0" ; sim_igen_smp="-N 0";;
@@ -241,7 +241,7 @@ fi])dnl
AC_ARG_ENABLE(sim-switch,
-[ --enable-sim-switch Use a switch instead of a table for instruction call.],
+[AS_HELP_STRING([--enable-sim-switch], [Use a switch instead of a table for instruction call.])],
[case "${enableval}" in
yes) sim_switch="-DWITH_SPREG_SWITCH_TABLE";;
no) sim_switch="";;
@@ -256,7 +256,7 @@ fi])dnl
AC_ARG_ENABLE(sim-timebase,
-[ --enable-sim-timebase Specify whether the PPC timebase is supported.],
+[AS_HELP_STRING([--enable-sim-timebase], [Specify whether the PPC timebase is supported.])],
[case "${enableval}" in
yes) sim_timebase="-DWITH_TIME_BASE=1";;
no) sim_timebase="-DWITH_TIME_BASE=0";;
@@ -268,7 +268,7 @@ fi],[sim_timebase=""])dnl
AC_ARG_ENABLE(sim-xor-endian,
-[ --enable-sim-xor-endian=n Specify number bytes involved in PowerPC XOR bi-endian mode (default 8).],
+[AS_HELP_STRING([--enable-sim-xor-endian=n], [Specify number bytes involved in PowerPC XOR bi-endian mode (default 8).])],
[case "${enableval}" in
yes) sim_xor_endian="-DWITH_XOR_ENDIAN=8";;
no) sim_xor_endian="-DWITH_XOR_ENDIAN=0";;
--
2.43.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH/submitted 3/5] sim: ppc: standardize configure option processing
2024-01-02 6:42 [PATCH/submitted 1/5] sim: ppc: drop now unused config.in Mike Frysinger
2024-01-02 6:42 ` [PATCH/submitted 2/5] sim: ppc: switch to AS_HELP_STRING for automatic formatting Mike Frysinger
@ 2024-01-02 6:42 ` Mike Frysinger
2024-01-02 6:42 ` [PATCH/submitted 4/5] sim: ppc: scope configure options to --enable-sim-ppc-xxx Mike Frysinger
2024-01-02 6:42 ` [PATCH/submitted 5/5] sim: ppc: merge configure logic into top-level Mike Frysinger
3 siblings, 0 replies; 5+ messages in thread
From: Mike Frysinger @ 2024-01-02 6:42 UTC (permalink / raw)
To: gdb-patches
Switch from ad-hoc $silent checks & echo calls to standard
AC_MSG_CHECKING & AC_MSG_RESULT calls. Also delete pointless
variable setting after calling AC_MSG_ERROR.
---
sim/ppc/configure | 198 ++++++++++++++++++----------------------
sim/ppc/configure.ac | 211 +++++++++++++++----------------------------
2 files changed, 161 insertions(+), 248 deletions(-)
diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac
index dce55d8ecb05..3019044588ac 100644
--- a/sim/ppc/configure.ac
+++ b/sim/ppc/configure.ac
@@ -2,75 +2,55 @@ dnl Process this file with autoconf to produce a configure script.
AC_INIT(Makefile.in)
AC_CONFIG_MACRO_DIRS([../.. ../../config])
-
+AC_MSG_CHECKING([for sim ppc bitsize settings])
AC_ARG_ENABLE(sim-bitsize,
[AS_HELP_STRING([--enable-sim-bitsize=n], [Specify target bitsize (32 or 64).])],
[case "${enableval}" in
32|64) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=$enableval";;
- *) AC_MSG_ERROR("--enable-sim-bitsize was given $enableval. Expected 32 or 64"); sim_bitsize="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_bitsize" != x""; then
- echo "Setting bitsize flags = $sim_bitsize" 6>&1
-fi],[sim_bitsize=""])dnl
-
+ *) AC_MSG_ERROR("--enable-sim-bitsize was given $enableval. Expected 32 or 64");;
+esac], [sim_bitsize=""])
+AC_MSG_RESULT($sim_bitsize)
+AC_MSG_CHECKING([for sim ppc decode mechanism])
AC_ARG_ENABLE(sim-decode-mechanism,
[AS_HELP_STRING([--enable-sim-decode-mechanism=which], [Specify the instruction decode mechanism.])],
[case "${enableval}" in
yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-decode-mechanism=file");;
array|switch|padded-switch|goto-switch) sim_decode_mechanism="-T ${enableval}";;
- *) AC_MSG_ERROR("File $enableval is not an opcode rules file");
- sim_decode_mechanism="switch";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_decode_mechanism" != x""; then
- echo "Setting decode mechanism flags = $sim_decode_mechanism" 6>&1
-fi],[sim_decode_mechanism=""
-if test x"$silent" != x"yes"; then
- echo "Setting decode mechanism flags = $sim_decode_mechanism"
-fi])dnl
-
+ *) AC_MSG_ERROR("File $enableval is not an opcode rules file");;
+esac], [sim_decode_mechanism=""])
+AC_MSG_RESULT($sim_decode_mechanism)
+AC_MSG_CHECKING([for sim ppc default model])
AC_ARG_ENABLE(sim-default-model,
[AS_HELP_STRING([--enable-sim-default-model=which], [Specify default PowerPC to model.])],
[case "${enableval}" in
yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-default-model=model");;
*) sim_default_model="-DWITH_DEFAULT_MODEL=${enableval}";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_default_model" != x""; then
- echo "Setting default-model flags = $sim_default_model" 6>&1
-fi],[sim_default_model=""])dnl
-
+esac], [sim_default_model=""])
+AC_MSG_RESULT($sim_default_model)
+AC_MSG_CHECKING([for sim ppc duplicate settings])
AC_ARG_ENABLE(sim-duplicate,
[AS_HELP_STRING([--enable-sim-duplicate], [Expand (duplicate) semantic functions.])],
[case "${enableval}" in
yes) sim_dup="-E";;
no) sim_dup="";;
- *) AC_MSG_ERROR("--enable-sim-duplicate does not take a value"); sim_dup="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_dup" != x""; then
- echo "Setting duplicate flags = $sim_dup" 6>&1
-fi],[sim_dup="-E"
-if test x"$silent" != x"yes"; then
- echo "Setting duplicate flags = $sim_dup" 6>&1
-fi])dnl
-
+ *) AC_MSG_ERROR("--enable-sim-duplicate does not take a value");;
+esac], [sim_dup="-E"])
+AC_MSG_RESULT($sim_dup)
+AC_MSG_CHECKING([for sim ppc filter rules])
AC_ARG_ENABLE(sim-filter,
[AS_HELP_STRING([--enable-sim-filter=rule], [Specify filter rules.])],
[case "${enableval}" in
- yes) AC_MSG_ERROR("--enable-sim-filter must be specified with a rule to filter or no"); sim_filter="";;
+ yes) AC_MSG_ERROR("--enable-sim-filter must be specified with a rule to filter or no");;
no) sim_filter="";;
*) sim_filter="-F $enableval";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_filter" != x""; then
- echo "Setting filter flags = $sim_filter" 6>&1
-fi],[sim_filter="-F 32,f,o"
-if test x"$silent" != x"yes"; then
- echo "Setting filter flags = $sim_filter" 6>&1
-fi])dnl
-
+esac], [sim_filter="-F 32,f,o"])
+AC_MSG_RESULT($sim_filter)
+AC_MSG_CHECKING([for sim ppc float settings])
AC_ARG_ENABLE(sim-float,
[AS_HELP_STRING([--enable-sim-float], [Specify whether the target has hard, soft, altivec or e500 floating point.])],
[case "${enableval}" in
@@ -78,41 +58,31 @@ AC_ARG_ENABLE(sim-float,
no | soft) sim_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";;
altivec) sim_float="-DWITH_ALTIVEC" ; sim_filter="${sim_filter},av" ;;
*spe*|*simd*) sim_float="-DWITH_E500" ; sim_filter="${sim_filter},e500" ;;
- *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-float"); sim_float="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_float" != x""; then
- echo "Setting float flags = $sim_float" 6>&1
-fi],[
-case "${target}" in
+ *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-float");;
+esac],
+[case "${target}" in
*altivec*) sim_float="-DWITH_ALTIVEC" ; sim_filter="${sim_filter},av" ;;
*spe*|*simd*) sim_float="-DWITH_E500" ; sim_filter="${sim_filter},e500" ;;
*) sim_float=""
-esac
-])dnl
-
+esac])
+AC_MSG_RESULT($sim_float)
+AC_MSG_CHECKING([for sim ppc hardware settings])
+hardware="cpu,memory,nvram,iobus,htab,disk,trace,register,vm,init,core,pal,com,eeprom,opic,glue,phb,ide,sem,shm"
AC_ARG_ENABLE(sim-hardware,
[AS_HELP_STRING([--enable-sim-hardware=list], [Specify the hardware to be included in the build.])],
-[hardware="cpu,memory,nvram,iobus,htab,disk,trace,register,vm,init,core,pal,com,eeprom,opic,glue,phb,ide,sem,shm"
-case "${enableval}" in
+[case "${enableval}" in
yes) ;;
- no) AC_MSG_ERROR("List of hardware must be specified for --enable-sim-hardware"); hardware="";;
+ no) AC_MSG_ERROR("List of hardware must be specified for --enable-sim-hardware");;
,*) hardware="${hardware}${enableval}";;
*,) hardware="${enableval}${hardware}";;
*) hardware="${enableval}"'';;
-esac
+esac])
sim_hw_src=`echo $hardware | sed -e 's/,/.c hw_/g' -e 's/^/hw_/' -e s'/$/.c/'`
sim_hw_obj=`echo $sim_hw_src | sed -e 's/\.c/.o/g'`
-if test x"$silent" != x"yes" && test x"$hardware" != x""; then
- echo "Setting hardware to $sim_hw_src, $sim_hw_obj"
-fi],[hardware="cpu,memory,nvram,iobus,htab,disk,trace,register,vm,init,core,pal,com,eeprom,opic,glue,phb,ide,sem,shm"
-sim_hw_src=`echo $hardware | sed -e 's/,/.c hw_/g' -e 's/^/hw_/' -e s'/$/.c/'`
-sim_hw_obj=`echo $sim_hw_src | sed -e 's/\.c/.o/g'`
-if test x"$silent" != x"yes"; then
- echo "Setting hardware to $sim_hw_src, $sim_hw_obj"
-fi])dnl
-
+AC_MSG_RESULT($hardware)
+AC_MSG_CHECKING([for sim ppc icache settings])
AC_ARG_ENABLE(sim-icache,
[AS_HELP_STRING([--enable-sim-icache=size], [Specify instruction-decode cache size and type.])],
[icache="-R"
@@ -127,69 +97,53 @@ AC_ARG_ENABLE(sim-icache,
semantic) sim_icache="${sim_icache}C";;
insn) sim_icache="${sim_icache}S";;
0*|1*|2*|3*|4*|5*|6*|7*|8*|9*) icache=$x;;
- *) AC_MSG_ERROR("Unknown value $x for --enable-sim-icache"); sim_icache="";;
+ *) AC_MSG_ERROR("Unknown value $x for --enable-sim-icache");;
esac
done
sim_icache="${sim_icache}I $icache";;
-esac
-if test x"$silent" != x"yes" && test x"$icache" != x""; then
- echo "Setting instruction cache size to $icache ($sim_icache)"
-fi],[sim_icache="-CSRI 1024"
-if test x"$silent" != x"yes"; then
- echo "Setting instruction cache size to 1024 ($sim_icache)"
-fi])dnl
-
+esac], [sim_icache="-CSRI 1024"])
+AC_MSG_RESULT($sim_icache)
+AC_MSG_CHECKING([for sim ppc jump settings])
AC_ARG_ENABLE(sim-jump,
[AS_HELP_STRING([--enable-sim-jump], [Jump between semantic code (instead of call/return).])],
[case "${enableval}" in
yes) sim_jump="-J";;
no) sim_jump="";;
- *) AC_MSG_ERROR("--enable-sim-jump does not take a value"); sim_jump="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_jump" != x""; then
- echo "Setting jump flag = $sim_jump" 6>&1
-fi],[sim_jump=""
-if test x"$silent" != x"yes"; then
- echo "Setting jump flag = $sim_jump" 6>&1
-fi])dnl
-
+ *) AC_MSG_ERROR("--enable-sim-jump does not take a value");;
+esac], [sim_jump=""])
+AC_MSG_RESULT($sim_jump)
+AC_MSG_CHECKING([for sim ppc source debug line numbers])
AC_ARG_ENABLE(sim-line-nr,
[AS_HELP_STRING([--enable-sim-line-nr=opts], [Generate extra CPP code that references source rather than generated code])],
[case "${enableval}" in
yes) sim_line_nr="";;
no) sim_line_nr="-L";;
- *) AC_MSG_ERROR("--enable-sim-line-nr does not take a value"); sim_line_nr="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_line_nr" != x""; then
- echo "Setting warning flags = $sim_line_nr" 6>&1
-fi],[sim_line_nr=""])dnl
-
+ *) AC_MSG_ERROR("--enable-sim-line-nr does not take a value");;
+esac], [sim_line_nr=""])
+AC_MSG_RESULT($sim_line_nr)
+AC_MSG_CHECKING([for sim ppc model])
AC_ARG_ENABLE(sim-model,
[AS_HELP_STRING([--enable-sim-model=which], [Specify PowerPC to model.])],
[case "${enableval}" in
yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-model=model");;
*) sim_model="-DWITH_MODEL=${enableval}";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_model" != x""; then
- echo "Setting model flags = $sim_model" 6>&1
-fi],[sim_model=""])dnl
-
+esac], [sim_model=""])
+AC_MSG_RESULT($sim_model)
+AC_MSG_CHECKING([for sim ppc model issue])
AC_ARG_ENABLE(sim-model-issue,
[AS_HELP_STRING([--enable-sim-model-issue], [Specify whether to simulate model specific actions])],
[case "${enableval}" in
yes) sim_model_issue="-DWITH_MODEL_ISSUE=MODEL_ISSUE_PROCESS";;
no) sim_model_issue="-DWITH_MODEL_ISSUE=MODEL_ISSUE_IGNORE";;
- *) AC_MSG_ERROR("--enable-sim-model-issue does not take a value"); sim_model_issue="";;
-esac
-if test x"$silent" != x"yes"; then
- echo "Setting model-issue flags = $sim_model_issue" 6>&1
-fi],[sim_model_issue=""])dnl
-
+ *) AC_MSG_ERROR("--enable-sim-model-issue does not take a value");;
+esac], [sim_model_issue=""])
+AC_MSG_RESULT($sim_model_issue)
+AC_MSG_CHECKING([for sim ppc event monitoring])
AC_ARG_ENABLE(sim-monitor,
[AS_HELP_STRING([--enable-sim-monitor=mon], [Specify whether to enable monitoring events.])],
[case "${enableval}" in
@@ -198,12 +152,10 @@ AC_ARG_ENABLE(sim-monitor,
instruction) sim_monitor="-DWITH_MON=MONITOR_INSTRUCTION_ISSUE";;
memory) sim_monitor="-DWITH_MON=MONITOR_LOAD_STORE_UNIT";;
*) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-mon");;
-esac
-if test x"$silent" != x"yes" && test x"$sim_monitor" != x""; then
- echo "Setting monitor flags = $sim_monitor" 6>&1
-fi],[sim_monitor=""])dnl
-
+esac], [sim_monitor=""])
+AC_MSG_RESULT($sim_monitor)
+AC_MSG_CHECKING([for sim ppc opcode lookup settings])
AC_ARG_ENABLE(sim-opcode,
[AS_HELP_STRING([--enable-sim-opcode=which], [Override default opcode lookup.])],
[case "${enableval}" in
@@ -213,71 +165,50 @@ AC_ARG_ENABLE(sim-opcode,
elif test -f "${srcdir}/dc-${enableval}"; then
sim_opcode="dc-${enableval}"
else
- AC_MSG_ERROR("File $enableval is not an opcode rules file");
- sim_opcode="dc-complex"
+ AC_MSG_ERROR("File $enableval is not an opcode rules file")
fi;;
-esac
-if test x"$silent" != x"yes" && test x"$sim_opcode" != x""; then
- echo "Setting opcode flags = $sim_opcode" 6>&1
-fi],[sim_opcode="dc-complex"
-if test x"$silent" != x"yes"; then
- echo "Setting opcode flags = $sim_opcode"
-fi])dnl
-
+esac], [sim_opcode="dc-complex"])
+AC_MSG_RESULT($sim_opcode)
+AC_MSG_CHECKING([for sim ppc smp settings])
AC_ARG_ENABLE(sim-smp,
[AS_HELP_STRING([--enable-sim-smp=n], [Specify number of processors to configure for.])],
[case "${enableval}" in
yes) sim_smp="-DWITH_SMP=5" ; sim_igen_smp="-N 5";;
no) sim_smp="-DWITH_SMP=0" ; sim_igen_smp="-N 0";;
*) sim_smp="-DWITH_SMP=$enableval" ; sim_igen_smp="-N $enableval";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_smp" != x""; then
- echo "Setting smp flags = $sim_smp" 6>&1
-fi],[sim_smp="-DWITH_SMP=5" ; sim_igen_smp="-N 5"
-if test x"$silent" != x"yes"; then
- echo "Setting smp flags = $sim_smp" 6>&1
-fi])dnl
-
+esac], [sim_smp="-DWITH_SMP=5" ; sim_igen_smp="-N 5"])
+AC_MSG_RESULT($sim_smp)
+AC_MSG_CHECKING([for sim ppc switch table settings])
AC_ARG_ENABLE(sim-switch,
[AS_HELP_STRING([--enable-sim-switch], [Use a switch instead of a table for instruction call.])],
[case "${enableval}" in
yes) sim_switch="-DWITH_SPREG_SWITCH_TABLE";;
no) sim_switch="";;
- *) AC_MSG_ERROR("--enable-sim-switch does not take a value"); sim_switch="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_switch" != x""; then
- echo "Setting switch flags = $sim_switch" 6>&1
-fi],[sim_switch="";
-if test x"$silent" != x"yes"; then
- echo "Setting switch flags = $sim_switch" 6>&1
-fi])dnl
-
+ *) AC_MSG_ERROR("--enable-sim-switch does not take a value");;
+esac], [sim_switch=""])
+AC_MSG_RESULT($sim_switch)
+AC_MSG_CHECKING([for sim ppc timebase])
AC_ARG_ENABLE(sim-timebase,
[AS_HELP_STRING([--enable-sim-timebase], [Specify whether the PPC timebase is supported.])],
[case "${enableval}" in
yes) sim_timebase="-DWITH_TIME_BASE=1";;
no) sim_timebase="-DWITH_TIME_BASE=0";;
- *) AC_MSG_ERROR("--enable-sim-timebase does not take a value"); sim_timebase="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_timebase" != x""; then
- echo "Setting timebase flags = $sim_timebase" 6>&1
-fi],[sim_timebase=""])dnl
-
+ *) AC_MSG_ERROR("--enable-sim-timebase does not take a value");;
+esac], [sim_timebase=""])
+AC_MSG_RESULT($sim_timebase)
+AC_MSG_CHECKING([for sim ppc xor endian settings])
AC_ARG_ENABLE(sim-xor-endian,
[AS_HELP_STRING([--enable-sim-xor-endian=n], [Specify number bytes involved in PowerPC XOR bi-endian mode (default 8).])],
[case "${enableval}" in
yes) sim_xor_endian="-DWITH_XOR_ENDIAN=8";;
no) sim_xor_endian="-DWITH_XOR_ENDIAN=0";;
*) sim_xor_endian="-DWITH_XOR_ENDIAN=$enableval";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_xor_endian" != x""; then
- echo "Setting xor-endian flag = $sim_xor_endian" 6>&1
-fi],[sim_xor_endian=""])dnl
-
+esac], [sim_xor_endian=""])
+AC_MSG_RESULT($sim_xor_endian)
AC_SUBST(sim_line_nr)
AC_SUBST(sim_opcode)
--
2.43.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH/submitted 4/5] sim: ppc: scope configure options to --enable-sim-ppc-xxx
2024-01-02 6:42 [PATCH/submitted 1/5] sim: ppc: drop now unused config.in Mike Frysinger
2024-01-02 6:42 ` [PATCH/submitted 2/5] sim: ppc: switch to AS_HELP_STRING for automatic formatting Mike Frysinger
2024-01-02 6:42 ` [PATCH/submitted 3/5] sim: ppc: standardize configure option processing Mike Frysinger
@ 2024-01-02 6:42 ` Mike Frysinger
2024-01-02 6:42 ` [PATCH/submitted 5/5] sim: ppc: merge configure logic into top-level Mike Frysinger
3 siblings, 0 replies; 5+ messages in thread
From: Mike Frysinger @ 2024-01-02 6:42 UTC (permalink / raw)
To: gdb-patches
To prepare for moving these into the top-level configure, namespace
then with the port name like we do with all other ports.
---
sim/ppc/Makefile.in | 38 ++--
sim/ppc/configure | 447 ++++++++++++++++++++++---------------------
sim/ppc/configure.ac | 308 ++++++++++++++---------------
3 files changed, 398 insertions(+), 395 deletions(-)
diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in
index 2f638b093939..267b6a8bc99a 100644
--- a/sim/ppc/Makefile.in
+++ b/sim/ppc/Makefile.in
@@ -61,14 +61,14 @@ BISON = bison
MAKEINFO = makeinfo
INLINE_CFLAGS = $(SIM_INLINE)
-SMP_CFLAGS = @sim_smp@
-XOR_ENDIAN_CFLAGS = @sim_xor_endian@
-BITSIZE_CFLAGS = @sim_bitsize@
-TIMEBASE_CFLAGS = @sim_timebase@
-FLOAT_CFLAGS = @sim_float@
-MONITOR_CFLAGS = @sim_monitor@
-MODEL_CFLAGS = @sim_model@ @sim_default_model@ @sim_model_issue@
-SWITCH_CFLAGS = @sim_switch@
+SMP_CFLAGS = @sim_ppc_smp@
+XOR_ENDIAN_CFLAGS = @sim_ppc_xor_endian@
+BITSIZE_CFLAGS = @sim_ppc_bitsize@
+TIMEBASE_CFLAGS = @sim_ppc_timebase@
+FLOAT_CFLAGS = @sim_ppc_float@
+MONITOR_CFLAGS = @sim_ppc_monitor@
+MODEL_CFLAGS = @sim_ppc_model@ @sim_ppc_default_model@ @sim_ppc_model_issue@
+SWITCH_CFLAGS = @sim_ppc_switch@
CONFIG_CFLAGS = \
-DHAVE_CONFIG_H \
$(SMP_CFLAGS) \
@@ -86,14 +86,14 @@ NOWARN_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(INCLUDES) $(SIM_FP
LIBS = $(COMMON_LIBS) @LIBS@ $(LIBGNU) $(LIBGNU_EXTRA_LIBS)
-IGEN_OPCODE_RULES = @sim_opcode@
-IGEN_DECODE_MECHANISM = @sim_decode_mechanism@
-IGEN_DUPLICATE = @sim_dup@
-IGEN_JUMP = @sim_jump@
-IGEN_FILTER = @sim_filter@
-IGEN_ICACHE = @sim_icache@
-IGEN_SMP = @sim_igen_smp@
-IGEN_LINE_NR = @sim_line_nr@
+IGEN_OPCODE_RULES = @sim_ppc_opcode@
+IGEN_DECODE_MECHANISM = @sim_ppc_decode_mechanism@
+IGEN_DUPLICATE = @sim_ppc_dup@
+IGEN_JUMP = @sim_ppc_jump@
+IGEN_FILTER = @sim_ppc_filter@
+IGEN_ICACHE = @sim_ppc_icache@
+IGEN_SMP = @sim_ppc_igen_smp@
+IGEN_LINE_NR = @sim_ppc_line_nr@
IGEN_FLAGS = \
$(IGEN_DECODE_MECHANISM) \
@@ -482,8 +482,8 @@ LIB_OBJ = \
GDB_OBJ = gdb-sim.o sim_calls.o
-HW_SRC = @sim_hw_src@
-HW_OBJ = @sim_hw_obj@
+HW_SRC = @sim_ppc_hw_src@
+HW_OBJ = @sim_ppc_hw_obj@
PACKAGE_SRC = pk_disklabel.c
PACKAGE_OBJ = $(PACKAGE_SRC:.c=.o)
@@ -560,7 +560,7 @@ sim-fpu.o: $(srcdir)/../common/sim-fpu.c
# Rebuild options whenever something changes so the date/time is up to date.
options.o: options.c $(CPU_H) $(OPTIONS_H) $(DEFINES_H) $(BASICS_H) $(IDECODE_H) $(INLINE) $(LIB_SRC) $(BUILT_SRC) config.status Makefile
- $(ECHO_CC) $(CC) -c $(STD_CFLAGS) '-DOPCODE_RULES="@sim_opcode@"' '-DIGEN_FLAGS="$(IGEN_FLAGS)"' $(srcdir)/options.c
+ $(ECHO_CC) $(CC) -c $(STD_CFLAGS) '-DOPCODE_RULES="@sim_ppc_opcode@"' '-DIGEN_FLAGS="$(IGEN_FLAGS)"' $(srcdir)/options.c
#
# Rules to create the built c source code files
diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac
index 3019044588ac..03b86126829a 100644
--- a/sim/ppc/configure.ac
+++ b/sim/ppc/configure.ac
@@ -3,232 +3,232 @@ AC_INIT(Makefile.in)
AC_CONFIG_MACRO_DIRS([../.. ../../config])
AC_MSG_CHECKING([for sim ppc bitsize settings])
-AC_ARG_ENABLE(sim-bitsize,
-[AS_HELP_STRING([--enable-sim-bitsize=n], [Specify target bitsize (32 or 64).])],
+AC_ARG_ENABLE(sim-ppc-bitsize,
+[AS_HELP_STRING([--enable-sim-ppc-bitsize=n], [Specify target bitsize (32 or 64).])],
[case "${enableval}" in
- 32|64) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=$enableval";;
- *) AC_MSG_ERROR("--enable-sim-bitsize was given $enableval. Expected 32 or 64");;
-esac], [sim_bitsize=""])
-AC_MSG_RESULT($sim_bitsize)
+ 32|64) sim_ppc_bitsize="-DWITH_TARGET_WORD_BITSIZE=$enableval";;
+ *) AC_MSG_ERROR("--enable-sim-ppc-bitsize was given $enableval. Expected 32 or 64");;
+esac], [sim_ppc_bitsize=""])
+AC_MSG_RESULT($sim_ppc_bitsize)
AC_MSG_CHECKING([for sim ppc decode mechanism])
-AC_ARG_ENABLE(sim-decode-mechanism,
-[AS_HELP_STRING([--enable-sim-decode-mechanism=which], [Specify the instruction decode mechanism.])],
+AC_ARG_ENABLE(sim-ppc-decode-mechanism,
+[AS_HELP_STRING([--enable-sim-ppc-decode-mechanism=which], [Specify the instruction decode mechanism.])],
[case "${enableval}" in
- yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-decode-mechanism=file");;
- array|switch|padded-switch|goto-switch) sim_decode_mechanism="-T ${enableval}";;
+ yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-ppc-decode-mechanism=file");;
+ array|switch|padded-switch|goto-switch) sim_ppc_decode_mechanism="-T ${enableval}";;
*) AC_MSG_ERROR("File $enableval is not an opcode rules file");;
-esac], [sim_decode_mechanism=""])
-AC_MSG_RESULT($sim_decode_mechanism)
+esac], [sim_ppc_decode_mechanism=""])
+AC_MSG_RESULT($sim_ppc_decode_mechanism)
AC_MSG_CHECKING([for sim ppc default model])
-AC_ARG_ENABLE(sim-default-model,
-[AS_HELP_STRING([--enable-sim-default-model=which], [Specify default PowerPC to model.])],
+AC_ARG_ENABLE(sim-ppc-default-model,
+[AS_HELP_STRING([--enable-sim-ppc-default-model=which], [Specify default PowerPC to model.])],
[case "${enableval}" in
- yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-default-model=model");;
- *) sim_default_model="-DWITH_DEFAULT_MODEL=${enableval}";;
-esac], [sim_default_model=""])
-AC_MSG_RESULT($sim_default_model)
+ yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-ppc-default-model=model");;
+ *) sim_ppc_default_model="-DWITH_DEFAULT_MODEL=${enableval}";;
+esac], [sim_ppc_default_model=""])
+AC_MSG_RESULT($sim_ppc_default_model)
AC_MSG_CHECKING([for sim ppc duplicate settings])
-AC_ARG_ENABLE(sim-duplicate,
-[AS_HELP_STRING([--enable-sim-duplicate], [Expand (duplicate) semantic functions.])],
+AC_ARG_ENABLE(sim-ppc-duplicate,
+[AS_HELP_STRING([--enable-sim-ppc-duplicate], [Expand (duplicate) semantic functions.])],
[case "${enableval}" in
- yes) sim_dup="-E";;
- no) sim_dup="";;
- *) AC_MSG_ERROR("--enable-sim-duplicate does not take a value");;
-esac], [sim_dup="-E"])
-AC_MSG_RESULT($sim_dup)
+ yes) sim_ppc_dup="-E";;
+ no) sim_ppc_dup="";;
+ *) AC_MSG_ERROR("--enable-sim-ppc-duplicate does not take a value");;
+esac], [sim_ppc_dup="-E"])
+AC_MSG_RESULT($sim_ppc_dup)
AC_MSG_CHECKING([for sim ppc filter rules])
-AC_ARG_ENABLE(sim-filter,
-[AS_HELP_STRING([--enable-sim-filter=rule], [Specify filter rules.])],
+AC_ARG_ENABLE(sim-ppc-filter,
+[AS_HELP_STRING([--enable-sim-ppc-filter=rule], [Specify filter rules.])],
[case "${enableval}" in
- yes) AC_MSG_ERROR("--enable-sim-filter must be specified with a rule to filter or no");;
- no) sim_filter="";;
- *) sim_filter="-F $enableval";;
-esac], [sim_filter="-F 32,f,o"])
-AC_MSG_RESULT($sim_filter)
+ yes) AC_MSG_ERROR("--enable-sim-ppc-filter must be specified with a rule to filter or no");;
+ no) sim_ppc_filter="";;
+ *) sim_ppc_filter="-F $enableval";;
+esac], [sim_ppc_filter="-F 32,f,o"])
+AC_MSG_RESULT($sim_ppc_filter)
AC_MSG_CHECKING([for sim ppc float settings])
-AC_ARG_ENABLE(sim-float,
-[AS_HELP_STRING([--enable-sim-float], [Specify whether the target has hard, soft, altivec or e500 floating point.])],
-[case "${enableval}" in
- yes | hard) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT";;
- no | soft) sim_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";;
- altivec) sim_float="-DWITH_ALTIVEC" ; sim_filter="${sim_filter},av" ;;
- *spe*|*simd*) sim_float="-DWITH_E500" ; sim_filter="${sim_filter},e500" ;;
- *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-float");;
+AC_ARG_ENABLE(sim-ppc-float,
+[AS_HELP_STRING([--enable-sim-ppc-float], [Specify whether the target has hard, soft, altivec or e500 floating point.])],
+[case "${enableval}" in
+ yes | hard) sim_ppc_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT";;
+ no | soft) sim_ppc_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";;
+ altivec) sim_ppc_float="-DWITH_ALTIVEC" ; sim_ppc_filter="${sim_ppc_filter},av" ;;
+ *spe*|*simd*) sim_ppc_float="-DWITH_E500" ; sim_ppc_filter="${sim_ppc_filter},e500" ;;
+ *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-ppc-float");;
esac],
[case "${target}" in
- *altivec*) sim_float="-DWITH_ALTIVEC" ; sim_filter="${sim_filter},av" ;;
- *spe*|*simd*) sim_float="-DWITH_E500" ; sim_filter="${sim_filter},e500" ;;
- *) sim_float=""
+ *altivec*) sim_ppc_float="-DWITH_ALTIVEC" ; sim_ppc_filter="${sim_ppc_filter},av" ;;
+ *spe*|*simd*) sim_ppc_float="-DWITH_E500" ; sim_ppc_filter="${sim_ppc_filter},e500" ;;
+ *) sim_ppc_float=""
esac])
-AC_MSG_RESULT($sim_float)
+AC_MSG_RESULT($sim_ppc_float)
AC_MSG_CHECKING([for sim ppc hardware settings])
hardware="cpu,memory,nvram,iobus,htab,disk,trace,register,vm,init,core,pal,com,eeprom,opic,glue,phb,ide,sem,shm"
-AC_ARG_ENABLE(sim-hardware,
-[AS_HELP_STRING([--enable-sim-hardware=list], [Specify the hardware to be included in the build.])],
+AC_ARG_ENABLE(sim-ppc-hardware,
+[AS_HELP_STRING([--enable-sim-ppc-hardware=list], [Specify the hardware to be included in the build.])],
[case "${enableval}" in
yes) ;;
- no) AC_MSG_ERROR("List of hardware must be specified for --enable-sim-hardware");;
+ no) AC_MSG_ERROR("List of hardware must be specified for --enable-sim-ppc-hardware");;
,*) hardware="${hardware}${enableval}";;
*,) hardware="${enableval}${hardware}";;
*) hardware="${enableval}"'';;
esac])
-sim_hw_src=`echo $hardware | sed -e 's/,/.c hw_/g' -e 's/^/hw_/' -e s'/$/.c/'`
-sim_hw_obj=`echo $sim_hw_src | sed -e 's/\.c/.o/g'`
+sim_ppc_hw_src=`echo $hardware | sed -e 's/,/.c hw_/g' -e 's/^/hw_/' -e s'/$/.c/'`
+sim_ppc_hw_obj=`echo $sim_ppc_hw_src | sed -e 's/\.c/.o/g'`
AC_MSG_RESULT($hardware)
AC_MSG_CHECKING([for sim ppc icache settings])
-AC_ARG_ENABLE(sim-icache,
-[AS_HELP_STRING([--enable-sim-icache=size], [Specify instruction-decode cache size and type.])],
+AC_ARG_ENABLE(sim-ppc-icache,
+[AS_HELP_STRING([--enable-sim-ppc-icache=size], [Specify instruction-decode cache size and type.])],
[icache="-R"
case "${enableval}" in
- yes) icache="1024"; sim_icache="-I $icache";;
- no) sim_icache="-R";;
+ yes) icache="1024"; sim_ppc_icache="-I $icache";;
+ no) sim_ppc_icache="-R";;
*) icache=1024
- sim_icache="-"
+ sim_ppc_icache="-"
for x in `echo "${enableval}" | sed -e "s/,/ /g"`; do
case "$x" in
- define) sim_icache="${sim_icache}R";;
- semantic) sim_icache="${sim_icache}C";;
- insn) sim_icache="${sim_icache}S";;
+ define) sim_ppc_icache="${sim_ppc_icache}R";;
+ semantic) sim_ppc_icache="${sim_ppc_icache}C";;
+ insn) sim_ppc_icache="${sim_ppc_icache}S";;
0*|1*|2*|3*|4*|5*|6*|7*|8*|9*) icache=$x;;
- *) AC_MSG_ERROR("Unknown value $x for --enable-sim-icache");;
+ *) AC_MSG_ERROR("Unknown value $x for --enable-sim-ppc-icache");;
esac
done
- sim_icache="${sim_icache}I $icache";;
-esac], [sim_icache="-CSRI 1024"])
-AC_MSG_RESULT($sim_icache)
+ sim_ppc_icache="${sim_ppc_icache}I $icache";;
+esac], [sim_ppc_icache="-CSRI 1024"])
+AC_MSG_RESULT($sim_ppc_icache)
AC_MSG_CHECKING([for sim ppc jump settings])
-AC_ARG_ENABLE(sim-jump,
-[AS_HELP_STRING([--enable-sim-jump], [Jump between semantic code (instead of call/return).])],
+AC_ARG_ENABLE(sim-ppc-jump,
+[AS_HELP_STRING([--enable-sim-ppc-jump], [Jump between semantic code (instead of call/return).])],
[case "${enableval}" in
- yes) sim_jump="-J";;
- no) sim_jump="";;
- *) AC_MSG_ERROR("--enable-sim-jump does not take a value");;
-esac], [sim_jump=""])
-AC_MSG_RESULT($sim_jump)
+ yes) sim_ppc_jump="-J";;
+ no) sim_ppc_jump="";;
+ *) AC_MSG_ERROR("--enable-sim-ppc-jump does not take a value");;
+esac], [sim_ppc_jump=""])
+AC_MSG_RESULT($sim_ppc_jump)
AC_MSG_CHECKING([for sim ppc source debug line numbers])
-AC_ARG_ENABLE(sim-line-nr,
-[AS_HELP_STRING([--enable-sim-line-nr=opts], [Generate extra CPP code that references source rather than generated code])],
+AC_ARG_ENABLE(sim-ppc-line-nr,
+[AS_HELP_STRING([--enable-sim-ppc-line-nr=opts], [Generate extra CPP code that references source rather than generated code])],
[case "${enableval}" in
- yes) sim_line_nr="";;
- no) sim_line_nr="-L";;
- *) AC_MSG_ERROR("--enable-sim-line-nr does not take a value");;
-esac], [sim_line_nr=""])
-AC_MSG_RESULT($sim_line_nr)
+ yes) sim_ppc_line_nr="";;
+ no) sim_ppc_line_nr="-L";;
+ *) AC_MSG_ERROR("--enable-sim-ppc-line-nr does not take a value");;
+esac], [sim_ppc_line_nr=""])
+AC_MSG_RESULT($sim_ppc_line_nr)
AC_MSG_CHECKING([for sim ppc model])
-AC_ARG_ENABLE(sim-model,
-[AS_HELP_STRING([--enable-sim-model=which], [Specify PowerPC to model.])],
+AC_ARG_ENABLE(sim-ppc-model,
+[AS_HELP_STRING([--enable-sim-ppc-model=which], [Specify PowerPC to model.])],
[case "${enableval}" in
- yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-model=model");;
- *) sim_model="-DWITH_MODEL=${enableval}";;
-esac], [sim_model=""])
-AC_MSG_RESULT($sim_model)
+ yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-ppc-model=model");;
+ *) sim_ppc_model="-DWITH_MODEL=${enableval}";;
+esac], [sim_ppc_model=""])
+AC_MSG_RESULT($sim_ppc_model)
AC_MSG_CHECKING([for sim ppc model issue])
-AC_ARG_ENABLE(sim-model-issue,
-[AS_HELP_STRING([--enable-sim-model-issue], [Specify whether to simulate model specific actions])],
+AC_ARG_ENABLE(sim-ppc-model-issue,
+[AS_HELP_STRING([--enable-sim-ppc-model-issue], [Specify whether to simulate model specific actions])],
[case "${enableval}" in
- yes) sim_model_issue="-DWITH_MODEL_ISSUE=MODEL_ISSUE_PROCESS";;
- no) sim_model_issue="-DWITH_MODEL_ISSUE=MODEL_ISSUE_IGNORE";;
- *) AC_MSG_ERROR("--enable-sim-model-issue does not take a value");;
-esac], [sim_model_issue=""])
-AC_MSG_RESULT($sim_model_issue)
+ yes) sim_ppc_model_issue="-DWITH_MODEL_ISSUE=MODEL_ISSUE_PROCESS";;
+ no) sim_ppc_model_issue="-DWITH_MODEL_ISSUE=MODEL_ISSUE_IGNORE";;
+ *) AC_MSG_ERROR("--enable-sim-ppc-model-issue does not take a value");;
+esac], [sim_ppc_model_issue=""])
+AC_MSG_RESULT($sim_ppc_model_issue)
AC_MSG_CHECKING([for sim ppc event monitoring])
-AC_ARG_ENABLE(sim-monitor,
-[AS_HELP_STRING([--enable-sim-monitor=mon], [Specify whether to enable monitoring events.])],
+AC_ARG_ENABLE(sim-ppc-monitor,
+[AS_HELP_STRING([--enable-sim-ppc-monitor=mon], [Specify whether to enable monitoring events.])],
[case "${enableval}" in
- yes) sim_monitor="-DWITH_MON='MONITOR_INSTRUCTION_ISSUE | MONITOR_LOAD_STORE_UNIT'";;
- no) sim_monitor="-DWITH_MON=0";;
- instruction) sim_monitor="-DWITH_MON=MONITOR_INSTRUCTION_ISSUE";;
- memory) sim_monitor="-DWITH_MON=MONITOR_LOAD_STORE_UNIT";;
- *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-mon");;
-esac], [sim_monitor=""])
-AC_MSG_RESULT($sim_monitor)
+ yes) sim_ppc_monitor="-DWITH_MON='MONITOR_INSTRUCTION_ISSUE | MONITOR_LOAD_STORE_UNIT'";;
+ no) sim_ppc_monitor="-DWITH_MON=0";;
+ instruction) sim_ppc_monitor="-DWITH_MON=MONITOR_INSTRUCTION_ISSUE";;
+ memory) sim_ppc_monitor="-DWITH_MON=MONITOR_LOAD_STORE_UNIT";;
+ *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-ppc-mon");;
+esac], [sim_ppc_monitor=""])
+AC_MSG_RESULT($sim_ppc_monitor)
AC_MSG_CHECKING([for sim ppc opcode lookup settings])
-AC_ARG_ENABLE(sim-opcode,
-[AS_HELP_STRING([--enable-sim-opcode=which], [Override default opcode lookup.])],
+AC_ARG_ENABLE(sim-ppc-opcode,
+[AS_HELP_STRING([--enable-sim-ppc-opcode=which], [Override default opcode lookup.])],
[case "${enableval}" in
- yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-opcode=file");;
+ yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-ppc-opcode=file");;
*) if test -f "${srcdir}/${enableval}"; then
- sim_opcode="${enableval}"
+ sim_ppc_opcode="${enableval}"
elif test -f "${srcdir}/dc-${enableval}"; then
- sim_opcode="dc-${enableval}"
+ sim_ppc_opcode="dc-${enableval}"
else
AC_MSG_ERROR("File $enableval is not an opcode rules file")
fi;;
-esac], [sim_opcode="dc-complex"])
-AC_MSG_RESULT($sim_opcode)
+esac], [sim_ppc_opcode="dc-complex"])
+AC_MSG_RESULT($sim_ppc_opcode)
AC_MSG_CHECKING([for sim ppc smp settings])
-AC_ARG_ENABLE(sim-smp,
-[AS_HELP_STRING([--enable-sim-smp=n], [Specify number of processors to configure for.])],
+AC_ARG_ENABLE(sim-ppc-smp,
+[AS_HELP_STRING([--enable-sim-ppc-smp=n], [Specify number of processors to configure for.])],
[case "${enableval}" in
- yes) sim_smp="-DWITH_SMP=5" ; sim_igen_smp="-N 5";;
- no) sim_smp="-DWITH_SMP=0" ; sim_igen_smp="-N 0";;
- *) sim_smp="-DWITH_SMP=$enableval" ; sim_igen_smp="-N $enableval";;
-esac], [sim_smp="-DWITH_SMP=5" ; sim_igen_smp="-N 5"])
-AC_MSG_RESULT($sim_smp)
+ yes) sim_ppc_smp="-DWITH_SMP=5" ; sim_ppc_igen_smp="-N 5";;
+ no) sim_ppc_smp="-DWITH_SMP=0" ; sim_ppc_igen_smp="-N 0";;
+ *) sim_ppc_smp="-DWITH_SMP=$enableval" ; sim_ppc_igen_smp="-N $enableval";;
+esac], [sim_ppc_smp="-DWITH_SMP=5" ; sim_ppc_igen_smp="-N 5"])
+AC_MSG_RESULT($sim_ppc_smp)
AC_MSG_CHECKING([for sim ppc switch table settings])
-AC_ARG_ENABLE(sim-switch,
-[AS_HELP_STRING([--enable-sim-switch], [Use a switch instead of a table for instruction call.])],
+AC_ARG_ENABLE(sim-ppc-switch,
+[AS_HELP_STRING([--enable-sim-ppc-switch], [Use a switch instead of a table for instruction call.])],
[case "${enableval}" in
- yes) sim_switch="-DWITH_SPREG_SWITCH_TABLE";;
- no) sim_switch="";;
- *) AC_MSG_ERROR("--enable-sim-switch does not take a value");;
-esac], [sim_switch=""])
-AC_MSG_RESULT($sim_switch)
+ yes) sim_ppc_switch="-DWITH_SPREG_SWITCH_TABLE";;
+ no) sim_ppc_switch="";;
+ *) AC_MSG_ERROR("--enable-sim-ppc-switch does not take a value");;
+esac], [sim_ppc_switch=""])
+AC_MSG_RESULT($sim_ppc_switch)
AC_MSG_CHECKING([for sim ppc timebase])
-AC_ARG_ENABLE(sim-timebase,
-[AS_HELP_STRING([--enable-sim-timebase], [Specify whether the PPC timebase is supported.])],
+AC_ARG_ENABLE(sim-ppc-timebase,
+[AS_HELP_STRING([--enable-sim-ppc-timebase], [Specify whether the PPC timebase is supported.])],
[case "${enableval}" in
- yes) sim_timebase="-DWITH_TIME_BASE=1";;
- no) sim_timebase="-DWITH_TIME_BASE=0";;
- *) AC_MSG_ERROR("--enable-sim-timebase does not take a value");;
-esac], [sim_timebase=""])
-AC_MSG_RESULT($sim_timebase)
+ yes) sim_ppc_timebase="-DWITH_TIME_BASE=1";;
+ no) sim_ppc_timebase="-DWITH_TIME_BASE=0";;
+ *) AC_MSG_ERROR("--enable-sim-ppc-timebase does not take a value");;
+esac], [sim_ppc_timebase=""])
+AC_MSG_RESULT($sim_ppc_timebase)
AC_MSG_CHECKING([for sim ppc xor endian settings])
-AC_ARG_ENABLE(sim-xor-endian,
-[AS_HELP_STRING([--enable-sim-xor-endian=n], [Specify number bytes involved in PowerPC XOR bi-endian mode (default 8).])],
-[case "${enableval}" in
- yes) sim_xor_endian="-DWITH_XOR_ENDIAN=8";;
- no) sim_xor_endian="-DWITH_XOR_ENDIAN=0";;
- *) sim_xor_endian="-DWITH_XOR_ENDIAN=$enableval";;
-esac], [sim_xor_endian=""])
-AC_MSG_RESULT($sim_xor_endian)
-
-AC_SUBST(sim_line_nr)
-AC_SUBST(sim_opcode)
-AC_SUBST(sim_switch)
-AC_SUBST(sim_dup)
-AC_SUBST(sim_decode_mechanism)
-AC_SUBST(sim_jump)
-AC_SUBST(sim_filter)
-AC_SUBST(sim_icache)
-AC_SUBST(sim_hw_src)
-AC_SUBST(sim_hw_obj)
-AC_SUBST(sim_xor_endian)
-AC_SUBST(sim_smp)
-AC_SUBST(sim_igen_smp)
-AC_SUBST(sim_bitsize)
-AC_SUBST(sim_timebase)
-AC_SUBST(sim_float)
-AC_SUBST(sim_monitor)
-AC_SUBST(sim_model)
-AC_SUBST(sim_default_model)
-AC_SUBST(sim_model_issue)
+AC_ARG_ENABLE(sim-ppc-xor-endian,
+[AS_HELP_STRING([--enable-sim-ppc-xor-endian=n], [Specify number bytes involved in PowerPC XOR bi-endian mode (default 8).])],
+[case "${enableval}" in
+ yes) sim_ppc_xor_endian="-DWITH_XOR_ENDIAN=8";;
+ no) sim_ppc_xor_endian="-DWITH_XOR_ENDIAN=0";;
+ *) sim_ppc_xor_endian="-DWITH_XOR_ENDIAN=$enableval";;
+esac], [sim_ppc_xor_endian=""])
+AC_MSG_RESULT($sim_ppc_xor_endian)
+
+AC_SUBST(sim_ppc_line_nr)
+AC_SUBST(sim_ppc_opcode)
+AC_SUBST(sim_ppc_switch)
+AC_SUBST(sim_ppc_dup)
+AC_SUBST(sim_ppc_decode_mechanism)
+AC_SUBST(sim_ppc_jump)
+AC_SUBST(sim_ppc_filter)
+AC_SUBST(sim_ppc_icache)
+AC_SUBST(sim_ppc_hw_src)
+AC_SUBST(sim_ppc_hw_obj)
+AC_SUBST(sim_ppc_xor_endian)
+AC_SUBST(sim_ppc_smp)
+AC_SUBST(sim_ppc_igen_smp)
+AC_SUBST(sim_ppc_bitsize)
+AC_SUBST(sim_ppc_timebase)
+AC_SUBST(sim_ppc_float)
+AC_SUBST(sim_ppc_monitor)
+AC_SUBST(sim_ppc_model)
+AC_SUBST(sim_ppc_default_model)
+AC_SUBST(sim_ppc_model_issue)
AC_OUTPUT(Makefile)
--
2.43.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH/submitted 5/5] sim: ppc: merge configure logic into top-level
2024-01-02 6:42 [PATCH/submitted 1/5] sim: ppc: drop now unused config.in Mike Frysinger
` (2 preceding siblings ...)
2024-01-02 6:42 ` [PATCH/submitted 4/5] sim: ppc: scope configure options to --enable-sim-ppc-xxx Mike Frysinger
@ 2024-01-02 6:42 ` Mike Frysinger
3 siblings, 0 replies; 5+ messages in thread
From: Mike Frysinger @ 2024-01-02 6:42 UTC (permalink / raw)
To: gdb-patches
Now that the ppc configure script is just namespaced options, we can
move it to ppc/acinclude.m4 and include it directly in the top-level
configure script and kill off the last subdir configure script.
---
sim/Makefile.in | 30 +-
sim/configure | 571 +++--
sim/configure.ac | 7 +-
sim/ppc/Makefile.in | 12 +-
sim/ppc/{configure.ac => acinclude.m4} | 6 -
sim/ppc/aclocal.m4 | 15 -
sim/ppc/configure | 3234 ------------------------
7 files changed, 457 insertions(+), 3418 deletions(-)
rename sim/ppc/{configure.ac => acinclude.m4} (98%)
delete mode 100644 sim/ppc/aclocal.m4
delete mode 100755 sim/ppc/configure
diff --git a/sim/configure.ac b/sim/configure.ac
index 84a7e0a249e7..bc51492fd478 100644
--- a/sim/configure.ac
+++ b/sim/configure.ac
@@ -63,7 +63,8 @@ m4_define([SIM_BUILD_TARGET], [dnl
ENABLE_SIM=yes
AS_VAR_APPEND([SIM_ENABLED_ARCHES], [" $1"])
m4_if($2, [true], [dnl
- AC_CONFIG_SUBDIRS($1)
+ AC_CONFIG_FILES($1/Makefile)
+ subdirs="$subdirs $1"
])
AC_CONFIG_FILES($1/.gdbinit:common/gdbinit.in)
])
@@ -86,6 +87,9 @@ m4_define([SIM_TARGET], [dnl
AM_CONDITIONAL([SIM_ENABLE_ARCH_$2], [${sim_enable_arch_$2}])
])
+subdirs=""
+AC_SUBST(subdirs)
+
dnl WHEN ADDING ENTRIES TO THIS MATRIX:
dnl Make sure that the left side always has two dashes. Otherwise you can get
dnl spurious matches. Even for unambiguous cases, do this as a convention, else
@@ -158,6 +162,7 @@ SIM_AC_OPTION_WARNINGS
dnl Some arches have unique configure flags.
m4_include([frv/acinclude.m4])
m4_include([mips/acinclude.m4])
+m4_include([ppc/acinclude.m4])
m4_include([riscv/acinclude.m4])
m4_include([rx/acinclude.m4])
diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in
index 267b6a8bc99a..220e4b8e728b 100644
--- a/sim/ppc/Makefile.in
+++ b/sim/ppc/Makefile.in
@@ -559,7 +559,7 @@ sim-fpu.o: $(srcdir)/../common/sim-fpu.c
$(ECHO_CC) $(CC) -c $(STD_CFLAGS) -DHAVE_CONFIG_H $(srcdir)/../common/sim-fpu.c
# Rebuild options whenever something changes so the date/time is up to date.
-options.o: options.c $(CPU_H) $(OPTIONS_H) $(DEFINES_H) $(BASICS_H) $(IDECODE_H) $(INLINE) $(LIB_SRC) $(BUILT_SRC) config.status Makefile
+options.o: options.c $(CPU_H) $(OPTIONS_H) $(DEFINES_H) $(BASICS_H) $(IDECODE_H) $(INLINE) $(LIB_SRC) $(BUILT_SRC) ../config.status Makefile
$(ECHO_CC) $(CC) -c $(STD_CFLAGS) '-DOPCODE_RULES="@sim_ppc_opcode@"' '-DIGEN_FLAGS="$(IGEN_FLAGS)"' $(srcdir)/options.c
#
@@ -679,16 +679,16 @@ clean mostlyclean:
rm -f tmp-* *.[oasi] core $(BUILT_SRC_WO_CONFIG)
distclean realclean: clean
- rm -f TAGS Makefile config.cache config.status stamp-h config.log
+ rm -f TAGS Makefile
maintainer-clean: distclean
rm -f *~ *.log core *.core
-Makefile: Makefile.in config.status
- CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
+Makefile: Makefile.in ../config.status
+ cd .. && $(SHELL) ./config.status ppc/Makefile
-config.status: configure
- $(SHELL) ./config.status --recheck
+../config.status: ../configure
+ cd .. && $(SHELL) ./config.status --recheck
check:
diff --git a/sim/ppc/configure.ac b/sim/ppc/acinclude.m4
similarity index 98%
rename from sim/ppc/configure.ac
rename to sim/ppc/acinclude.m4
index 03b86126829a..535401918910 100644
--- a/sim/ppc/configure.ac
+++ b/sim/ppc/acinclude.m4
@@ -1,7 +1,3 @@
-dnl Process this file with autoconf to produce a configure script.
-AC_INIT(Makefile.in)
-AC_CONFIG_MACRO_DIRS([../.. ../../config])
-
AC_MSG_CHECKING([for sim ppc bitsize settings])
AC_ARG_ENABLE(sim-ppc-bitsize,
[AS_HELP_STRING([--enable-sim-ppc-bitsize=n], [Specify target bitsize (32 or 64).])],
@@ -230,5 +226,3 @@ AC_SUBST(sim_ppc_monitor)
AC_SUBST(sim_ppc_model)
AC_SUBST(sim_ppc_default_model)
AC_SUBST(sim_ppc_model_issue)
-
-AC_OUTPUT(Makefile)
--
2.43.0
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-01-02 7:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-02 6:42 [PATCH/submitted 1/5] sim: ppc: drop now unused config.in Mike Frysinger
2024-01-02 6:42 ` [PATCH/submitted 2/5] sim: ppc: switch to AS_HELP_STRING for automatic formatting Mike Frysinger
2024-01-02 6:42 ` [PATCH/submitted 3/5] sim: ppc: standardize configure option processing Mike Frysinger
2024-01-02 6:42 ` [PATCH/submitted 4/5] sim: ppc: scope configure options to --enable-sim-ppc-xxx Mike Frysinger
2024-01-02 6:42 ` [PATCH/submitted 5/5] sim: ppc: merge configure logic into top-level Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).