diff --git a/insight-6.8.1-gcc45.patch b/insight-6.8.1-gcc45.patch new file mode 100644 index 0000000..f2ea186 --- /dev/null +++ b/insight-6.8.1-gcc45.patch @@ -0,0 +1,66 @@ +diff -Naur insight-6.8-1.orig/gdb/ada-lang.c insight-6.8-1.new/gdb/ada-lang.c +--- insight-6.8-1.orig/gdb/ada-lang.c 2008-02-07 23:27:53.000000000 +0100 ++++ insight-6.8-1.new/gdb/ada-lang.c 2010-09-27 19:55:53.000000000 +0200 +@@ -7683,7 +7683,7 @@ + const char * + ada_attribute_name (enum exp_opcode n) + { +- if (n >= OP_ATR_FIRST && n <= (int) OP_ATR_VAL) ++ if (n >= (enum exp_opcode) OP_ATR_FIRST && n <= (int) OP_ATR_VAL) + return attribute_names[n - OP_ATR_FIRST + 1]; + else + return attribute_names[0]; +@@ -8183,7 +8183,7 @@ + elt = ada_to_fixed_value (unwrap_value (elt)); + } + +- if (exp->elts[*pos].opcode == OP_AGGREGATE) ++ if (exp->elts[*pos].opcode == (enum exp_opcode) OP_AGGREGATE) + assign_aggregate (container, elt, exp, pos, EVAL_NORMAL); + else + value_assign_to_component (container, elt, +@@ -8338,7 +8338,7 @@ + { + LONGEST lower, upper; + enum exp_opcode op = exp->elts[choice_pos].opcode; +- if (op == OP_DISCRETE_RANGE) ++ if (op == (enum exp_opcode) OP_DISCRETE_RANGE) + { + choice_pos += 1; + lower = value_as_long (ada_evaluate_subexp (NULL, exp, pos, +@@ -8537,7 +8537,7 @@ + + case BINOP_ASSIGN: + arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside); +- if (exp->elts[*pos].opcode == OP_AGGREGATE) ++ if (exp->elts[*pos].opcode == (enum exp_opcode) OP_AGGREGATE) + { + arg1 = assign_aggregate (arg1, arg1, exp, pos, noside); + if (noside == EVAL_SKIP || noside == EVAL_AVOID_SIDE_EFFECTS) +@@ -9096,7 +9096,7 @@ + return value_zero (value_type (arg1), not_lval); + else + return value_binop (arg1, arg2, +- op == OP_ATR_MIN ? BINOP_MIN : BINOP_MAX); ++ op == (enum exp_opcode) OP_ATR_MIN ? BINOP_MIN : BINOP_MAX); + + case OP_ATR_MODULUS: + { +diff -Naur insight-6.8-1.orig/gdb/cp-name-parser.y insight-6.8-1.new/gdb/cp-name-parser.y +--- insight-6.8-1.orig/gdb/cp-name-parser.y 2008-01-01 23:53:09.000000000 +0100 ++++ insight-6.8-1.new/gdb/cp-name-parser.y 2010-09-27 19:21:11.000000000 +0200 +@@ -1977,12 +1977,12 @@ + char *str, *prefix = NULL, *buf; + size_t err = 0; + +- if (result->type == GLOBAL_DESTRUCTORS) ++ if (result->type == (enum demangle_component_type) GLOBAL_DESTRUCTORS) + { + result = d_left (result); + prefix = "global destructors keyed to "; + } +- else if (result->type == GLOBAL_CONSTRUCTORS) ++ else if (result->type == (enum demangle_component_type) GLOBAL_CONSTRUCTORS) + { + result = d_left (result); + prefix = "global constructors keyed to "; diff --git a/insight-6.8.1-unused.patch b/insight-6.8.1-unused.patch new file mode 100644 index 0000000..5f0d868 --- /dev/null +++ b/insight-6.8.1-unused.patch @@ -0,0 +1,150 @@ +diff -Naur insight-6.8-1.orig/bfd/aoutx.h insight-6.8-1.new/bfd/aoutx.h +--- insight-6.8-1.orig/bfd/aoutx.h 2007-08-10 01:14:55.000000000 +0200 ++++ insight-6.8-1.new/bfd/aoutx.h 2011-02-09 15:32:41.587301439 +0100 +@@ -5240,6 +5240,7 @@ + return FALSE; + + sym_count = obj_aout_external_sym_count (input_bfd); ++ (void) sym_count; /* Avoid "unused variable" warning. */ + + /* Write out the symbols and get a map of the new indices. The map + is placed into finfo->symbol_map. */ +diff -Naur insight-6.8-1.orig/bfd/archive64.c insight-6.8-1.new/bfd/archive64.c +--- insight-6.8-1.orig/bfd/archive64.c 2007-07-03 16:26:39.000000000 +0200 ++++ insight-6.8-1.new/bfd/archive64.c 2011-02-09 16:03:58.213115007 +0100 +@@ -56,6 +56,7 @@ + + /* Get the name of the first element. */ + arhdrpos = bfd_tell (abfd); ++ (void) arhdrpos; /* Avoid "unused variable" warning. */ + i = bfd_bread (nextname, 16, abfd); + if (i == 0) + return TRUE; +diff -Naur insight-6.8-1.orig/bfd/elf32-i386.c insight-6.8-1.new/bfd/elf32-i386.c +--- insight-6.8-1.orig/bfd/elf32-i386.c 2008-02-12 12:32:30.000000000 +0100 ++++ insight-6.8-1.new/bfd/elf32-i386.c 2011-02-09 14:29:01.829039524 +0100 +@@ -2638,6 +2638,7 @@ + r_symndx, symtab_hdr, sym_hashes, + h, sec, relocation, + unresolved_reloc, warned); ++ (void) warned; /* Avoid "unused variable" warning. */ + } + + if (sec != NULL && elf_discarded_section (sec)) +diff -Naur insight-6.8-1.orig/bfd/elf64-x86-64.c insight-6.8-1.new/bfd/elf64-x86-64.c +--- insight-6.8-1.orig/bfd/elf64-x86-64.c 2008-02-12 12:32:31.000000000 +0100 ++++ insight-6.8-1.new/bfd/elf64-x86-64.c 2011-02-09 15:39:24.910171197 +0100 +@@ -2367,6 +2367,7 @@ + r_symndx, symtab_hdr, sym_hashes, + h, sec, relocation, + unresolved_reloc, warned); ++ (void) warned; /* Avoid "unused variable" warning. */ + } + + if (sec != NULL && elf_discarded_section (sec)) +@@ -2808,6 +2809,7 @@ + + type = bfd_get_8 (input_bfd, contents + roff - 3); + type2 = bfd_get_8 (input_bfd, contents + roff - 2); ++ (void) type2; /* Avoid "unused variable" warning. */ + val = bfd_get_8 (input_bfd, contents + roff - 1); + bfd_put_8 (output_bfd, 0x48 | ((type >> 2) & 1), + contents + roff - 3); +@@ -3053,8 +3055,11 @@ + unsigned int val, type, type2; + + type = bfd_get_8 (input_bfd, contents + roff - 3); ++ (void) type; /* Avoid "unused variable" warning. */ + type2 = bfd_get_8 (input_bfd, contents + roff - 2); ++ (void) type2; /* Avoid "unused variable" warning. */ + val = bfd_get_8 (input_bfd, contents + roff - 1); ++ (void) val; /* Avoid "unused variable" warning. */ + + /* Now modify the instruction as appropriate. To + turn a leaq into a movq in the form we use it, it +@@ -3084,7 +3089,9 @@ + unsigned int val, type; + + type = bfd_get_8 (input_bfd, contents + roff); ++ (void) type; /* Avoid "unused variable" warning. */ + val = bfd_get_8 (input_bfd, contents + roff + 1); ++ (void) val; /* Avoid "unused variable" warning. */ + bfd_put_8 (output_bfd, 0x66, contents + roff); + bfd_put_8 (output_bfd, 0x90, contents + roff + 1); + continue; +diff -Naur insight-6.8-1.orig/bfd/elf.c insight-6.8-1.new/bfd/elf.c +--- insight-6.8-1.orig/bfd/elf.c 2008-02-18 00:45:23.000000000 +0100 ++++ insight-6.8-1.new/bfd/elf.c 2011-02-09 15:25:12.970129997 +0100 +@@ -4812,6 +4812,7 @@ + + i_ehdrp = elf_elfheader (abfd); + i_shdrp = elf_elfsections (abfd); ++ (void) i_shdrp; /* Avoid "variable unused" warning. */ + + shstrtab = _bfd_elf_strtab_init (); + if (shstrtab == NULL) +@@ -4890,6 +4891,7 @@ + || elf_tdata (abfd)->shstrtab_hdr.sh_name == (unsigned int) -1) + return FALSE; + ++ (void) i_phdrp; /* Avoid "variable unused" warning. */ + return TRUE; + } + +@@ -4934,6 +4936,7 @@ + + i_shdrp = elf_elfsections (abfd); + i_ehdrp = elf_elfheader (abfd); ++ (void) i_ehdrp; /* Avoid "variable unused" warning. */ + + failed = FALSE; + bfd_map_over_sections (abfd, bed->s->write_relocs, &failed); +diff -Naur insight-6.8-1.orig/bfd/elf-eh-frame.c insight-6.8-1.new/bfd/elf-eh-frame.c +--- insight-6.8-1.orig/bfd/elf-eh-frame.c 2008-01-09 10:36:11.000000000 +0100 ++++ insight-6.8-1.new/bfd/elf-eh-frame.c 2011-02-09 15:16:34.481252426 +0100 +@@ -1229,6 +1229,7 @@ + + htab = elf_hash_table (info); + hdr_info = &htab->eh_info; ++ (void) hdr_info; /* Avoid "unused variable" warning. */ + + lo = 0; + hi = sec_info->count; +diff -Naur insight-6.8-1.orig/bfd/peXXigen.c insight-6.8-1.new/bfd/peXXigen.c +--- insight-6.8-1.orig/bfd/peXXigen.c 2007-11-13 21:17:43.000000000 +0100 ++++ insight-6.8-1.new/bfd/peXXigen.c 2011-02-09 15:35:33.994026215 +0100 +@@ -1745,6 +1745,7 @@ + _("\n\nPE File Base Relocations (interpreted .reloc section contents)\n")); + + datasize = section->size; ++ (void) datasize; /* Avoid "unused variable" warning. */ + if (! bfd_malloc_and_get_section (abfd, section, &data)) + { + if (data != NULL) +diff -Naur insight-6.8-1.orig/opcodes/i386-dis.c insight-6.8-1.new/opcodes/i386-dis.c +--- insight-6.8-1.orig/opcodes/i386-dis.c 2008-02-13 14:29:31.000000000 +0100 ++++ insight-6.8-1.new/opcodes/i386-dis.c 2011-02-09 16:02:32.651664495 +0100 +@@ -5243,7 +5243,6 @@ + int sizeflag; + const char *p; + struct dis_private priv; +- unsigned char op; + char prefix_obuf[32]; + char *prefix_obufp; + +@@ -5430,7 +5429,6 @@ + return 1; + } + +- op = 0; + if (*codep == 0x0f) + { + unsigned char threebyte; +@@ -7316,6 +7314,7 @@ + + scratchbuf[0] = '$'; + print_operand_value (scratchbuf + 1, 1, op); ++ (void) mask; /* Avoid "unused variable" warning. */ + oappend (scratchbuf + intel_syntax); + } + diff --git a/insight.spec b/insight.spec index d7422df..f115306 100644 --- a/insight.spec +++ b/insight.spec @@ -2,7 +2,7 @@ Name: insight Version: %(echo %{ver} | tr - .) -Release: 3%{?dist} +Release: 4%{?dist} Summary: Graphical debugger based on GDB License: GPLv3+ Group: Development/Debuggers @@ -26,6 +26,8 @@ Patch13: insight-6.8-doubleinstall.patch Patch14: insight-6.8-readline6.patch Patch15: insight-6.8.1-baseclassfield.patch Patch16: insight-6.8.1-sbrk.patch +Patch17: insight-6.8.1-gcc45.patch +Patch18: insight-6.8.1-unused.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Requires: iwidgets BuildRequires: tcl-devel @@ -40,6 +42,7 @@ BuildRequires: ImageMagick BuildRequires: desktop-file-utils BuildRequires: automake BuildRequires: autoconf +BuildRequires: bison %description Insight is a tight graphical user interface to GDB written in Tcl/Tk. @@ -69,6 +72,8 @@ GDB version 6.x. %patch14 -p1 -b .readline6 %patch15 -p1 -b .baseclassfield %patch16 -p1 -b .sbrk +%patch17 -p1 -b .gcc45 +%patch18 -p1 -b .unused #------------------------------------------------------------------------------- @@ -222,11 +227,16 @@ rm -rf "${RPM_BUILD_ROOT}" #------------------------------------------------------------------------------- %changelog +#------------------------------------------------------------------------------- + +* Wed Feb 9 2011 Patrick Monnerat 6.8.1-4 +- Patch "unused" to suppress "variable set but not used" errors. +- Patch "gcc45" to fix gcc 4.5 errors on incompatible enums. + https://bugzilla.redhat.com/show_bug.cgi?id=631116 + * Wed Feb 09 2011 Fedora Release Engineering - 6.8.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild -#------------------------------------------------------------------------------- - * Wed Jan 13 2010 Patrick Monnerat 6.8.1-2 - Patch "sbrk" to enable sbrk() prototype on F13.