diff options
author | Mike Frysinger <vapier@gentoo.org> | 2022-12-25 01:05:09 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2022-12-25 02:13:32 -0500 |
commit | 111b1cf97e7e5a8db35b48c4a9d93692dec799ce (patch) | |
tree | c262a1976c97f8569b7c473bf99caf627cac62bf | |
parent | 20b579bac5a0b0177c7a40dc7520369dbb332efb (diff) | |
download | gdb-111b1cf97e7e5a8db35b48c4a9d93692dec799ce.zip gdb-111b1cf97e7e5a8db35b48c4a9d93692dec799ce.tar.gz gdb-111b1cf97e7e5a8db35b48c4a9d93692dec799ce.tar.bz2 |
sim: smp: plumb igen flag down to all users
While mips has respected sim_igen_smp at configure time (which was
always empty since it defaulted smp to off), no other igen port did.
Move this to a makefile variable and plumb it through the common
IGEN_RUN variable instead so everyone gets it by default. We also
clean up some redundant -N0 setting with multirun mips.
-rw-r--r-- | sim/Makefile.in | 3 | ||||
-rw-r--r-- | sim/arch-subdir.mk.in | 3 | ||||
-rw-r--r-- | sim/common/Make-common.in | 2 | ||||
-rwxr-xr-x | sim/configure | 16 | ||||
-rw-r--r-- | sim/igen/local.mk | 2 | ||||
-rw-r--r-- | sim/m4/sim_ac_option_smp.m4 | 3 | ||||
-rw-r--r-- | sim/mips/Makefile.in | 2 | ||||
-rw-r--r-- | sim/mips/acinclude.m4 | 8 |
8 files changed, 22 insertions, 17 deletions
diff --git a/sim/Makefile.in b/sim/Makefile.in index 0693572..08e0f7c 100644 --- a/sim/Makefile.in +++ b/sim/Makefile.in @@ -1022,6 +1022,7 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ +IGEN_FLAGS_SMP = @IGEN_FLAGS_SMP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -1282,7 +1283,7 @@ SIM_COMMON_LIBS = \ # igen leaks memory, and therefore makes AddressSanitizer unhappy. Disable # leak detection while running it. @SIM_ENABLE_IGEN_TRUE@IGEN = igen/igen$(EXEEXT) -@SIM_ENABLE_IGEN_TRUE@IGEN_RUN = ASAN_OPTIONS=detect_leaks=0 $(IGEN) +@SIM_ENABLE_IGEN_TRUE@IGEN_RUN = ASAN_OPTIONS=detect_leaks=0 $(IGEN) $(IGEN_FLAGS_SMP) @SIM_ENABLE_IGEN_TRUE@igen_libigen_a_SOURCES = \ @SIM_ENABLE_IGEN_TRUE@ igen/table.c \ @SIM_ENABLE_IGEN_TRUE@ igen/lf.c \ diff --git a/sim/arch-subdir.mk.in b/sim/arch-subdir.mk.in index cfde3f3..e6c779a 100644 --- a/sim/arch-subdir.mk.in +++ b/sim/arch-subdir.mk.in @@ -73,3 +73,6 @@ SIM_INLINE = @SIM_INLINE@ SIM_HW_CFLAGS = @SIM_HW_CFLAGS@ SIM_HW_OBJS = $(SIM_HW_DEVICES:%=dv-%.o) @SIM_ENABLE_HW_FALSE@SIM_HW_OBJS = + +# TODO: Delete this once mips/Makefile.in igen moves to mips/local.mk. +IGEN_FLAGS_SMP = @IGEN_FLAGS_SMP@ diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in index 52cc3c9..7b1caa0 100644 --- a/sim/common/Make-common.in +++ b/sim/common/Make-common.in @@ -82,7 +82,7 @@ POSTCOMPILE = @true # igen leaks memory, and therefore makes AddressSanitizer unhappy. Disable # leak detection while running it. IGEN = ../igen/igen$(EXEEXT) -IGEN_RUN = ASAN_OPTIONS=detect_leaks=0 $(IGEN) +IGEN_RUN = ASAN_OPTIONS=detect_leaks=0 $(IGEN) $(IGEN_FLAGS_SMP) # Each simulator's Makefile.in defines one or more of these variables # to override our settings as necessary. There is no need to define these diff --git a/sim/configure b/sim/configure index 6329dfd..34a8d59 100755 --- a/sim/configure +++ b/sim/configure @@ -656,6 +656,7 @@ SIM_MIPS_SUBTARGET SIM_FRV_TRAPDUMP_FLAGS sim_float sim_bitsize +IGEN_FLAGS_SMP SIM_INLINE SIM_HW_SOCKSER SIM_HW_CFLAGS @@ -12445,7 +12446,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12448 "configure" +#line 12449 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12551,7 +12552,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12554 "configure" +#line 12555 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -16095,7 +16096,8 @@ if test "${enable_sim_smp+set}" = set; then : *) sim_smp="$enableval";; esac fi -sim_igen_smp="-N ${sim_smp}" +IGEN_FLAGS_SMP="-N ${sim_smp}" + if test "x$sim_smp" = x0; then : else @@ -16603,10 +16605,10 @@ else SIM_MIPS_MULTI_SRC=doesnt-exist.c fi -SIM_MIPS_IGEN_FLAGS="-F ${sim_mips_igen_filter} ${sim_mips_igen_machine} ${sim_igen_smp}" -SIM_MIPS_M16_FLAGS="-F ${sim_mips_m16_filter} ${sim_mips_m16_machine} ${sim_igen_smp}" -SIM_MIPS_MICROMIPS16_FLAGS="-F ${sim_mips_micromips16_filter} ${sim_mips_micromips16_machine} ${sim_igen_smp}" -SIM_MIPS_MICROMIPS_FLAGS="-F ${sim_mips_micromips_filter} ${sim_mips_micromips_machine} ${sim_igen_smp}" +SIM_MIPS_IGEN_FLAGS="-F ${sim_mips_igen_filter} ${sim_mips_igen_machine}" +SIM_MIPS_M16_FLAGS="-F ${sim_mips_m16_filter} ${sim_mips_m16_machine}" +SIM_MIPS_MICROMIPS16_FLAGS="-F ${sim_mips_micromips16_filter} ${sim_mips_micromips16_machine}" +SIM_MIPS_MICROMIPS_FLAGS="-F ${sim_mips_micromips_filter} ${sim_mips_micromips_machine}" diff --git a/sim/igen/local.mk b/sim/igen/local.mk index bf984db..5d55295 100644 --- a/sim/igen/local.mk +++ b/sim/igen/local.mk @@ -22,7 +22,7 @@ # igen leaks memory, and therefore makes AddressSanitizer unhappy. Disable # leak detection while running it. IGEN = %D%/igen$(EXEEXT) -IGEN_RUN = ASAN_OPTIONS=detect_leaks=0 $(IGEN) +IGEN_RUN = ASAN_OPTIONS=detect_leaks=0 $(IGEN) $(IGEN_FLAGS_SMP) ## This makes sure igen is available before building the arch-subdirs which ## need to run the igen tool. diff --git a/sim/m4/sim_ac_option_smp.m4 b/sim/m4/sim_ac_option_smp.m4 index 5c2b35f..47ddabd 100644 --- a/sim/m4/sim_ac_option_smp.m4 +++ b/sim/m4/sim_ac_option_smp.m4 @@ -27,7 +27,8 @@ AC_ARG_ENABLE(sim-smp, no) sim_smp="0";; *) sim_smp="$enableval";; esac])dnl -sim_igen_smp="-N ${sim_smp}" +IGEN_FLAGS_SMP="-N ${sim_smp}" +AC_SUBST(IGEN_FLAGS_SMP) dnl NB: The ppc code uses a diff default because its smp works. That is why dnl we don't unconditionally enable WITH_SMP here. Once we unify ppc, we can dnl make this unconditional. diff --git a/sim/mips/Makefile.in b/sim/mips/Makefile.in index c287a63..8493f87 100644 --- a/sim/mips/Makefile.in +++ b/sim/mips/Makefile.in @@ -422,7 +422,6 @@ tmp-mach-multi: $(IGEN_INSN) $(IGEN_DC) $(IGEN) $(IGEN_INCLUDE) -I $(srcdir) \ -Werror \ -Wnodiscard \ - -N 0 \ -M $${m} \ -G gen-direct-access \ -G gen-zero-r0 \ @@ -451,7 +450,6 @@ tmp-itable-multi: $(IGEN_INSN) $(IGEN_DC) $(IGEN) $(IGEN_INCLUDE) -Werror \ -Wnodiscard \ -Wnowidth \ - -N 0 \ $(SIM_MIPS_MULTI_FLAGS) \ -G gen-direct-access \ -G gen-zero-r0 \ diff --git a/sim/mips/acinclude.m4 b/sim/mips/acinclude.m4 index 0a8bf97..ae5cc29 100644 --- a/sim/mips/acinclude.m4 +++ b/sim/mips/acinclude.m4 @@ -322,10 +322,10 @@ __EOF__ dnl For clean-extra target. SIM_MIPS_MULTI_SRC=doesnt-exist.c ]) -SIM_MIPS_IGEN_FLAGS="-F ${sim_mips_igen_filter} ${sim_mips_igen_machine} ${sim_igen_smp}" -SIM_MIPS_M16_FLAGS="-F ${sim_mips_m16_filter} ${sim_mips_m16_machine} ${sim_igen_smp}" -SIM_MIPS_MICROMIPS16_FLAGS="-F ${sim_mips_micromips16_filter} ${sim_mips_micromips16_machine} ${sim_igen_smp}" -SIM_MIPS_MICROMIPS_FLAGS="-F ${sim_mips_micromips_filter} ${sim_mips_micromips_machine} ${sim_igen_smp}" +SIM_MIPS_IGEN_FLAGS="-F ${sim_mips_igen_filter} ${sim_mips_igen_machine}" +SIM_MIPS_M16_FLAGS="-F ${sim_mips_m16_filter} ${sim_mips_m16_machine}" +SIM_MIPS_MICROMIPS16_FLAGS="-F ${sim_mips_micromips16_filter} ${sim_mips_micromips16_machine}" +SIM_MIPS_MICROMIPS_FLAGS="-F ${sim_mips_micromips_filter} ${sim_mips_micromips_machine}" AC_SUBST(SIM_MIPS_IGEN_FLAGS) AC_SUBST(SIM_MIPS_M16_FLAGS) AC_SUBST(SIM_MIPS_MICROMIPS_FLAGS) |