From 76b124a4d6a9ab0d567bd5f6a43dd235170086cf Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sun, 11 Sep 2011 18:28:45 +0200 Subject: debug/gdb: rename patch directories Missed renaming the patch directories after the version renames... :-( Signed-off-by: "Yann E. MORIN" diff --git a/patches/gdb/6.8/100-dwarf-stack-overflow.patch b/patches/gdb/6.8/100-dwarf-stack-overflow.patch deleted file mode 100644 index 344d5a3..0000000 --- a/patches/gdb/6.8/100-dwarf-stack-overflow.patch +++ /dev/null @@ -1,52 +0,0 @@ -Original patch from gentoo: gentoo/src/patchsets/gdb/6.8/80_all_gdb-6.5-dwarf-stack-overflow.patch --= BEGIN original header =- -http://bugs.gentoo.org/144833 - -for gdb/ChangeLog: -2006-08-22 Will Drewry - Tavis Ormandy - - * dwarf2read.c (decode_locdesc): Enforce location description stack - boundaries. - * dwarfread.c (locval): Likewise. - --= END original header =- -diff -durN gdb-6.8.orig/gdb/dwarf2read.c gdb-6.8/gdb/dwarf2read.c ---- gdb-6.8.orig/gdb/dwarf2read.c 2008-03-10 15:18:10.000000000 +0100 -+++ gdb-6.8/gdb/dwarf2read.c 2008-06-17 16:07:31.000000000 +0200 -@@ -9124,8 +9124,7 @@ - callers will only want a very basic result and this can become a - complaint. - -- Note that stack[0] is unused except as a default error return. -- Note that stack overflow is not yet handled. */ -+ Note that stack[0] is unused except as a default error return. */ - - static CORE_ADDR - decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu) -@@ -9142,7 +9141,7 @@ - - i = 0; - stacki = 0; -- stack[stacki] = 0; -+ stack[++stacki] = 0; - - while (i < size) - { -@@ -9324,6 +9323,16 @@ - dwarf_stack_op_name (op)); - return (stack[stacki]); - } -+ /* Enforce maximum stack depth of size-1 to avoid ++stacki writing -+ outside of the allocated space. Also enforce minimum > 0. -+ -- wad@google.com 14 Aug 2006 */ -+ if (stacki >= sizeof (stack) / sizeof (*stack) - 1) -+ internal_error (__FILE__, __LINE__, -+ _("location description stack too deep: %d"), -+ stacki); -+ if (stacki <= 0) -+ internal_error (__FILE__, __LINE__, -+ _("location description stack too shallow")); - } - return (stack[stacki]); - } diff --git a/patches/gdb/6.8/110-security-errata-20050610.patch b/patches/gdb/6.8/110-security-errata-20050610.patch deleted file mode 100644 index 27e8174..0000000 --- a/patches/gdb/6.8/110-security-errata-20050610.patch +++ /dev/null @@ -1,205 +0,0 @@ -Original patch from gentoo: gentoo/src/patchsets/gdb/6.8/35_all_gdb-6.3-security-errata-20050610.patch --= BEGIN original header =- -2005-06-09 Jeff Johnston - - * gdb.base/gdbinit.exp: New testcase. - * gdb.base/gdbinit.sample: Sample .gdbinit for gdbinit.exp. - -2005-06-08 Daniel Jacobowitz - Jeff Johnston - - * Makefile.in (cli-cmds.o): Update. - * configure.in: Add check for getuid. - * configure: Regenerated. - * config.in: Ditto. - * main.c (captured_main): Pass -1 to source_command when loading - gdbinit files. - * cli/cli-cmds.c: Include "gdb_stat.h" and . - (source_command): Update documentation. Check permissions if - FROM_TTY is -1. - --= END original header =- -diff -durN gdb-6.8.orig/gdb/Makefile.in gdb-6.8/gdb/Makefile.in ---- gdb-6.8.orig/gdb/Makefile.in 2008-03-17 13:15:08.000000000 +0100 -+++ gdb-6.8/gdb/Makefile.in 2008-06-17 16:07:33.000000000 +0200 -@@ -3004,7 +3004,7 @@ - $(expression_h) $(frame_h) $(value_h) $(language_h) $(filenames_h) \ - $(objfiles_h) $(source_h) $(disasm_h) $(ui_out_h) $(top_h) \ - $(cli_decode_h) $(cli_script_h) $(cli_setshow_h) $(cli_cmds_h) \ -- $(tui_h) -+ $(tui_h) $(gdb_stat_h) - $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-cmds.c - cli-decode.o: $(srcdir)/cli/cli-decode.c $(defs_h) $(symtab_h) \ - $(gdb_regex_h) $(gdb_string_h) $(completer_h) $(ui_out_h) \ -diff -durN gdb-6.8.orig/gdb/cli/cli-cmds.c gdb-6.8/gdb/cli/cli-cmds.c ---- gdb-6.8.orig/gdb/cli/cli-cmds.c 2008-01-01 23:53:14.000000000 +0100 -+++ gdb-6.8/gdb/cli/cli-cmds.c 2008-06-17 16:07:33.000000000 +0200 -@@ -36,6 +36,7 @@ - #include "objfiles.h" - #include "source.h" - #include "disasm.h" -+#include "gdb_stat.h" - - #include "ui-out.h" - -@@ -459,12 +460,31 @@ - - if (fd == -1) - { -- if (from_tty) -+ if (from_tty > 0) - perror_with_name (file); - else - return; - } - -+#ifdef HAVE_GETUID -+ if (from_tty == -1) -+ { -+ struct stat statbuf; -+ if (fstat (fd, &statbuf) < 0) -+ { -+ perror_with_name (file); -+ close (fd); -+ return; -+ } -+ if (statbuf.st_uid != getuid () || (statbuf.st_mode & S_IWOTH)) -+ { -+ warning (_("not using untrusted file \"%s\""), file); -+ close (fd); -+ return; -+ } -+ } -+#endif -+ - stream = fdopen (fd, FOPEN_RT); - script_from_file (stream, file); - -diff -durN gdb-6.8.orig/gdb/main.c gdb-6.8/gdb/main.c ---- gdb-6.8.orig/gdb/main.c 2008-01-05 17:49:53.000000000 +0100 -+++ gdb-6.8/gdb/main.c 2008-06-17 16:07:33.000000000 +0200 -@@ -690,7 +690,7 @@ - - if (!inhibit_gdbinit) - { -- catch_command_errors (source_script, homeinit, 0, RETURN_MASK_ALL); -+ catch_command_errors (source_script, homeinit, -1, RETURN_MASK_ALL); - } - - /* Do stats; no need to do them elsewhere since we'll only -@@ -778,7 +778,7 @@ - || memcmp ((char *) &homebuf, (char *) &cwdbuf, sizeof (struct stat))) - if (!inhibit_gdbinit) - { -- catch_command_errors (source_script, gdbinit, 0, RETURN_MASK_ALL); -+ catch_command_errors (source_script, gdbinit, -1, RETURN_MASK_ALL); - } - - for (i = 0; i < ncmd; i++) -diff -durN gdb-6.8.orig/gdb/testsuite/gdb.base/gdbinit.exp gdb-6.8/gdb/testsuite/gdb.base/gdbinit.exp ---- gdb-6.8.orig/gdb/testsuite/gdb.base/gdbinit.exp 1970-01-01 01:00:00.000000000 +0100 -+++ gdb-6.8/gdb/testsuite/gdb.base/gdbinit.exp 2008-06-17 16:07:33.000000000 +0200 -@@ -0,0 +1,98 @@ -+# Copyright 2005 -+# Free Software Foundation, Inc. -+ -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+# Please email any bugs, comments, and/or additions to this file to: -+# bug-gdb@prep.ai.mit.edu -+ -+# This file was written by Jeff Johnston . -+ -+if $tracelevel then { -+ strace $tracelevel -+} -+ -+set prms_id 0 -+set bug_id 0 -+ -+# are we on a target board -+if [is_remote target] { -+ return -+} -+ -+ -+global verbose -+global GDB -+global GDBFLAGS -+global gdb_prompt -+global timeout -+global gdb_spawn_id; -+ -+gdb_stop_suppressing_tests; -+ -+verbose "Spawning $GDB -nw" -+ -+if [info exists gdb_spawn_id] { -+ return 0; -+} -+ -+if ![is_remote host] { -+ if { [which $GDB] == 0 } then { -+ perror "$GDB does not exist." -+ exit 1 -+ } -+} -+ -+set env(HOME) [pwd] -+remote_exec build "rm .gdbinit" -+remote_exec build "cp ${srcdir}/${subdir}/gdbinit.sample .gdbinit" -+remote_exec build "chmod 646 .gdbinit" -+ -+set res [remote_spawn host "$GDB -nw [host_info gdb_opts]"]; -+if { $res < 0 || $res == "" } { -+ perror "Spawning $GDB failed." -+ return 1; -+} -+gdb_expect 360 { -+ -re "warning: not using untrusted file.*\.gdbinit.*\[\r\n\]$gdb_prompt $" { -+ pass "untrusted .gdbinit caught." -+ } -+ -re "$gdb_prompt $" { -+ fail "untrusted .gdbinit caught." -+ } -+ timeout { -+ fail "(timeout) untrusted .gdbinit caught." -+ } -+} -+ -+remote_exec build "chmod 644 .gdbinit" -+set res [remote_spawn host "$GDB -nw [host_info gdb_opts]"]; -+if { $res < 0 || $res == "" } { -+ perror "Spawning $GDB failed." -+ return 1; -+} -+gdb_expect 360 { -+ -re "warning: not using untrusted file.*\.gdbinit.*\[\r\n\]$gdb_prompt $" { -+ fail "trusted .gdbinit allowed." -+ } -+ -re "in gdbinit.*$gdb_prompt $" { -+ pass "trusted .gdbinit allowed." -+ } -+ timeout { -+ fail "(timeout) trusted .gdbinit allowed." -+ } -+} -+ -+remote_exec build "rm .gdbinit" -diff -durN gdb-6.8.orig/gdb/testsuite/gdb.base/gdbinit.sample gdb-6.8/gdb/testsuite/gdb.base/gdbinit.sample ---- gdb-6.8.orig/gdb/testsuite/gdb.base/gdbinit.sample 1970-01-01 01:00:00.000000000 +0100 -+++ gdb-6.8/gdb/testsuite/gdb.base/gdbinit.sample 2008-06-17 16:07:33.000000000 +0200 -@@ -0,0 +1 @@ -+echo "\nin gdbinit" diff --git a/patches/gdb/6.8/120-tdep-opcode-include-workaround.patch b/patches/gdb/6.8/120-tdep-opcode-include-workaround.patch deleted file mode 100644 index 61fdef4..0000000 --- a/patches/gdb/6.8/120-tdep-opcode-include-workaround.patch +++ /dev/null @@ -1,33 +0,0 @@ -Original patch from gentoo: gentoo/src/patchsets/gdb/6.8/20_all_gdb-tdep-opcode-include-workaround.patch --= BEGIN original header =- -workaround build failure - -http://bugs.gentoo.org/216368 - --= END original header =- -diff -durN gdb-6.8.orig/gdb/frv-tdep.c gdb-6.8/gdb/frv-tdep.c ---- gdb-6.8.orig/gdb/frv-tdep.c 2008-01-11 14:19:59.000000000 +0100 -+++ gdb-6.8/gdb/frv-tdep.c 2008-06-17 16:07:34.000000000 +0200 -@@ -32,7 +32,7 @@ - #include "gdb_assert.h" - #include "sim-regno.h" - #include "gdb/sim-frv.h" --#include "opcodes/frv-desc.h" /* for the H_SPR_... enums */ -+#include "../opcodes/frv-desc.h" /* for the H_SPR_... enums */ - #include "symtab.h" - #include "elf-bfd.h" - #include "elf/frv.h" -diff -durN gdb-6.8.orig/gdb/mep-tdep.c gdb-6.8/gdb/mep-tdep.c ---- gdb-6.8.orig/gdb/mep-tdep.c 2008-01-11 14:20:02.000000000 +0100 -+++ gdb-6.8/gdb/mep-tdep.c 2008-06-17 16:07:34.000000000 +0200 -@@ -53,8 +53,8 @@ - - /* Get the user's customized MeP coprocessor register names from - libopcodes. */ --#include "opcodes/mep-desc.h" --#include "opcodes/mep-opc.h" -+#include "../opcodes/mep-desc.h" -+#include "../opcodes/mep-opc.h" - - - /* The gdbarch_tdep structure. */ diff --git a/patches/gdb/6.8/130-reg-no-longer-active.patch b/patches/gdb/6.8/130-reg-no-longer-active.patch deleted file mode 100644 index 1c7e7e0..0000000 --- a/patches/gdb/6.8/130-reg-no-longer-active.patch +++ /dev/null @@ -1,30 +0,0 @@ -Fix bug reported by Thomas Petazzoni : -See: http://sourceware.org/ml/crossgcc/2009-05/msg00055.html - https://bugzilla.redhat.com/show_bug.cgi?id=436037 - -Fix from: http://cvs.fedoraproject.org/viewvc/devel/gdb/gdb-6.8-bz436037-reg-no-longer-active.patch?revision=1.1 - -diff -d -urpN src.0/gdb/valops.c src.1/gdb/valops.c ---- src.0/gdb/valops.c 2008-07-27 04:00:03.000000000 +0200 -+++ src.1/gdb/valops.c 2008-07-31 15:17:42.000000000 +0200 -@@ -813,10 +813,18 @@ value_assign (struct value *toval, struc - struct frame_info *frame; - int value_reg; - -- /* Figure out which frame this is in currently. */ -- frame = frame_find_by_id (VALUE_FRAME_ID (toval)); - value_reg = VALUE_REGNUM (toval); - -+ /* Figure out which frame this is in currently. */ -+ frame = frame_find_by_id (VALUE_FRAME_ID (toval)); -+ /* "set $reg+=1" should work on programs with no debug info, -+ but frame_find_by_id returns NULL here (RH bug 436037). -+ Use current frame, it represents CPU state in this case. -+ If frame_find_by_id is changed to do it internally -+ (it is contemplated there), remove this. */ -+ if (!frame) -+ frame = get_current_frame (); -+ /* Probably never happens. */ - if (!frame) - error (_("Value being assigned to is no longer active.")); - diff --git a/patches/gdb/6.8/140-sim-ppc-have-config-h.patch b/patches/gdb/6.8/140-sim-ppc-have-config-h.patch deleted file mode 100644 index f3723b5..0000000 --- a/patches/gdb/6.8/140-sim-ppc-have-config-h.patch +++ /dev/null @@ -1,183 +0,0 @@ -Fix for canadian cross build of sim/ppc - -Orignal patch info see: http://sources.redhat.com/bugzilla/show_bug.cgi?id=9638 - -diff -urN gdb-6.8-pl1/sim/ppc/Makefile.in gdb-6.8-pl2/sim/ppc/Makefile.in ---- gdb-6.8-pl1/sim/ppc/Makefile.in 2006-05-31 17:14:45.000000000 +0200 -+++ gdb-6.8-pl2/sim/ppc/Makefile.in 2008-09-30 15:56:33.000000000 +0200 -@@ -61,7 +61,7 @@ - AR = @AR@ - AR_FLAGS = rc - CC = @CC@ --CFLAGS = @CFLAGS@ -+CFLAGS = @CFLAGS@ -DHAVE_CONFIG_H - CC_FOR_BUILD = @CC_FOR_BUILD@ - CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ - BISON = bison -@@ -115,8 +115,8 @@ - $(DEVZERO_CFLAGS) - SIM_FPU_CFLAGS = @sim_fpu_cflags@ - --STD_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(INTL_CFLAGS) $(SIM_FPU_CFLAGS) --NOWARN_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(SIM_FPU_CFLAGS) -+STD_CFLAGS = $(CFLAGS) -DHAVE_CONFIG_H $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(INTL_CFLAGS) $(SIM_FPU_CFLAGS) -+NOWARN_CFLAGS = $(CFLAGS) -DHAVE_CONFIG_H $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(SIM_FPU_CFLAGS) - BUILD_CFLAGS = $(CFLAGS_FOR_BUILD) $(INCLUDES) $(WARNING_CFLAGS) - - BUILD_LDFLAGS = -diff -urN gdb-6.8-orig/sim/ppc/basics.h gdb-6.8-pl1/sim/ppc/basics.h ---- gdb-6.8-orig/sim/ppc/basics.h 1999-04-16 03:35:08.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/basics.h 2008-09-30 15:12:32.000000000 +0200 -@@ -86,7 +86,9 @@ - - /* Basic configuration */ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "ppc-config.h" - #include "inline.h" - -diff -urN gdb-6.8-orig/sim/ppc/debug.c gdb-6.8-pl1/sim/ppc/debug.c ---- gdb-6.8-orig/sim/ppc/debug.c 1999-04-16 03:35:08.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/debug.c 2008-09-30 15:12:27.000000000 +0200 -@@ -22,7 +22,9 @@ - #ifndef _DEBUG_C_ - #define _DEBUG_C_ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "basics.h" - - #ifdef HAVE_STDLIB_H -diff -urN gdb-6.8-orig/sim/ppc/dgen.c gdb-6.8-pl1/sim/ppc/dgen.c ---- gdb-6.8-orig/sim/ppc/dgen.c 1999-04-16 03:35:08.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/dgen.c 2008-09-30 15:12:22.000000000 +0200 -@@ -27,7 +27,9 @@ - #include - #include - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "misc.h" - #include "lf.h" - #include "table.h" -diff -urN gdb-6.8-orig/sim/ppc/filter.c gdb-6.8-pl1/sim/ppc/filter.c ---- gdb-6.8-orig/sim/ppc/filter.c 1999-04-16 03:35:09.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/filter.c 2008-09-30 15:12:15.000000000 +0200 -@@ -21,7 +21,9 @@ - - #include - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - - #ifdef HAVE_STRING_H - #include -diff -urN gdb-6.8-orig/sim/ppc/filter_filename.c gdb-6.8-pl1/sim/ppc/filter_filename.c ---- gdb-6.8-orig/sim/ppc/filter_filename.c 1999-04-16 03:35:08.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/filter_filename.c 2008-09-30 15:12:11.000000000 +0200 -@@ -18,7 +18,9 @@ - - */ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "ppc-config.h" - #include "filter_filename.h" - -diff -urN gdb-6.8-orig/sim/ppc/igen.c gdb-6.8-pl1/sim/ppc/igen.c ---- gdb-6.8-orig/sim/ppc/igen.c 2003-06-20 05:59:33.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/igen.c 2008-09-30 15:12:06.000000000 +0200 -@@ -25,7 +25,9 @@ - #include "misc.h" - #include "lf.h" - #include "table.h" -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - - #include "filter.h" - -diff -urN gdb-6.8-orig/sim/ppc/inline.c gdb-6.8-pl1/sim/ppc/inline.c ---- gdb-6.8-orig/sim/ppc/inline.c 1999-04-16 03:35:10.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/inline.c 2008-09-30 15:11:58.000000000 +0200 -@@ -22,7 +22,9 @@ - #ifndef _INLINE_C_ - #define _INLINE_C_ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "ppc-config.h" - - #include "inline.h" -diff -urN gdb-6.8-orig/sim/ppc/lf.c gdb-6.8-pl1/sim/ppc/lf.c ---- gdb-6.8-orig/sim/ppc/lf.c 2002-05-30 17:07:06.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/lf.c 2008-09-30 15:33:35.000000000 +0200 -@@ -23,7 +23,9 @@ - #include - #include - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "misc.h" - #include "lf.h" - -diff -urN gdb-6.8-orig/sim/ppc/misc.c gdb-6.8-pl1/sim/ppc/misc.c ---- gdb-6.8-orig/sim/ppc/misc.c 1999-04-16 03:35:11.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/misc.c 2008-09-30 15:11:54.000000000 +0200 -@@ -23,7 +23,9 @@ - #include - #include - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "misc.h" - - #ifdef HAVE_STDLIB_H -diff -urN gdb-6.8-orig/sim/ppc/misc.h gdb-6.8-pl1/sim/ppc/misc.h ---- gdb-6.8-orig/sim/ppc/misc.h 2002-01-12 11:21:12.000000000 +0100 -+++ gdb-6.8-pl1/sim/ppc/misc.h 2008-09-30 15:11:49.000000000 +0200 -@@ -21,7 +21,9 @@ - - /* Frustrating header junk */ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - - #include - #include -diff -urN gdb-6.8-orig/sim/ppc/sim-endian.c gdb-6.8-pl1/sim/ppc/sim-endian.c ---- gdb-6.8-orig/sim/ppc/sim-endian.c 1999-04-16 03:35:11.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/sim-endian.c 2008-09-30 15:11:44.000000000 +0200 -@@ -22,7 +22,9 @@ - #ifndef _SIM_ENDIAN_C_ - #define _SIM_ENDIAN_C_ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "basics.h" - - -diff -urN gdb-6.8-orig/sim/ppc/table.c gdb-6.8-pl1/sim/ppc/table.c ---- gdb-6.8-orig/sim/ppc/table.c 2002-01-12 11:21:12.000000000 +0100 -+++ gdb-6.8-pl1/sim/ppc/table.c 2008-09-30 15:11:38.000000000 +0200 -@@ -25,7 +25,9 @@ - #include - #include - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "misc.h" - #include "lf.h" - #include "table.h" diff --git a/patches/gdb/6.8/150-handle-stpcpy-define.patch b/patches/gdb/6.8/150-handle-stpcpy-define.patch deleted file mode 100644 index 88d703f..0000000 --- a/patches/gdb/6.8/150-handle-stpcpy-define.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ru gdb-6.8.orig/bfd/sysdep.h gdb-6.8/bfd/sysdep.h ---- gdb-6.8.orig/bfd/sysdep.h 2007-07-03 16:26:42.000000000 +0200 -+++ gdb-6.8/bfd/sysdep.h 2011-08-21 13:33:47.000000000 +0200 -@@ -131,7 +131,7 @@ - extern PTR realloc (); - #endif - --#if !HAVE_DECL_STPCPY -+#if !HAVE_DECL_STPCPY && !defined(stpcpy) - extern char *stpcpy (char *__dest, const char *__src); - #endif - diff --git a/patches/gdb/6.8a/100-dwarf-stack-overflow.patch b/patches/gdb/6.8a/100-dwarf-stack-overflow.patch new file mode 100644 index 0000000..344d5a3 --- /dev/null +++ b/patches/gdb/6.8a/100-dwarf-stack-overflow.patch @@ -0,0 +1,52 @@ +Original patch from gentoo: gentoo/src/patchsets/gdb/6.8/80_all_gdb-6.5-dwarf-stack-overflow.patch +-= BEGIN original header =- +http://bugs.gentoo.org/144833 + +for gdb/ChangeLog: +2006-08-22 Will Drewry + Tavis Ormandy + + * dwarf2read.c (decode_locdesc): Enforce location description stack + boundaries. + * dwarfread.c (locval): Likewise. + +-= END original header =- +diff -durN gdb-6.8.orig/gdb/dwarf2read.c gdb-6.8/gdb/dwarf2read.c +--- gdb-6.8.orig/gdb/dwarf2read.c 2008-03-10 15:18:10.000000000 +0100 ++++ gdb-6.8/gdb/dwarf2read.c 2008-06-17 16:07:31.000000000 +0200 +@@ -9124,8 +9124,7 @@ + callers will only want a very basic result and this can become a + complaint. + +- Note that stack[0] is unused except as a default error return. +- Note that stack overflow is not yet handled. */ ++ Note that stack[0] is unused except as a default error return. */ + + static CORE_ADDR + decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu) +@@ -9142,7 +9141,7 @@ + + i = 0; + stacki = 0; +- stack[stacki] = 0; ++ stack[++stacki] = 0; + + while (i < size) + { +@@ -9324,6 +9323,16 @@ + dwarf_stack_op_name (op)); + return (stack[stacki]); + } ++ /* Enforce maximum stack depth of size-1 to avoid ++stacki writing ++ outside of the allocated space. Also enforce minimum > 0. ++ -- wad@google.com 14 Aug 2006 */ ++ if (stacki >= sizeof (stack) / sizeof (*stack) - 1) ++ internal_error (__FILE__, __LINE__, ++ _("location description stack too deep: %d"), ++ stacki); ++ if (stacki <= 0) ++ internal_error (__FILE__, __LINE__, ++ _("location description stack too shallow")); + } + return (stack[stacki]); + } diff --git a/patches/gdb/6.8a/110-security-errata-20050610.patch b/patches/gdb/6.8a/110-security-errata-20050610.patch new file mode 100644 index 0000000..27e8174 --- /dev/null +++ b/patches/gdb/6.8a/110-security-errata-20050610.patch @@ -0,0 +1,205 @@ +Original patch from gentoo: gentoo/src/patchsets/gdb/6.8/35_all_gdb-6.3-security-errata-20050610.patch +-= BEGIN original header =- +2005-06-09 Jeff Johnston + + * gdb.base/gdbinit.exp: New testcase. + * gdb.base/gdbinit.sample: Sample .gdbinit for gdbinit.exp. + +2005-06-08 Daniel Jacobowitz + Jeff Johnston + + * Makefile.in (cli-cmds.o): Update. + * configure.in: Add check for getuid. + * configure: Regenerated. + * config.in: Ditto. + * main.c (captured_main): Pass -1 to source_command when loading + gdbinit files. + * cli/cli-cmds.c: Include "gdb_stat.h" and . + (source_command): Update documentation. Check permissions if + FROM_TTY is -1. + +-= END original header =- +diff -durN gdb-6.8.orig/gdb/Makefile.in gdb-6.8/gdb/Makefile.in +--- gdb-6.8.orig/gdb/Makefile.in 2008-03-17 13:15:08.000000000 +0100 ++++ gdb-6.8/gdb/Makefile.in 2008-06-17 16:07:33.000000000 +0200 +@@ -3004,7 +3004,7 @@ + $(expression_h) $(frame_h) $(value_h) $(language_h) $(filenames_h) \ + $(objfiles_h) $(source_h) $(disasm_h) $(ui_out_h) $(top_h) \ + $(cli_decode_h) $(cli_script_h) $(cli_setshow_h) $(cli_cmds_h) \ +- $(tui_h) ++ $(tui_h) $(gdb_stat_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-cmds.c + cli-decode.o: $(srcdir)/cli/cli-decode.c $(defs_h) $(symtab_h) \ + $(gdb_regex_h) $(gdb_string_h) $(completer_h) $(ui_out_h) \ +diff -durN gdb-6.8.orig/gdb/cli/cli-cmds.c gdb-6.8/gdb/cli/cli-cmds.c +--- gdb-6.8.orig/gdb/cli/cli-cmds.c 2008-01-01 23:53:14.000000000 +0100 ++++ gdb-6.8/gdb/cli/cli-cmds.c 2008-06-17 16:07:33.000000000 +0200 +@@ -36,6 +36,7 @@ + #include "objfiles.h" + #include "source.h" + #include "disasm.h" ++#include "gdb_stat.h" + + #include "ui-out.h" + +@@ -459,12 +460,31 @@ + + if (fd == -1) + { +- if (from_tty) ++ if (from_tty > 0) + perror_with_name (file); + else + return; + } + ++#ifdef HAVE_GETUID ++ if (from_tty == -1) ++ { ++ struct stat statbuf; ++ if (fstat (fd, &statbuf) < 0) ++ { ++ perror_with_name (file); ++ close (fd); ++ return; ++ } ++ if (statbuf.st_uid != getuid () || (statbuf.st_mode & S_IWOTH)) ++ { ++ warning (_("not using untrusted file \"%s\""), file); ++ close (fd); ++ return; ++ } ++ } ++#endif ++ + stream = fdopen (fd, FOPEN_RT); + script_from_file (stream, file); + +diff -durN gdb-6.8.orig/gdb/main.c gdb-6.8/gdb/main.c +--- gdb-6.8.orig/gdb/main.c 2008-01-05 17:49:53.000000000 +0100 ++++ gdb-6.8/gdb/main.c 2008-06-17 16:07:33.000000000 +0200 +@@ -690,7 +690,7 @@ + + if (!inhibit_gdbinit) + { +- catch_command_errors (source_script, homeinit, 0, RETURN_MASK_ALL); ++ catch_command_errors (source_script, homeinit, -1, RETURN_MASK_ALL); + } + + /* Do stats; no need to do them elsewhere since we'll only +@@ -778,7 +778,7 @@ + || memcmp ((char *) &homebuf, (char *) &cwdbuf, sizeof (struct stat))) + if (!inhibit_gdbinit) + { +- catch_command_errors (source_script, gdbinit, 0, RETURN_MASK_ALL); ++ catch_command_errors (source_script, gdbinit, -1, RETURN_MASK_ALL); + } + + for (i = 0; i < ncmd; i++) +diff -durN gdb-6.8.orig/gdb/testsuite/gdb.base/gdbinit.exp gdb-6.8/gdb/testsuite/gdb.base/gdbinit.exp +--- gdb-6.8.orig/gdb/testsuite/gdb.base/gdbinit.exp 1970-01-01 01:00:00.000000000 +0100 ++++ gdb-6.8/gdb/testsuite/gdb.base/gdbinit.exp 2008-06-17 16:07:33.000000000 +0200 +@@ -0,0 +1,98 @@ ++# Copyright 2005 ++# Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ ++# Please email any bugs, comments, and/or additions to this file to: ++# bug-gdb@prep.ai.mit.edu ++ ++# This file was written by Jeff Johnston . ++ ++if $tracelevel then { ++ strace $tracelevel ++} ++ ++set prms_id 0 ++set bug_id 0 ++ ++# are we on a target board ++if [is_remote target] { ++ return ++} ++ ++ ++global verbose ++global GDB ++global GDBFLAGS ++global gdb_prompt ++global timeout ++global gdb_spawn_id; ++ ++gdb_stop_suppressing_tests; ++ ++verbose "Spawning $GDB -nw" ++ ++if [info exists gdb_spawn_id] { ++ return 0; ++} ++ ++if ![is_remote host] { ++ if { [which $GDB] == 0 } then { ++ perror "$GDB does not exist." ++ exit 1 ++ } ++} ++ ++set env(HOME) [pwd] ++remote_exec build "rm .gdbinit" ++remote_exec build "cp ${srcdir}/${subdir}/gdbinit.sample .gdbinit" ++remote_exec build "chmod 646 .gdbinit" ++ ++set res [remote_spawn host "$GDB -nw [host_info gdb_opts]"]; ++if { $res < 0 || $res == "" } { ++ perror "Spawning $GDB failed." ++ return 1; ++} ++gdb_expect 360 { ++ -re "warning: not using untrusted file.*\.gdbinit.*\[\r\n\]$gdb_prompt $" { ++ pass "untrusted .gdbinit caught." ++ } ++ -re "$gdb_prompt $" { ++ fail "untrusted .gdbinit caught." ++ } ++ timeout { ++ fail "(timeout) untrusted .gdbinit caught." ++ } ++} ++ ++remote_exec build "chmod 644 .gdbinit" ++set res [remote_spawn host "$GDB -nw [host_info gdb_opts]"]; ++if { $res < 0 || $res == "" } { ++ perror "Spawning $GDB failed." ++ return 1; ++} ++gdb_expect 360 { ++ -re "warning: not using untrusted file.*\.gdbinit.*\[\r\n\]$gdb_prompt $" { ++ fail "trusted .gdbinit allowed." ++ } ++ -re "in gdbinit.*$gdb_prompt $" { ++ pass "trusted .gdbinit allowed." ++ } ++ timeout { ++ fail "(timeout) trusted .gdbinit allowed." ++ } ++} ++ ++remote_exec build "rm .gdbinit" +diff -durN gdb-6.8.orig/gdb/testsuite/gdb.base/gdbinit.sample gdb-6.8/gdb/testsuite/gdb.base/gdbinit.sample +--- gdb-6.8.orig/gdb/testsuite/gdb.base/gdbinit.sample 1970-01-01 01:00:00.000000000 +0100 ++++ gdb-6.8/gdb/testsuite/gdb.base/gdbinit.sample 2008-06-17 16:07:33.000000000 +0200 +@@ -0,0 +1 @@ ++echo "\nin gdbinit" diff --git a/patches/gdb/6.8a/120-tdep-opcode-include-workaround.patch b/patches/gdb/6.8a/120-tdep-opcode-include-workaround.patch new file mode 100644 index 0000000..61fdef4 --- /dev/null +++ b/patches/gdb/6.8a/120-tdep-opcode-include-workaround.patch @@ -0,0 +1,33 @@ +Original patch from gentoo: gentoo/src/patchsets/gdb/6.8/20_all_gdb-tdep-opcode-include-workaround.patch +-= BEGIN original header =- +workaround build failure + +http://bugs.gentoo.org/216368 + +-= END original header =- +diff -durN gdb-6.8.orig/gdb/frv-tdep.c gdb-6.8/gdb/frv-tdep.c +--- gdb-6.8.orig/gdb/frv-tdep.c 2008-01-11 14:19:59.000000000 +0100 ++++ gdb-6.8/gdb/frv-tdep.c 2008-06-17 16:07:34.000000000 +0200 +@@ -32,7 +32,7 @@ + #include "gdb_assert.h" + #include "sim-regno.h" + #include "gdb/sim-frv.h" +-#include "opcodes/frv-desc.h" /* for the H_SPR_... enums */ ++#include "../opcodes/frv-desc.h" /* for the H_SPR_... enums */ + #include "symtab.h" + #include "elf-bfd.h" + #include "elf/frv.h" +diff -durN gdb-6.8.orig/gdb/mep-tdep.c gdb-6.8/gdb/mep-tdep.c +--- gdb-6.8.orig/gdb/mep-tdep.c 2008-01-11 14:20:02.000000000 +0100 ++++ gdb-6.8/gdb/mep-tdep.c 2008-06-17 16:07:34.000000000 +0200 +@@ -53,8 +53,8 @@ + + /* Get the user's customized MeP coprocessor register names from + libopcodes. */ +-#include "opcodes/mep-desc.h" +-#include "opcodes/mep-opc.h" ++#include "../opcodes/mep-desc.h" ++#include "../opcodes/mep-opc.h" + + + /* The gdbarch_tdep structure. */ diff --git a/patches/gdb/6.8a/130-reg-no-longer-active.patch b/patches/gdb/6.8a/130-reg-no-longer-active.patch new file mode 100644 index 0000000..1c7e7e0 --- /dev/null +++ b/patches/gdb/6.8a/130-reg-no-longer-active.patch @@ -0,0 +1,30 @@ +Fix bug reported by Thomas Petazzoni : +See: http://sourceware.org/ml/crossgcc/2009-05/msg00055.html + https://bugzilla.redhat.com/show_bug.cgi?id=436037 + +Fix from: http://cvs.fedoraproject.org/viewvc/devel/gdb/gdb-6.8-bz436037-reg-no-longer-active.patch?revision=1.1 + +diff -d -urpN src.0/gdb/valops.c src.1/gdb/valops.c +--- src.0/gdb/valops.c 2008-07-27 04:00:03.000000000 +0200 ++++ src.1/gdb/valops.c 2008-07-31 15:17:42.000000000 +0200 +@@ -813,10 +813,18 @@ value_assign (struct value *toval, struc + struct frame_info *frame; + int value_reg; + +- /* Figure out which frame this is in currently. */ +- frame = frame_find_by_id (VALUE_FRAME_ID (toval)); + value_reg = VALUE_REGNUM (toval); + ++ /* Figure out which frame this is in currently. */ ++ frame = frame_find_by_id (VALUE_FRAME_ID (toval)); ++ /* "set $reg+=1" should work on programs with no debug info, ++ but frame_find_by_id returns NULL here (RH bug 436037). ++ Use current frame, it represents CPU state in this case. ++ If frame_find_by_id is changed to do it internally ++ (it is contemplated there), remove this. */ ++ if (!frame) ++ frame = get_current_frame (); ++ /* Probably never happens. */ + if (!frame) + error (_("Value being assigned to is no longer active.")); + diff --git a/patches/gdb/6.8a/140-sim-ppc-have-config-h.patch b/patches/gdb/6.8a/140-sim-ppc-have-config-h.patch new file mode 100644 index 0000000..f3723b5 --- /dev/null +++ b/patches/gdb/6.8a/140-sim-ppc-have-config-h.patch @@ -0,0 +1,183 @@ +Fix for canadian cross build of sim/ppc + +Orignal patch info see: http://sources.redhat.com/bugzilla/show_bug.cgi?id=9638 + +diff -urN gdb-6.8-pl1/sim/ppc/Makefile.in gdb-6.8-pl2/sim/ppc/Makefile.in +--- gdb-6.8-pl1/sim/ppc/Makefile.in 2006-05-31 17:14:45.000000000 +0200 ++++ gdb-6.8-pl2/sim/ppc/Makefile.in 2008-09-30 15:56:33.000000000 +0200 +@@ -61,7 +61,7 @@ + AR = @AR@ + AR_FLAGS = rc + CC = @CC@ +-CFLAGS = @CFLAGS@ ++CFLAGS = @CFLAGS@ -DHAVE_CONFIG_H + CC_FOR_BUILD = @CC_FOR_BUILD@ + CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ + BISON = bison +@@ -115,8 +115,8 @@ + $(DEVZERO_CFLAGS) + SIM_FPU_CFLAGS = @sim_fpu_cflags@ + +-STD_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(INTL_CFLAGS) $(SIM_FPU_CFLAGS) +-NOWARN_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(SIM_FPU_CFLAGS) ++STD_CFLAGS = $(CFLAGS) -DHAVE_CONFIG_H $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(INTL_CFLAGS) $(SIM_FPU_CFLAGS) ++NOWARN_CFLAGS = $(CFLAGS) -DHAVE_CONFIG_H $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(SIM_FPU_CFLAGS) + BUILD_CFLAGS = $(CFLAGS_FOR_BUILD) $(INCLUDES) $(WARNING_CFLAGS) + + BUILD_LDFLAGS = +diff -urN gdb-6.8-orig/sim/ppc/basics.h gdb-6.8-pl1/sim/ppc/basics.h +--- gdb-6.8-orig/sim/ppc/basics.h 1999-04-16 03:35:08.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/basics.h 2008-09-30 15:12:32.000000000 +0200 +@@ -86,7 +86,9 @@ + + /* Basic configuration */ + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + #include "ppc-config.h" + #include "inline.h" + +diff -urN gdb-6.8-orig/sim/ppc/debug.c gdb-6.8-pl1/sim/ppc/debug.c +--- gdb-6.8-orig/sim/ppc/debug.c 1999-04-16 03:35:08.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/debug.c 2008-09-30 15:12:27.000000000 +0200 +@@ -22,7 +22,9 @@ + #ifndef _DEBUG_C_ + #define _DEBUG_C_ + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + #include "basics.h" + + #ifdef HAVE_STDLIB_H +diff -urN gdb-6.8-orig/sim/ppc/dgen.c gdb-6.8-pl1/sim/ppc/dgen.c +--- gdb-6.8-orig/sim/ppc/dgen.c 1999-04-16 03:35:08.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/dgen.c 2008-09-30 15:12:22.000000000 +0200 +@@ -27,7 +27,9 @@ + #include + #include + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + #include "misc.h" + #include "lf.h" + #include "table.h" +diff -urN gdb-6.8-orig/sim/ppc/filter.c gdb-6.8-pl1/sim/ppc/filter.c +--- gdb-6.8-orig/sim/ppc/filter.c 1999-04-16 03:35:09.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/filter.c 2008-09-30 15:12:15.000000000 +0200 +@@ -21,7 +21,9 @@ + + #include + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + + #ifdef HAVE_STRING_H + #include +diff -urN gdb-6.8-orig/sim/ppc/filter_filename.c gdb-6.8-pl1/sim/ppc/filter_filename.c +--- gdb-6.8-orig/sim/ppc/filter_filename.c 1999-04-16 03:35:08.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/filter_filename.c 2008-09-30 15:12:11.000000000 +0200 +@@ -18,7 +18,9 @@ + + */ + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + #include "ppc-config.h" + #include "filter_filename.h" + +diff -urN gdb-6.8-orig/sim/ppc/igen.c gdb-6.8-pl1/sim/ppc/igen.c +--- gdb-6.8-orig/sim/ppc/igen.c 2003-06-20 05:59:33.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/igen.c 2008-09-30 15:12:06.000000000 +0200 +@@ -25,7 +25,9 @@ + #include "misc.h" + #include "lf.h" + #include "table.h" ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + + #include "filter.h" + +diff -urN gdb-6.8-orig/sim/ppc/inline.c gdb-6.8-pl1/sim/ppc/inline.c +--- gdb-6.8-orig/sim/ppc/inline.c 1999-04-16 03:35:10.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/inline.c 2008-09-30 15:11:58.000000000 +0200 +@@ -22,7 +22,9 @@ + #ifndef _INLINE_C_ + #define _INLINE_C_ + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + #include "ppc-config.h" + + #include "inline.h" +diff -urN gdb-6.8-orig/sim/ppc/lf.c gdb-6.8-pl1/sim/ppc/lf.c +--- gdb-6.8-orig/sim/ppc/lf.c 2002-05-30 17:07:06.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/lf.c 2008-09-30 15:33:35.000000000 +0200 +@@ -23,7 +23,9 @@ + #include + #include + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + #include "misc.h" + #include "lf.h" + +diff -urN gdb-6.8-orig/sim/ppc/misc.c gdb-6.8-pl1/sim/ppc/misc.c +--- gdb-6.8-orig/sim/ppc/misc.c 1999-04-16 03:35:11.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/misc.c 2008-09-30 15:11:54.000000000 +0200 +@@ -23,7 +23,9 @@ + #include + #include + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + #include "misc.h" + + #ifdef HAVE_STDLIB_H +diff -urN gdb-6.8-orig/sim/ppc/misc.h gdb-6.8-pl1/sim/ppc/misc.h +--- gdb-6.8-orig/sim/ppc/misc.h 2002-01-12 11:21:12.000000000 +0100 ++++ gdb-6.8-pl1/sim/ppc/misc.h 2008-09-30 15:11:49.000000000 +0200 +@@ -21,7 +21,9 @@ + + /* Frustrating header junk */ + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + + #include + #include +diff -urN gdb-6.8-orig/sim/ppc/sim-endian.c gdb-6.8-pl1/sim/ppc/sim-endian.c +--- gdb-6.8-orig/sim/ppc/sim-endian.c 1999-04-16 03:35:11.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/sim-endian.c 2008-09-30 15:11:44.000000000 +0200 +@@ -22,7 +22,9 @@ + #ifndef _SIM_ENDIAN_C_ + #define _SIM_ENDIAN_C_ + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + #include "basics.h" + + +diff -urN gdb-6.8-orig/sim/ppc/table.c gdb-6.8-pl1/sim/ppc/table.c +--- gdb-6.8-orig/sim/ppc/table.c 2002-01-12 11:21:12.000000000 +0100 ++++ gdb-6.8-pl1/sim/ppc/table.c 2008-09-30 15:11:38.000000000 +0200 +@@ -25,7 +25,9 @@ + #include + #include + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + #include "misc.h" + #include "lf.h" + #include "table.h" diff --git a/patches/gdb/6.8a/150-handle-stpcpy-define.patch b/patches/gdb/6.8a/150-handle-stpcpy-define.patch new file mode 100644 index 0000000..88d703f --- /dev/null +++ b/patches/gdb/6.8a/150-handle-stpcpy-define.patch @@ -0,0 +1,12 @@ +diff -ru gdb-6.8.orig/bfd/sysdep.h gdb-6.8/bfd/sysdep.h +--- gdb-6.8.orig/bfd/sysdep.h 2007-07-03 16:26:42.000000000 +0200 ++++ gdb-6.8/bfd/sysdep.h 2011-08-21 13:33:47.000000000 +0200 +@@ -131,7 +131,7 @@ + extern PTR realloc (); + #endif + +-#if !HAVE_DECL_STPCPY ++#if !HAVE_DECL_STPCPY && !defined(stpcpy) + extern char *stpcpy (char *__dest, const char *__src); + #endif + diff --git a/patches/gdb/7.0.1/100-sim-ppc-have-config-h.patch b/patches/gdb/7.0.1/100-sim-ppc-have-config-h.patch deleted file mode 100644 index f3723b5..0000000 --- a/patches/gdb/7.0.1/100-sim-ppc-have-config-h.patch +++ /dev/null @@ -1,183 +0,0 @@ -Fix for canadian cross build of sim/ppc - -Orignal patch info see: http://sources.redhat.com/bugzilla/show_bug.cgi?id=9638 - -diff -urN gdb-6.8-pl1/sim/ppc/Makefile.in gdb-6.8-pl2/sim/ppc/Makefile.in ---- gdb-6.8-pl1/sim/ppc/Makefile.in 2006-05-31 17:14:45.000000000 +0200 -+++ gdb-6.8-pl2/sim/ppc/Makefile.in 2008-09-30 15:56:33.000000000 +0200 -@@ -61,7 +61,7 @@ - AR = @AR@ - AR_FLAGS = rc - CC = @CC@ --CFLAGS = @CFLAGS@ -+CFLAGS = @CFLAGS@ -DHAVE_CONFIG_H - CC_FOR_BUILD = @CC_FOR_BUILD@ - CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ - BISON = bison -@@ -115,8 +115,8 @@ - $(DEVZERO_CFLAGS) - SIM_FPU_CFLAGS = @sim_fpu_cflags@ - --STD_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(INTL_CFLAGS) $(SIM_FPU_CFLAGS) --NOWARN_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(SIM_FPU_CFLAGS) -+STD_CFLAGS = $(CFLAGS) -DHAVE_CONFIG_H $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(INTL_CFLAGS) $(SIM_FPU_CFLAGS) -+NOWARN_CFLAGS = $(CFLAGS) -DHAVE_CONFIG_H $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(SIM_FPU_CFLAGS) - BUILD_CFLAGS = $(CFLAGS_FOR_BUILD) $(INCLUDES) $(WARNING_CFLAGS) - - BUILD_LDFLAGS = -diff -urN gdb-6.8-orig/sim/ppc/basics.h gdb-6.8-pl1/sim/ppc/basics.h ---- gdb-6.8-orig/sim/ppc/basics.h 1999-04-16 03:35:08.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/basics.h 2008-09-30 15:12:32.000000000 +0200 -@@ -86,7 +86,9 @@ - - /* Basic configuration */ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "ppc-config.h" - #include "inline.h" - -diff -urN gdb-6.8-orig/sim/ppc/debug.c gdb-6.8-pl1/sim/ppc/debug.c ---- gdb-6.8-orig/sim/ppc/debug.c 1999-04-16 03:35:08.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/debug.c 2008-09-30 15:12:27.000000000 +0200 -@@ -22,7 +22,9 @@ - #ifndef _DEBUG_C_ - #define _DEBUG_C_ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "basics.h" - - #ifdef HAVE_STDLIB_H -diff -urN gdb-6.8-orig/sim/ppc/dgen.c gdb-6.8-pl1/sim/ppc/dgen.c ---- gdb-6.8-orig/sim/ppc/dgen.c 1999-04-16 03:35:08.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/dgen.c 2008-09-30 15:12:22.000000000 +0200 -@@ -27,7 +27,9 @@ - #include - #include - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "misc.h" - #include "lf.h" - #include "table.h" -diff -urN gdb-6.8-orig/sim/ppc/filter.c gdb-6.8-pl1/sim/ppc/filter.c ---- gdb-6.8-orig/sim/ppc/filter.c 1999-04-16 03:35:09.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/filter.c 2008-09-30 15:12:15.000000000 +0200 -@@ -21,7 +21,9 @@ - - #include - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - - #ifdef HAVE_STRING_H - #include -diff -urN gdb-6.8-orig/sim/ppc/filter_filename.c gdb-6.8-pl1/sim/ppc/filter_filename.c ---- gdb-6.8-orig/sim/ppc/filter_filename.c 1999-04-16 03:35:08.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/filter_filename.c 2008-09-30 15:12:11.000000000 +0200 -@@ -18,7 +18,9 @@ - - */ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "ppc-config.h" - #include "filter_filename.h" - -diff -urN gdb-6.8-orig/sim/ppc/igen.c gdb-6.8-pl1/sim/ppc/igen.c ---- gdb-6.8-orig/sim/ppc/igen.c 2003-06-20 05:59:33.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/igen.c 2008-09-30 15:12:06.000000000 +0200 -@@ -25,7 +25,9 @@ - #include "misc.h" - #include "lf.h" - #include "table.h" -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - - #include "filter.h" - -diff -urN gdb-6.8-orig/sim/ppc/inline.c gdb-6.8-pl1/sim/ppc/inline.c ---- gdb-6.8-orig/sim/ppc/inline.c 1999-04-16 03:35:10.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/inline.c 2008-09-30 15:11:58.000000000 +0200 -@@ -22,7 +22,9 @@ - #ifndef _INLINE_C_ - #define _INLINE_C_ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "ppc-config.h" - - #include "inline.h" -diff -urN gdb-6.8-orig/sim/ppc/lf.c gdb-6.8-pl1/sim/ppc/lf.c ---- gdb-6.8-orig/sim/ppc/lf.c 2002-05-30 17:07:06.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/lf.c 2008-09-30 15:33:35.000000000 +0200 -@@ -23,7 +23,9 @@ - #include - #include - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "misc.h" - #include "lf.h" - -diff -urN gdb-6.8-orig/sim/ppc/misc.c gdb-6.8-pl1/sim/ppc/misc.c ---- gdb-6.8-orig/sim/ppc/misc.c 1999-04-16 03:35:11.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/misc.c 2008-09-30 15:11:54.000000000 +0200 -@@ -23,7 +23,9 @@ - #include - #include - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "misc.h" - - #ifdef HAVE_STDLIB_H -diff -urN gdb-6.8-orig/sim/ppc/misc.h gdb-6.8-pl1/sim/ppc/misc.h ---- gdb-6.8-orig/sim/ppc/misc.h 2002-01-12 11:21:12.000000000 +0100 -+++ gdb-6.8-pl1/sim/ppc/misc.h 2008-09-30 15:11:49.000000000 +0200 -@@ -21,7 +21,9 @@ - - /* Frustrating header junk */ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - - #include - #include -diff -urN gdb-6.8-orig/sim/ppc/sim-endian.c gdb-6.8-pl1/sim/ppc/sim-endian.c ---- gdb-6.8-orig/sim/ppc/sim-endian.c 1999-04-16 03:35:11.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/sim-endian.c 2008-09-30 15:11:44.000000000 +0200 -@@ -22,7 +22,9 @@ - #ifndef _SIM_ENDIAN_C_ - #define _SIM_ENDIAN_C_ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "basics.h" - - -diff -urN gdb-6.8-orig/sim/ppc/table.c gdb-6.8-pl1/sim/ppc/table.c ---- gdb-6.8-orig/sim/ppc/table.c 2002-01-12 11:21:12.000000000 +0100 -+++ gdb-6.8-pl1/sim/ppc/table.c 2008-09-30 15:11:38.000000000 +0200 -@@ -25,7 +25,9 @@ - #include - #include - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "misc.h" - #include "lf.h" - #include "table.h" diff --git a/patches/gdb/7.0.1a/100-sim-ppc-have-config-h.patch b/patches/gdb/7.0.1a/100-sim-ppc-have-config-h.patch new file mode 100644 index 0000000..f3723b5 --- /dev/null +++ b/patches/gdb/7.0.1a/100-sim-ppc-have-config-h.patch @@ -0,0 +1,183 @@ +Fix for canadian cross build of sim/ppc + +Orignal patch info see: http://sources.redhat.com/bugzilla/show_bug.cgi?id=9638 + +diff -urN gdb-6.8-pl1/sim/ppc/Makefile.in gdb-6.8-pl2/sim/ppc/Makefile.in +--- gdb-6.8-pl1/sim/ppc/Makefile.in 2006-05-31 17:14:45.000000000 +0200 ++++ gdb-6.8-pl2/sim/ppc/Makefile.in 2008-09-30 15:56:33.000000000 +0200 +@@ -61,7 +61,7 @@ + AR = @AR@ + AR_FLAGS = rc + CC = @CC@ +-CFLAGS = @CFLAGS@ ++CFLAGS = @CFLAGS@ -DHAVE_CONFIG_H + CC_FOR_BUILD = @CC_FOR_BUILD@ + CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ + BISON = bison +@@ -115,8 +115,8 @@ + $(DEVZERO_CFLAGS) + SIM_FPU_CFLAGS = @sim_fpu_cflags@ + +-STD_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(INTL_CFLAGS) $(SIM_FPU_CFLAGS) +-NOWARN_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(SIM_FPU_CFLAGS) ++STD_CFLAGS = $(CFLAGS) -DHAVE_CONFIG_H $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(INTL_CFLAGS) $(SIM_FPU_CFLAGS) ++NOWARN_CFLAGS = $(CFLAGS) -DHAVE_CONFIG_H $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(SIM_FPU_CFLAGS) + BUILD_CFLAGS = $(CFLAGS_FOR_BUILD) $(INCLUDES) $(WARNING_CFLAGS) + + BUILD_LDFLAGS = +diff -urN gdb-6.8-orig/sim/ppc/basics.h gdb-6.8-pl1/sim/ppc/basics.h +--- gdb-6.8-orig/sim/ppc/basics.h 1999-04-16 03:35:08.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/basics.h 2008-09-30 15:12:32.000000000 +0200 +@@ -86,7 +86,9 @@ + + /* Basic configuration */ + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + #include "ppc-config.h" + #include "inline.h" + +diff -urN gdb-6.8-orig/sim/ppc/debug.c gdb-6.8-pl1/sim/ppc/debug.c +--- gdb-6.8-orig/sim/ppc/debug.c 1999-04-16 03:35:08.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/debug.c 2008-09-30 15:12:27.000000000 +0200 +@@ -22,7 +22,9 @@ + #ifndef _DEBUG_C_ + #define _DEBUG_C_ + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + #include "basics.h" + + #ifdef HAVE_STDLIB_H +diff -urN gdb-6.8-orig/sim/ppc/dgen.c gdb-6.8-pl1/sim/ppc/dgen.c +--- gdb-6.8-orig/sim/ppc/dgen.c 1999-04-16 03:35:08.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/dgen.c 2008-09-30 15:12:22.000000000 +0200 +@@ -27,7 +27,9 @@ + #include + #include + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + #include "misc.h" + #include "lf.h" + #include "table.h" +diff -urN gdb-6.8-orig/sim/ppc/filter.c gdb-6.8-pl1/sim/ppc/filter.c +--- gdb-6.8-orig/sim/ppc/filter.c 1999-04-16 03:35:09.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/filter.c 2008-09-30 15:12:15.000000000 +0200 +@@ -21,7 +21,9 @@ + + #include + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + + #ifdef HAVE_STRING_H + #include +diff -urN gdb-6.8-orig/sim/ppc/filter_filename.c gdb-6.8-pl1/sim/ppc/filter_filename.c +--- gdb-6.8-orig/sim/ppc/filter_filename.c 1999-04-16 03:35:08.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/filter_filename.c 2008-09-30 15:12:11.000000000 +0200 +@@ -18,7 +18,9 @@ + + */ + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + #include "ppc-config.h" + #include "filter_filename.h" + +diff -urN gdb-6.8-orig/sim/ppc/igen.c gdb-6.8-pl1/sim/ppc/igen.c +--- gdb-6.8-orig/sim/ppc/igen.c 2003-06-20 05:59:33.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/igen.c 2008-09-30 15:12:06.000000000 +0200 +@@ -25,7 +25,9 @@ + #include "misc.h" + #include "lf.h" + #include "table.h" ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + + #include "filter.h" + +diff -urN gdb-6.8-orig/sim/ppc/inline.c gdb-6.8-pl1/sim/ppc/inline.c +--- gdb-6.8-orig/sim/ppc/inline.c 1999-04-16 03:35:10.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/inline.c 2008-09-30 15:11:58.000000000 +0200 +@@ -22,7 +22,9 @@ + #ifndef _INLINE_C_ + #define _INLINE_C_ + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + #include "ppc-config.h" + + #include "inline.h" +diff -urN gdb-6.8-orig/sim/ppc/lf.c gdb-6.8-pl1/sim/ppc/lf.c +--- gdb-6.8-orig/sim/ppc/lf.c 2002-05-30 17:07:06.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/lf.c 2008-09-30 15:33:35.000000000 +0200 +@@ -23,7 +23,9 @@ + #include + #include + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + #include "misc.h" + #include "lf.h" + +diff -urN gdb-6.8-orig/sim/ppc/misc.c gdb-6.8-pl1/sim/ppc/misc.c +--- gdb-6.8-orig/sim/ppc/misc.c 1999-04-16 03:35:11.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/misc.c 2008-09-30 15:11:54.000000000 +0200 +@@ -23,7 +23,9 @@ + #include + #include + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + #include "misc.h" + + #ifdef HAVE_STDLIB_H +diff -urN gdb-6.8-orig/sim/ppc/misc.h gdb-6.8-pl1/sim/ppc/misc.h +--- gdb-6.8-orig/sim/ppc/misc.h 2002-01-12 11:21:12.000000000 +0100 ++++ gdb-6.8-pl1/sim/ppc/misc.h 2008-09-30 15:11:49.000000000 +0200 +@@ -21,7 +21,9 @@ + + /* Frustrating header junk */ + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + + #include + #include +diff -urN gdb-6.8-orig/sim/ppc/sim-endian.c gdb-6.8-pl1/sim/ppc/sim-endian.c +--- gdb-6.8-orig/sim/ppc/sim-endian.c 1999-04-16 03:35:11.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/sim-endian.c 2008-09-30 15:11:44.000000000 +0200 +@@ -22,7 +22,9 @@ + #ifndef _SIM_ENDIAN_C_ + #define _SIM_ENDIAN_C_ + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + #include "basics.h" + + +diff -urN gdb-6.8-orig/sim/ppc/table.c gdb-6.8-pl1/sim/ppc/table.c +--- gdb-6.8-orig/sim/ppc/table.c 2002-01-12 11:21:12.000000000 +0100 ++++ gdb-6.8-pl1/sim/ppc/table.c 2008-09-30 15:11:38.000000000 +0200 +@@ -25,7 +25,9 @@ + #include + #include + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + #include "misc.h" + #include "lf.h" + #include "table.h" diff --git a/patches/gdb/7.0/100-sim-ppc-have-config-h.patch b/patches/gdb/7.0/100-sim-ppc-have-config-h.patch deleted file mode 100644 index f3723b5..0000000 --- a/patches/gdb/7.0/100-sim-ppc-have-config-h.patch +++ /dev/null @@ -1,183 +0,0 @@ -Fix for canadian cross build of sim/ppc - -Orignal patch info see: http://sources.redhat.com/bugzilla/show_bug.cgi?id=9638 - -diff -urN gdb-6.8-pl1/sim/ppc/Makefile.in gdb-6.8-pl2/sim/ppc/Makefile.in ---- gdb-6.8-pl1/sim/ppc/Makefile.in 2006-05-31 17:14:45.000000000 +0200 -+++ gdb-6.8-pl2/sim/ppc/Makefile.in 2008-09-30 15:56:33.000000000 +0200 -@@ -61,7 +61,7 @@ - AR = @AR@ - AR_FLAGS = rc - CC = @CC@ --CFLAGS = @CFLAGS@ -+CFLAGS = @CFLAGS@ -DHAVE_CONFIG_H - CC_FOR_BUILD = @CC_FOR_BUILD@ - CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ - BISON = bison -@@ -115,8 +115,8 @@ - $(DEVZERO_CFLAGS) - SIM_FPU_CFLAGS = @sim_fpu_cflags@ - --STD_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(INTL_CFLAGS) $(SIM_FPU_CFLAGS) --NOWARN_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(SIM_FPU_CFLAGS) -+STD_CFLAGS = $(CFLAGS) -DHAVE_CONFIG_H $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(INTL_CFLAGS) $(SIM_FPU_CFLAGS) -+NOWARN_CFLAGS = $(CFLAGS) -DHAVE_CONFIG_H $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(SIM_FPU_CFLAGS) - BUILD_CFLAGS = $(CFLAGS_FOR_BUILD) $(INCLUDES) $(WARNING_CFLAGS) - - BUILD_LDFLAGS = -diff -urN gdb-6.8-orig/sim/ppc/basics.h gdb-6.8-pl1/sim/ppc/basics.h ---- gdb-6.8-orig/sim/ppc/basics.h 1999-04-16 03:35:08.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/basics.h 2008-09-30 15:12:32.000000000 +0200 -@@ -86,7 +86,9 @@ - - /* Basic configuration */ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "ppc-config.h" - #include "inline.h" - -diff -urN gdb-6.8-orig/sim/ppc/debug.c gdb-6.8-pl1/sim/ppc/debug.c ---- gdb-6.8-orig/sim/ppc/debug.c 1999-04-16 03:35:08.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/debug.c 2008-09-30 15:12:27.000000000 +0200 -@@ -22,7 +22,9 @@ - #ifndef _DEBUG_C_ - #define _DEBUG_C_ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "basics.h" - - #ifdef HAVE_STDLIB_H -diff -urN gdb-6.8-orig/sim/ppc/dgen.c gdb-6.8-pl1/sim/ppc/dgen.c ---- gdb-6.8-orig/sim/ppc/dgen.c 1999-04-16 03:35:08.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/dgen.c 2008-09-30 15:12:22.000000000 +0200 -@@ -27,7 +27,9 @@ - #include - #include - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "misc.h" - #include "lf.h" - #include "table.h" -diff -urN gdb-6.8-orig/sim/ppc/filter.c gdb-6.8-pl1/sim/ppc/filter.c ---- gdb-6.8-orig/sim/ppc/filter.c 1999-04-16 03:35:09.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/filter.c 2008-09-30 15:12:15.000000000 +0200 -@@ -21,7 +21,9 @@ - - #include - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - - #ifdef HAVE_STRING_H - #include -diff -urN gdb-6.8-orig/sim/ppc/filter_filename.c gdb-6.8-pl1/sim/ppc/filter_filename.c ---- gdb-6.8-orig/sim/ppc/filter_filename.c 1999-04-16 03:35:08.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/filter_filename.c 2008-09-30 15:12:11.000000000 +0200 -@@ -18,7 +18,9 @@ - - */ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "ppc-config.h" - #include "filter_filename.h" - -diff -urN gdb-6.8-orig/sim/ppc/igen.c gdb-6.8-pl1/sim/ppc/igen.c ---- gdb-6.8-orig/sim/ppc/igen.c 2003-06-20 05:59:33.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/igen.c 2008-09-30 15:12:06.000000000 +0200 -@@ -25,7 +25,9 @@ - #include "misc.h" - #include "lf.h" - #include "table.h" -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - - #include "filter.h" - -diff -urN gdb-6.8-orig/sim/ppc/inline.c gdb-6.8-pl1/sim/ppc/inline.c ---- gdb-6.8-orig/sim/ppc/inline.c 1999-04-16 03:35:10.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/inline.c 2008-09-30 15:11:58.000000000 +0200 -@@ -22,7 +22,9 @@ - #ifndef _INLINE_C_ - #define _INLINE_C_ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "ppc-config.h" - - #include "inline.h" -diff -urN gdb-6.8-orig/sim/ppc/lf.c gdb-6.8-pl1/sim/ppc/lf.c ---- gdb-6.8-orig/sim/ppc/lf.c 2002-05-30 17:07:06.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/lf.c 2008-09-30 15:33:35.000000000 +0200 -@@ -23,7 +23,9 @@ - #include - #include - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "misc.h" - #include "lf.h" - -diff -urN gdb-6.8-orig/sim/ppc/misc.c gdb-6.8-pl1/sim/ppc/misc.c ---- gdb-6.8-orig/sim/ppc/misc.c 1999-04-16 03:35:11.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/misc.c 2008-09-30 15:11:54.000000000 +0200 -@@ -23,7 +23,9 @@ - #include - #include - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "misc.h" - - #ifdef HAVE_STDLIB_H -diff -urN gdb-6.8-orig/sim/ppc/misc.h gdb-6.8-pl1/sim/ppc/misc.h ---- gdb-6.8-orig/sim/ppc/misc.h 2002-01-12 11:21:12.000000000 +0100 -+++ gdb-6.8-pl1/sim/ppc/misc.h 2008-09-30 15:11:49.000000000 +0200 -@@ -21,7 +21,9 @@ - - /* Frustrating header junk */ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - - #include - #include -diff -urN gdb-6.8-orig/sim/ppc/sim-endian.c gdb-6.8-pl1/sim/ppc/sim-endian.c ---- gdb-6.8-orig/sim/ppc/sim-endian.c 1999-04-16 03:35:11.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/sim-endian.c 2008-09-30 15:11:44.000000000 +0200 -@@ -22,7 +22,9 @@ - #ifndef _SIM_ENDIAN_C_ - #define _SIM_ENDIAN_C_ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "basics.h" - - -diff -urN gdb-6.8-orig/sim/ppc/table.c gdb-6.8-pl1/sim/ppc/table.c ---- gdb-6.8-orig/sim/ppc/table.c 2002-01-12 11:21:12.000000000 +0100 -+++ gdb-6.8-pl1/sim/ppc/table.c 2008-09-30 15:11:38.000000000 +0200 -@@ -25,7 +25,9 @@ - #include - #include - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "misc.h" - #include "lf.h" - #include "table.h" diff --git a/patches/gdb/7.0a/100-sim-ppc-have-config-h.patch b/patches/gdb/7.0a/100-sim-ppc-have-config-h.patch new file mode 100644 index 0000000..f3723b5 --- /dev/null +++ b/patches/gdb/7.0a/100-sim-ppc-have-config-h.patch @@ -0,0 +1,183 @@ +Fix for canadian cross build of sim/ppc + +Orignal patch info see: http://sources.redhat.com/bugzilla/show_bug.cgi?id=9638 + +diff -urN gdb-6.8-pl1/sim/ppc/Makefile.in gdb-6.8-pl2/sim/ppc/Makefile.in +--- gdb-6.8-pl1/sim/ppc/Makefile.in 2006-05-31 17:14:45.000000000 +0200 ++++ gdb-6.8-pl2/sim/ppc/Makefile.in 2008-09-30 15:56:33.000000000 +0200 +@@ -61,7 +61,7 @@ + AR = @AR@ + AR_FLAGS = rc + CC = @CC@ +-CFLAGS = @CFLAGS@ ++CFLAGS = @CFLAGS@ -DHAVE_CONFIG_H + CC_FOR_BUILD = @CC_FOR_BUILD@ + CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ + BISON = bison +@@ -115,8 +115,8 @@ + $(DEVZERO_CFLAGS) + SIM_FPU_CFLAGS = @sim_fpu_cflags@ + +-STD_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(INTL_CFLAGS) $(SIM_FPU_CFLAGS) +-NOWARN_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(SIM_FPU_CFLAGS) ++STD_CFLAGS = $(CFLAGS) -DHAVE_CONFIG_H $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(INTL_CFLAGS) $(SIM_FPU_CFLAGS) ++NOWARN_CFLAGS = $(CFLAGS) -DHAVE_CONFIG_H $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(SIM_FPU_CFLAGS) + BUILD_CFLAGS = $(CFLAGS_FOR_BUILD) $(INCLUDES) $(WARNING_CFLAGS) + + BUILD_LDFLAGS = +diff -urN gdb-6.8-orig/sim/ppc/basics.h gdb-6.8-pl1/sim/ppc/basics.h +--- gdb-6.8-orig/sim/ppc/basics.h 1999-04-16 03:35:08.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/basics.h 2008-09-30 15:12:32.000000000 +0200 +@@ -86,7 +86,9 @@ + + /* Basic configuration */ + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + #include "ppc-config.h" + #include "inline.h" + +diff -urN gdb-6.8-orig/sim/ppc/debug.c gdb-6.8-pl1/sim/ppc/debug.c +--- gdb-6.8-orig/sim/ppc/debug.c 1999-04-16 03:35:08.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/debug.c 2008-09-30 15:12:27.000000000 +0200 +@@ -22,7 +22,9 @@ + #ifndef _DEBUG_C_ + #define _DEBUG_C_ + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + #include "basics.h" + + #ifdef HAVE_STDLIB_H +diff -urN gdb-6.8-orig/sim/ppc/dgen.c gdb-6.8-pl1/sim/ppc/dgen.c +--- gdb-6.8-orig/sim/ppc/dgen.c 1999-04-16 03:35:08.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/dgen.c 2008-09-30 15:12:22.000000000 +0200 +@@ -27,7 +27,9 @@ + #include + #include + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + #include "misc.h" + #include "lf.h" + #include "table.h" +diff -urN gdb-6.8-orig/sim/ppc/filter.c gdb-6.8-pl1/sim/ppc/filter.c +--- gdb-6.8-orig/sim/ppc/filter.c 1999-04-16 03:35:09.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/filter.c 2008-09-30 15:12:15.000000000 +0200 +@@ -21,7 +21,9 @@ + + #include + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + + #ifdef HAVE_STRING_H + #include +diff -urN gdb-6.8-orig/sim/ppc/filter_filename.c gdb-6.8-pl1/sim/ppc/filter_filename.c +--- gdb-6.8-orig/sim/ppc/filter_filename.c 1999-04-16 03:35:08.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/filter_filename.c 2008-09-30 15:12:11.000000000 +0200 +@@ -18,7 +18,9 @@ + + */ + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + #include "ppc-config.h" + #include "filter_filename.h" + +diff -urN gdb-6.8-orig/sim/ppc/igen.c gdb-6.8-pl1/sim/ppc/igen.c +--- gdb-6.8-orig/sim/ppc/igen.c 2003-06-20 05:59:33.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/igen.c 2008-09-30 15:12:06.000000000 +0200 +@@ -25,7 +25,9 @@ + #include "misc.h" + #include "lf.h" + #include "table.h" ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + + #include "filter.h" + +diff -urN gdb-6.8-orig/sim/ppc/inline.c gdb-6.8-pl1/sim/ppc/inline.c +--- gdb-6.8-orig/sim/ppc/inline.c 1999-04-16 03:35:10.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/inline.c 2008-09-30 15:11:58.000000000 +0200 +@@ -22,7 +22,9 @@ + #ifndef _INLINE_C_ + #define _INLINE_C_ + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + #include "ppc-config.h" + + #include "inline.h" +diff -urN gdb-6.8-orig/sim/ppc/lf.c gdb-6.8-pl1/sim/ppc/lf.c +--- gdb-6.8-orig/sim/ppc/lf.c 2002-05-30 17:07:06.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/lf.c 2008-09-30 15:33:35.000000000 +0200 +@@ -23,7 +23,9 @@ + #include + #include + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + #include "misc.h" + #include "lf.h" + +diff -urN gdb-6.8-orig/sim/ppc/misc.c gdb-6.8-pl1/sim/ppc/misc.c +--- gdb-6.8-orig/sim/ppc/misc.c 1999-04-16 03:35:11.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/misc.c 2008-09-30 15:11:54.000000000 +0200 +@@ -23,7 +23,9 @@ + #include + #include + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + #include "misc.h" + + #ifdef HAVE_STDLIB_H +diff -urN gdb-6.8-orig/sim/ppc/misc.h gdb-6.8-pl1/sim/ppc/misc.h +--- gdb-6.8-orig/sim/ppc/misc.h 2002-01-12 11:21:12.000000000 +0100 ++++ gdb-6.8-pl1/sim/ppc/misc.h 2008-09-30 15:11:49.000000000 +0200 +@@ -21,7 +21,9 @@ + + /* Frustrating header junk */ + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + + #include + #include +diff -urN gdb-6.8-orig/sim/ppc/sim-endian.c gdb-6.8-pl1/sim/ppc/sim-endian.c +--- gdb-6.8-orig/sim/ppc/sim-endian.c 1999-04-16 03:35:11.000000000 +0200 ++++ gdb-6.8-pl1/sim/ppc/sim-endian.c 2008-09-30 15:11:44.000000000 +0200 +@@ -22,7 +22,9 @@ + #ifndef _SIM_ENDIAN_C_ + #define _SIM_ENDIAN_C_ + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + #include "basics.h" + + +diff -urN gdb-6.8-orig/sim/ppc/table.c gdb-6.8-pl1/sim/ppc/table.c +--- gdb-6.8-orig/sim/ppc/table.c 2002-01-12 11:21:12.000000000 +0100 ++++ gdb-6.8-pl1/sim/ppc/table.c 2008-09-30 15:11:38.000000000 +0200 +@@ -25,7 +25,9 @@ + #include + #include + ++#ifdef HAVE_CONFIG_H + #include "config.h" ++#endif + #include "misc.h" + #include "lf.h" + #include "table.h" diff --git a/patches/gdb/7.2/100-sim-ppc-lz-fix.patch b/patches/gdb/7.2/100-sim-ppc-lz-fix.patch deleted file mode 100644 index 6f08ef8..0000000 --- a/patches/gdb/7.2/100-sim-ppc-lz-fix.patch +++ /dev/null @@ -1,15 +0,0 @@ -Fix for psim build failure due to -lz - -See http://sourceware.org/bugzilla/show_bug.cgi?id=12202 - ---- gdb-7.2.orig/sim/ppc/Makefile.in -+++ gdb-7.2/sim/ppc/Makefile.in -@@ -551,7 +551,7 @@ - PACKAGE_OBJ = @sim_pk_obj@ - - --psim: $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBS) $(LIBINTL_DEP) -+psim: $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBINTL_DEP) - $(CC) $(CFLAGS) $(SIM_CFLAGS) $(LDFLAGS) -o psim$(EXEEXT) main.o $(TARGETLIB) $(BFD_LIB) $(LIBINTL) $(LIBIBERTY_LIB) $(LIBS) - - run: psim diff --git a/patches/gdb/7.2a/100-sim-ppc-lz-fix.patch b/patches/gdb/7.2a/100-sim-ppc-lz-fix.patch new file mode 100644 index 0000000..6f08ef8 --- /dev/null +++ b/patches/gdb/7.2a/100-sim-ppc-lz-fix.patch @@ -0,0 +1,15 @@ +Fix for psim build failure due to -lz + +See http://sourceware.org/bugzilla/show_bug.cgi?id=12202 + +--- gdb-7.2.orig/sim/ppc/Makefile.in ++++ gdb-7.2/sim/ppc/Makefile.in +@@ -551,7 +551,7 @@ + PACKAGE_OBJ = @sim_pk_obj@ + + +-psim: $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBS) $(LIBINTL_DEP) ++psim: $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBINTL_DEP) + $(CC) $(CFLAGS) $(SIM_CFLAGS) $(LDFLAGS) -o psim$(EXEEXT) main.o $(TARGETLIB) $(BFD_LIB) $(LIBINTL) $(LIBIBERTY_LIB) $(LIBS) + + run: psim -- cgit v0.10.2-6-g49f6