+# Get the sim settings.
+# NB: Target matching is aligned with sim/configure.ac. Changes must be kept
+# in sync with that file.
+
+case "${targ}" in
+aarch64*-*-*) gdb_sim=aarch64 ;;
+arm*-*-*) gdb_sim=arm ;;
+avr*-*-*) gdb_sim=avr ;;
+bfin-*-*) gdb_sim=bfin ;;
+bpf-*-*) gdb_sim=bpf ;;
+cris-*-*|cris32-*-*) gdb_sim=cris ;;
+frv-*-*) gdb_sim=frv ;;
+ft32-*-*) gdb_sim=ft32 ;;
+h8300*-*-*) gdb_sim=h8300 ;;
+iq2000-*-*) gdb_sim=iq2000 ;;
+lm32-*-*) gdb_sim=lm32 ;;
+m32c-*-*) gdb_sim=m32c ;;
+m32r-*-*) gdb_sim=m32r ;;
+m68hc11-*-*|m6811-*-*) gdb_sim=m68hc11 ;;
+microblaze*-*-*) gdb_sim=microblaze ;;
+mips*-*-*) gdb_sim=mips ;;
+mn10300*-*-*) gdb_sim=mn10300 ;;
+moxie-*-*) gdb_sim=moxie ;;
+msp430*-*-*) gdb_sim=msp430 ;;
+or1k*-*-*) gdb_sim=or1k ;;
+powerpc*-*-*) gdb_sim=ppc ;;
+riscv*-*-*) gdb_sim=riscv ;;
+rl78-*-*) gdb_sim=rl78 ;;
+rx-*-*) gdb_sim=rx ;;
+sh*-*-*) gdb_sim=sh ;;
+sparc-*-*) gdb_sim=erc32 ;;
+v850*-*-*) gdb_sim=v850 ;;
+esac
+if test "x$gdb_sim" != "x"; then
+ gdb_sim="../sim/${gdb_sim}/libsim.a"
+fi
+