Fixes for gcc-4.6 -Werror compile failures for ARM architecture.
This commit is contained in:
parent
5c33b80ed7
commit
4a78f29404
154
arm-unused-but-set-variable.patch
Normal file
154
arm-unused-but-set-variable.patch
Normal file
@ -0,0 +1,154 @@
|
||||
--- crash-5.1.7/gdb-7.0.patch.orig
|
||||
+++ crash-5.1.7/gdb-7.0.patch
|
||||
@@ -1838,3 +1838,151 @@
|
||||
a = relocation;
|
||||
b = val & howto->src_mask;
|
||||
|
||||
+--- gdb-7.0/bfd/elf32-arm.c.orig
|
||||
++++ gdb-7.0/bfd/elf32-arm.c
|
||||
+@@ -3438,7 +3438,6 @@ arm_build_one_stub (struct bfd_hash_entr
|
||||
+ struct elf32_arm_link_hash_table *htab;
|
||||
+ asection *stub_sec;
|
||||
+ bfd *stub_bfd;
|
||||
+- bfd_vma stub_addr;
|
||||
+ bfd_byte *loc;
|
||||
+ bfd_vma sym_value;
|
||||
+ int template_size;
|
||||
+@@ -3471,10 +3470,6 @@ arm_build_one_stub (struct bfd_hash_entr
|
||||
+
|
||||
+ stub_bfd = stub_sec->owner;
|
||||
+
|
||||
+- /* This is the address of the start of the stub. */
|
||||
+- stub_addr = stub_sec->output_section->vma + stub_sec->output_offset
|
||||
+- + stub_entry->stub_offset;
|
||||
+-
|
||||
+ /* This is the address of the stub destination. */
|
||||
+ sym_value = (stub_entry->target_value
|
||||
+ + stub_entry->target_section->output_offset
|
||||
+@@ -3660,16 +3655,14 @@ find_stub_size_and_template (enum elf32_
|
||||
+
|
||||
+ static bfd_boolean
|
||||
+ arm_size_one_stub (struct bfd_hash_entry *gen_entry,
|
||||
+- void * in_arg)
|
||||
++ void * in_arg __attribute__ ((unused)))
|
||||
+ {
|
||||
+ struct elf32_arm_stub_hash_entry *stub_entry;
|
||||
+- struct elf32_arm_link_hash_table *htab;
|
||||
+ const insn_sequence *template_sequence;
|
||||
+ int template_size, size;
|
||||
+
|
||||
+ /* Massage our args to the form they really have. */
|
||||
+ stub_entry = (struct elf32_arm_stub_hash_entry *) gen_entry;
|
||||
+- htab = (struct elf32_arm_link_hash_table *) in_arg;
|
||||
+
|
||||
+ BFD_ASSERT((stub_entry->stub_type > arm_stub_none)
|
||||
+ && stub_entry->stub_type < ARRAY_SIZE(stub_definitions));
|
||||
+@@ -5147,7 +5140,6 @@ record_vfp11_erratum_veneer (struct bfd_
|
||||
+ struct bfd_link_hash_entry *bh;
|
||||
+ bfd_vma val;
|
||||
+ struct _arm_elf_section_data *sec_data;
|
||||
+- int errcount;
|
||||
+ elf32_vfp11_erratum_list *newerr;
|
||||
+
|
||||
+ hash_table = elf32_arm_hash_table (link_info);
|
||||
+@@ -5186,7 +5178,7 @@ record_vfp11_erratum_veneer (struct bfd_
|
||||
+ myh->forced_local = 1;
|
||||
+
|
||||
+ /* Link veneer back to calling location. */
|
||||
+- errcount = ++(sec_data->erratumcount);
|
||||
++ sec_data->erratumcount += 1;
|
||||
+ newerr = bfd_zmalloc (sizeof (elf32_vfp11_erratum_list));
|
||||
+
|
||||
+ newerr->type = VFP11_ERRATUM_ARM_VENEER;
|
||||
+@@ -6035,9 +6027,8 @@ bfd_elf32_arm_vfp11_erratum_scan (bfd *a
|
||||
+ {
|
||||
+ elf32_vfp11_erratum_list *newerr
|
||||
+ = bfd_zmalloc (sizeof (elf32_vfp11_erratum_list));
|
||||
+- int errcount;
|
||||
+
|
||||
+- errcount = ++(elf32_arm_section_data (sec)->erratumcount);
|
||||
++ elf32_arm_section_data (sec)->erratumcount += 1;
|
||||
+
|
||||
+ newerr->u.b.vfp_insn = veneer_of_insn;
|
||||
+
|
||||
+@@ -6747,8 +6738,6 @@ elf32_arm_final_link_relocate (reloc_how
|
||||
+ unsigned long r_symndx;
|
||||
+ bfd_byte * hit_data = contents + rel->r_offset;
|
||||
+ bfd * dynobj = NULL;
|
||||
+- Elf_Internal_Shdr * symtab_hdr;
|
||||
+- struct elf_link_hash_entry ** sym_hashes;
|
||||
+ bfd_vma * local_got_offsets;
|
||||
+ asection * sgot = NULL;
|
||||
+ asection * splt = NULL;
|
||||
+@@ -6785,8 +6774,6 @@ elf32_arm_final_link_relocate (reloc_how
|
||||
+ sgot = bfd_get_section_by_name (dynobj, ".got");
|
||||
+ splt = bfd_get_section_by_name (dynobj, ".plt");
|
||||
+ }
|
||||
+- symtab_hdr = & elf_symtab_hdr (input_bfd);
|
||||
+- sym_hashes = elf_sym_hashes (input_bfd);
|
||||
+ local_got_offsets = elf_local_got_offsets (input_bfd);
|
||||
+ r_symndx = ELF32_R_SYM (rel->r_info);
|
||||
+
|
||||
+@@ -8886,7 +8873,7 @@ elf32_arm_relocate_section (bfd *
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+- bfd_boolean warned;
|
||||
++ bfd_boolean warned __attribute__((unused));
|
||||
+
|
||||
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
+ r_symndx, symtab_hdr, sym_hashes,
|
||||
+@@ -10740,7 +10727,6 @@ elf32_arm_check_relocs (bfd *abfd, struc
|
||||
+ const Elf_Internal_Rela *rel_end;
|
||||
+ bfd *dynobj;
|
||||
+ asection *sreloc;
|
||||
+- bfd_vma *local_got_offsets;
|
||||
+ struct elf32_arm_link_hash_table *htab;
|
||||
+ bfd_boolean needs_plt;
|
||||
+ unsigned long nsyms;
|
||||
+@@ -10763,7 +10749,6 @@ elf32_arm_check_relocs (bfd *abfd, struc
|
||||
+ }
|
||||
+
|
||||
+ dynobj = elf_hash_table (info)->dynobj;
|
||||
+- local_got_offsets = elf_local_got_offsets (abfd);
|
||||
+
|
||||
+ symtab_hdr = & elf_symtab_hdr (abfd);
|
||||
+ sym_hashes = elf_sym_hashes (abfd);
|
||||
+@@ -12864,10 +12849,8 @@ elf32_arm_output_map_sym (output_arch_sy
|
||||
+ bfd_vma offset)
|
||||
+ {
|
||||
+ static const char *names[3] = {"$a", "$t", "$d"};
|
||||
+- struct elf32_arm_link_hash_table *htab;
|
||||
+ Elf_Internal_Sym sym;
|
||||
+
|
||||
+- htab = elf32_arm_hash_table (osi->info);
|
||||
+ sym.st_value = osi->sec->output_section->vma
|
||||
+ + osi->sec->output_offset
|
||||
+ + offset;
|
||||
+@@ -12962,10 +12945,8 @@ static bfd_boolean
|
||||
+ elf32_arm_output_stub_sym (output_arch_syminfo *osi, const char *name,
|
||||
+ bfd_vma offset, bfd_vma size)
|
||||
+ {
|
||||
+- struct elf32_arm_link_hash_table *htab;
|
||||
+ Elf_Internal_Sym sym;
|
||||
+
|
||||
+- htab = elf32_arm_hash_table (osi->info);
|
||||
+ sym.st_value = osi->sec->output_section->vma
|
||||
+ + osi->sec->output_offset
|
||||
+ + offset;
|
||||
+@@ -12982,7 +12963,6 @@ arm_map_one_stub (struct bfd_hash_entry
|
||||
+ {
|
||||
+ struct elf32_arm_stub_hash_entry *stub_entry;
|
||||
+ struct bfd_link_info *info;
|
||||
+- struct elf32_arm_link_hash_table *htab;
|
||||
+ asection *stub_sec;
|
||||
+ bfd_vma addr;
|
||||
+ char *stub_name;
|
||||
+@@ -12999,7 +12979,6 @@ arm_map_one_stub (struct bfd_hash_entry
|
||||
+
|
||||
+ info = osi->info;
|
||||
+
|
||||
+- htab = elf32_arm_hash_table (info);
|
||||
+ stub_sec = stub_entry->stub_sec;
|
||||
+
|
||||
+ /* Ensure this stub is attached to the current section being
|
@ -4,7 +4,7 @@
|
||||
Summary: Kernel analysis utility for live systems, netdump, diskdump, kdump, LKCD or mcore dumpfiles
|
||||
Name: crash
|
||||
Version: 5.1.7
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: GPLv2
|
||||
Group: Development/Debuggers
|
||||
Source: http://people.redhat.com/anderson/crash-%{version}.tar.gz
|
||||
@ -15,6 +15,7 @@ Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot-%(%{__id_u} -n)
|
||||
BuildRequires: ncurses-devel zlib-devel
|
||||
Requires: binutils
|
||||
Patch0: ppc64-unused-but-set-variable.patch
|
||||
Patch1: arm-unused-but-set-variable.patch
|
||||
|
||||
%description
|
||||
The core analysis suite is a self-contained tool that can be used to
|
||||
@ -36,6 +37,7 @@ offered by Mission Critical Linux, or the LKCD kernel patch.
|
||||
%prep
|
||||
%setup -n %{name}-%{version} -q
|
||||
%patch0 -p1 -b ppc64-unused-but-set-variable.patch
|
||||
%patch1 -p1 -b arm-unused-but-set-variable.patch
|
||||
|
||||
%build
|
||||
make RPMPKG="%{version}-%{release}" CFLAGS="%{optflags}"
|
||||
@ -64,6 +66,9 @@ rm -rf %{buildroot}
|
||||
%{_includedir}/*
|
||||
|
||||
%changelog
|
||||
* Thu Sep 1 2011 Dave Anderson <anderson@redhat.com> - 5.1.7-2
|
||||
- Fixes for gcc-4.6 -Werror compile failures for ARM architecture.
|
||||
|
||||
* Wed Aug 17 2011 Dave Anderson <anderson@redhat.com> - 5.1.7-1
|
||||
- Update to latest upstream release
|
||||
- Fixes for gcc-4.6 -Werror compile failures for ppc64/ppc.
|
||||
|
Loading…
Reference in New Issue
Block a user