diff options
Diffstat (limited to 'meta-xilinx/meta-microblaze/recipes-devtools/binutils/binutils/0033-Fix-various-compile-warnings.patch')
-rw-r--r-- | meta-xilinx/meta-microblaze/recipes-devtools/binutils/binutils/0033-Fix-various-compile-warnings.patch | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/meta-xilinx/meta-microblaze/recipes-devtools/binutils/binutils/0033-Fix-various-compile-warnings.patch b/meta-xilinx/meta-microblaze/recipes-devtools/binutils/binutils/0033-Fix-various-compile-warnings.patch new file mode 100644 index 000000000..7339995e7 --- /dev/null +++ b/meta-xilinx/meta-microblaze/recipes-devtools/binutils/binutils/0033-Fix-various-compile-warnings.patch @@ -0,0 +1,105 @@ +From d9114e764eb42ae1daaf6af7c2a5e48fc764109d Mon Sep 17 00:00:00 2001 +From: Mark Hatle <mark.hatle@kernel.crashing.org> +Date: Fri, 17 Jul 2020 09:20:54 -0500 +Subject: [PATCH 33/40] Fix various compile warnings + +Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> +--- + bfd/elf64-microblaze.c | 9 +++++---- + gas/config/tc-microblaze.c | 11 +++++------ + 2 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/bfd/elf64-microblaze.c b/bfd/elf64-microblaze.c +index b002b414d64..8308f1ebd09 100644 +--- a/bfd/elf64-microblaze.c ++++ b/bfd/elf64-microblaze.c +@@ -692,7 +692,7 @@ microblaze_elf_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, + /* Set the howto pointer for a RCE ELF reloc. */ + + static bfd_boolean +-microblaze_elf_info_to_howto (bfd * abfd ATTRIBUTE_UNUSED, ++microblaze_elf_info_to_howto (bfd * abfd, + arelent * cache_ptr, + Elf_Internal_Rela * dst) + { +@@ -705,14 +705,14 @@ microblaze_elf_info_to_howto (bfd * abfd ATTRIBUTE_UNUSED, + r_type = ELF64_R_TYPE (dst->r_info); + if (r_type >= R_MICROBLAZE_max) + { +- (*_bfd_error_handler) (_("%pB: unrecognised MicroBlaze reloc number: %d"), ++ _bfd_error_handler (_("%pB: unsupported relocation type %#x"), + abfd, r_type); + bfd_set_error (bfd_error_bad_value); + return FALSE; + } + + cache_ptr->howto = microblaze_elf_howto_table [r_type]; +- return TRUE; ++ return TRUE; + } + + /* Microblaze ELF local labels start with 'L.' or '$L', not '.L'. */ +@@ -1560,7 +1560,7 @@ microblaze_elf_relocate_section (bfd *output_bfd, + else + { + BFD_FAIL (); +- (*_bfd_error_handler) ++ _bfd_error_handler + (_("%pB: probably compiled without -fPIC?"), + input_bfd); + bfd_set_error (bfd_error_bad_value); +@@ -2554,6 +2554,7 @@ microblaze_elf_check_relocs (bfd * abfd, + goto dogottls; + case R_MICROBLAZE_TLSLD: + tls_type |= (TLS_TLS | TLS_LD); ++ /* Fall through. */ + dogottls: + sec->has_tls_reloc = 1; + /* Fall through. */ +diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c +index da99d4ef482..62daa56b47a 100644 +--- a/gas/config/tc-microblaze.c ++++ b/gas/config/tc-microblaze.c +@@ -1091,7 +1091,6 @@ md_assemble (char * str) + reg = is_reg (temp_op_end + 1); + if (reg) + { +- + opcode->inst_type=INST_TYPE_RD_R1_IMML; + opcode->inst_offset_type = OPCODE_MASK_H; + if (streq (name, "addli")) +@@ -1242,18 +1241,18 @@ md_assemble (char * str) + else if (streq (name, "smi")) + as_fatal (_("smi pseudo instruction should not use a label in imm field")); + if(streq (name, "lli") || streq (name, "sli")) +- opc = str_microblaze_64; ++ opc = strdup(str_microblaze_64); + else if ((microblaze_arch_size == 64) && ((streq (name, "lbui") + || streq (name, "lhui") || streq (name, "lwi") || streq (name, "sbi") + || streq (name, "shi") || streq (name, "swi")))) + { +- opc = str_microblaze_64; ++ opc = strdup(str_microblaze_64); + subtype = opcode->inst_offset_type; + } + else if (reg2 == REG_ROSDP) +- opc = str_microblaze_ro_anchor; ++ opc = strdup(str_microblaze_ro_anchor); + else if (reg2 == REG_RWSDP) +- opc = str_microblaze_rw_anchor; ++ opc = strdup(str_microblaze_rw_anchor); + else + opc = NULL; + if (exp.X_md != 0) +@@ -1718,7 +1717,7 @@ md_assemble (char * str) + inst |= (reg1 << RD_LOW) & RD_MASK; + inst |= (immed << IMM_LOW) & IMM16_MASK; + break; +- ++ + case INST_TYPE_R1_RFSL: + if (strcmp (op_end, "")) + op_end = parse_reg (op_end + 1, ®1); /* Get r1. */ +-- +2.17.1 + |