when building for --target=mips-elf, the mips sim does: mips.igen: :include:::micromips.igen :include:::micromipsdsp.igen except micromips.igen also does: :function:::address_word:delayslot_micromips:address_word target, address_word nia, int delayslot_instruction_size ... micromips_instruction_decode (SD, CPU, CIA, delayslot_instruction_size); ... and that function is defined in micromipsrun.c which is not included in the build. all of which leads to a link failure: gcc -DHAVE_CONFIG_H -DPROFILE=1 -DWITH_PROFILE=-1 -DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT -DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31 -DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG -DWITH_FLOATING_POINT=HARD_FLOATING_POINT -DWITH_TARGET_FLOATING_POINT_BITSIZE=32 -DWITH_HW=0 -DDEFAULT_INLINE=0 -DWITH_RESERVED_BITS=1 -DWITH_SMP=0 -Wall -Wdeclaration-after-statement -Wpointer-arith -Wpointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type -Wold-style-declaration -Wold-style-definition -Wformat-nonliteral -DMIPS_MACH_DEFAULT=bfd_mach_mips8000 -I. -I../../../../sim/mips -I../common -I../../../../sim/mips/../common -I../../include -I../../../../sim/mips/../..//include -I../../bfd -I../../../../sim/mips/../..//bfd -I../../opcodes -I../../../../sim/mips/../..//opcodes -g -O2 -static-libstdc++ -static-libgcc -o run \ nrun.o libsim.a ../../bfd/libbfd.a ../../opcodes/libopcodes.a ../../libiberty/libiberty.a -lm -ldl -lnsl -L../../zlib -lz libsim.a(support.o): In function `delayslot_micromips': /usr/local/src/gnu/gdb/build/build-mips/sim/mips/../../../../sim/mips/micromips.igen:49: undefined reference to `micromips_instruction_decode' collect2: error: ld returned 1 exit status Makefile:340: recipe for target 'run' failed make: *** [run] Error 1 it "worked" in the past because the default inline settings allowed for symbols to be defined in a way (duplicated) that support.o wouldn't get pulled in. when that's fixed though, support.o gets pulled in, and this link failure is hit.
Proposed fix posted here: <http://sourceware.org/ml/gdb-patches/2016-01/msg00244.html>.
The master branch has been updated by Andrew Bennett <abennett@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3d304f48cafbff4b7a1c0a9d338fb20aa4e4934b commit 3d304f48cafbff4b7a1c0a9d338fb20aa4e4934b Author: Andrew Bennett <andrew.bennett@imgtec.com> Date: Mon Jan 18 21:25:19 2016 +0000 MIPS: Only build microMIPS specific simulator functions if microMIPS support is required. This fixes PR sim/19441. In the MIPS simulator the microMIPS functions in micromips.igen were not predicated on the microMIPS models. This was causing build issues for some target triples. This patch sets all the microMIPS specific functions to only be built if the micromips32, micromips64 or micromipsdsp models are used. PR sim/19441 * micromips.igen (delayslot_micromips): Enable for `micromips32', `micromips64' and `micromipsdsp' only. (process_isa_mode): Enable for `micromips32' and `micromips64' only. (do_micromips_jalr, do_micromips_jal): Likewise. (compute_movep_src_reg): Likewise. (compute_andi16_imm): Likewise. (convert_fmt_micromips): Likewise. (convert_fmt_micromips_cvt_d): Likewise. (convert_fmt_micromips_cvt_s): Likewise. (FMT_MICROMIPS): Likewise. (FMT_MICROMIPS_CVT_D): Likewise. (FMT_MICROMIPS_CVT_S): Likewise.
Marking the bug as resolved.