Re: [BUILDROBOT] error: comparison between ‘bfd_reloc_code_real_type’ and ‘enum elf_mips_reloc_type’ (was: MIPS: Verify the ISA mode and alignment of branch and jump targets)1;5C
Maciej W. Rozycki
macro@imgtec.com
Wed Jul 20 11:59:00 GMT 2016
On Tue, 19 Jul 2016, Jan-Benedict Glaw wrote:
> On gcc21 (compile farm), I'm seeing this with Ubuntu 4.8.4-2ubuntu1~14.04.3:
>
>
> gcc -DHAVE_CONFIG_H -I. -I/scratch/4/jbglaw/regular/repos/binutils_gdb/gas -I. -I/scratch/4/jbglaw/regular/repos/binutils_gdb/gas -I../bfd -I/scratch/4/jbglaw/regular/repos/binutils_gdb/gas/config -I/scratch/4/jbglaw/regular/repos/binutils_gdb/gas/../include -I/scratch/4/jbglaw/regular/repos/binutils_gdb/gas/.. -I/scratch/4/jbglaw/regular/repos/binutils_gdb/gas/../bfd -DLOCALEDIR="\"/scratch/4/jbglaw/regular/build/mips-linux/_install_/share/locale\"" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -Wwrite-strings -I/scratch/4/jbglaw/regular/repos/binutils_gdb/gas/../zlib -g -O2 -MT tc-mips.o -MD -MP -MF .deps/tc-mips.Tpo -c -o tc-mips.o `test -f 'config/tc-mips.c' || echo '/scratch/4/jbglaw/regular/repos/binutils_gdb/gas/'`config/tc-mips.c
> /scratch/4/jbglaw/regular/repos/binutils_gdb/gas/config/tc-mips.c: In function Β‘mips_force_relocationΒ’:
> /scratch/4/jbglaw/regular/repos/binutils_gdb/gas/config/tc-mips.c:14807:24: error: comparison between Β‘bfd_reloc_code_real_typeΒ’ and Β‘enum elf_mips_reloc_typeΒ’ [-Werror=enum-compare]
> if ((fixp->fx_r_type == R_MIPS_PC26_S2
> ^
> /scratch/4/jbglaw/regular/repos/binutils_gdb/gas/config/tc-mips.c:14808:27: error: comparison between Β‘bfd_reloc_code_real_typeΒ’ and Β‘enum elf_mips_reloc_typeΒ’ [-Werror=enum-compare]
> || fixp->fx_r_type == R_MIPS_PC21_S2
Fixed with commit 5caa2b07ebd1 ("MIPS/GAS: Remove erroneous ELF
relocation references").
> /scratch/4/jbglaw/regular/repos/binutils_gdb/gas/config/tc-mips.c: In function Β‘fix_bad_cross_mode_branch_pΒ’:
> /scratch/4/jbglaw/regular/repos/binutils_gdb/gas/config/tc-mips.c:14959:17: error: variable Β‘opcodeΒ’ set but not used [-Werror=unused-but-set-variable]
> unsigned long opcode;
> ^
> cc1: all warnings being treated as errors
> make[3]: *** [tc-mips.o] Error 1
>
>
> The first two (R_MIPS_PC21_S2 comparisons) still hold true, the opcode
> warning might be gone since the latest change.
Indeed, the latter was an artefact of bad code shuffling between patches.
Apologies about the breakage and thanks for the alert!
Maciej
More information about the Binutils
mailing list