[packages/fpc] - up to 2.6.4

baggins baggins at pld-linux.org
Sun Nov 16 19:27:19 CET 2014


commit 9a6604f5af214ec4be01e3279d9aa11b97c5fba6
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Nov 16 19:27:10 2014 +0100

    - up to 2.6.4

 fpc-gdb.patch  | 351 ++++++++++++++++++++++++++++++++++++---------------------
 fpc-link.patch |   5 +-
 fpc.spec       |  23 ++--
 3 files changed, 241 insertions(+), 138 deletions(-)
---
diff --git a/fpc.spec b/fpc.spec
index 75b42a8..ad7b660 100644
--- a/fpc.spec
+++ b/fpc.spec
@@ -8,18 +8,18 @@ Summary(pl.UTF-8):	32 bitowy kompilator dla procesorów i386 i m68k
 Summary(ru.UTF-8):	Свободный компилятор Pascal
 Summary(uk.UTF-8):	Вільний компілятор Pascal
 Name:		fpc
-Version:	2.6.2
-Release:	7
+Version:	2.6.4
+Release:	1
 License:	GPL v2+
 Group:		Development/Languages
 Source0:	ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/source/%{name}build-%{version}.tar.gz
-# Source0-md5:	89c7e60db6280f3d5cc006a4a9ff43a9
+# Source0-md5:	403da132aed194fd841d46c3b33b022a
 Source1:	ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/i386-linux/%{name}-%{version}.i386-linux.tar
-# Source1-md5:	3474affc41d6106c498fc5b79f883588
+# Source1-md5:	915f799dd58b5429f06a48d4bd84a9c2
 Source2:	ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/x86_64-linux/%{name}-%{version}.x86_64-linux.tar
-# Source2-md5:	c32c4c8e94aed6f84b34407e7ea84ecd
+# Source2-md5:	ffc3cae4a72b60efb6873b9ce5c8a0f2
 Source3:	ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/powerpc-linux/%{name}-%{version}.powerpc-linux.tar
-# Source3-md5:	07f891e7552aeb21908940b05c3062a3
+# Source3-md5:	28eb428bfaa8a72e49be05ed0efa0081
 Patch0:		%{name}-skip-dev-dot.patch
 Patch1:		%{name}-link.patch
 Patch2:		%{name}-gdb.patch
@@ -30,8 +30,10 @@ BuildRequires:	gpm-devel
 BuildRequires:	ncurses-devel
 BuildRequires:	rpmbuild(macros) >= 1.213
 %if %{with ide}
+BuildRequires:	babeltrace-devel
 BuildRequires:	expat-devel
 BuildRequires:	gdb-lib >= 7.2-7
+BuildRequires:	guile-devel
 BuildRequires:	python-devel
 BuildRequires:	readline-devel
 BuildRequires:	libselinux-devel
@@ -156,9 +158,12 @@ install -d fpc-src
 cp -af fpcsrc/* fpc-src
 rm -r fpc-src/{ide,tests}
 
+find fpcsrc -name Makefile -o -name fpcmake.ini | \
+xargs %{__sed} -i \
 %if 0%{?debug:1}
-find fpcsrc -name Makefile | xargs %{__sed} -i -e 's/-Xs//'
+-e 's/-Xs//' \
 %endif
+-e 's|/usr/lib/|%{_libdir}/|g'
 
 %build
 # use ld.bfd
@@ -169,6 +174,7 @@ export PATH=$(pwd)/our-ld:$PATH
 PP=`pwd`/bin/lib/%{name}/%{_bver}/ppc%{_bname}
 NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
 NEWFPDOC=`pwd`/fpcsrc/utils/fpdoc/fpdoc
+DATA2INC=`pwd`/fpcsrc/utils/data2inc
 
 # DO NOT PUT $RPM_OPT_FLAGS IN OPT, IT DOES NOT WORK - baggins
 case "%{_build_cpu}" in
@@ -185,6 +191,7 @@ esac
 	RELEASE="1" \
 	BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
 	BININSTALLDIR=%{_bindir} \
+	DATA2INC="$DATA2INC" \
 	PP="$PP" \
 	FPC="$PP" \
 	LINKSMART=YES
@@ -194,10 +201,10 @@ esac
 	BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
 	BININSTALLDIR=%{_bindir} \
 	GDBLIBDIR=%{_libdir} \
+	DATA2INC="$DATA2INC" \
 	PP="$NEWPP" \
 	FPC="$NEWPP" \
 	FPDOC=$NEWFPDOC \
-	DATA2INC=`pwd`/utils/data2inc \
 	LINKSMART=YES \
 	NODOCS=YES \
 	rtl_clean \
diff --git a/fpc-gdb.patch b/fpc-gdb.patch
index fea8c03..082c8a8 100644
--- a/fpc-gdb.patch
+++ b/fpc-gdb.patch
@@ -1,5 +1,5 @@
---- fpcbuild-2.6.2/fpcsrc/packages/gdbint/src/gdbint.pp.orig	2013-08-07 20:58:05.756050489 +0200
-+++ fpcbuild-2.6.2/fpcsrc/packages/gdbint/src/gdbint.pp	2013-08-07 21:09:31.746021701 +0200
+--- fpcbuild-2.6.4/fpcsrc/packages/gdbint/src/gdbint.pp.orig	2013-08-07 20:58:05.756050489 +0200
++++ fpcbuild-2.6.4/fpcsrc/packages/gdbint/src/gdbint.pp	2013-08-07 21:09:31.746021701 +0200
 @@ -14,6 +14,7 @@
  unit GdbInt;
  
@@ -8,7 +8,7 @@
  
  {$define NotImplemented}
  
-@@ -39,83 +40,56 @@
+@@ -39,83 +40,94 @@
  
  interface
  
@@ -25,18 +25,28 @@
 -  {$define GDB_V6}
 -  {$undef GDB_HAS_DEPRECATED_CBPH}
 -{$endif def GDB_V601}
--
+ 
 -{ 6.2.x }
 -{$ifdef GDB_V602}
 -  {$info using gdb 6.2.x}
 -  {$define GDB_V6}
 -{$endif def GDB_V602}
--
++{
++  Excatly one
++  GDB_VXYZ macro
++  where XYZ are three numbers
++  needs to defined
++  either inside gdblib.inc or gdbver.inc
++  This corresponds to version
++  X.YZ.patch_level
++}
+ 
 -{ 6.3.x }
 -{$ifdef GDB_V603}
 -  {$info using gdb 6.3.x}
 -  {$define GDB_V6}
 -{$endif def GDB_V603}
++{$undef GDB_VERSION_RECOGNIZED}
  
 -{ 6.4.x }
 -{$ifdef GDB_V604}
@@ -44,15 +54,12 @@
 -  {$define GDB_V6}
 -  {$define GDB_NEEDS_NO_ERROR_INIT}
 -{$endif def GDB_V604}
-+{
-+  Excatly one
-+  GDB_VXYZ macro
-+  where XYZ are three numbers
-+  needs to defined
-+  either inside gdblib.inc or gdbver.inc
-+  This corresponds to version
-+  X.YZ.patch_level
-+}
++{ 7.9.x }
++{$ifdef GDB_V709}
++  {$info using gdb 7.9.x}
++  {$define GDB_VERSION_RECOGNIZED}
++  {$define GDB_VER_GE_709}
++{$endif}
  
 -{ 6.5.x }
 -{$ifdef GDB_V605}
@@ -60,7 +67,9 @@
 -  {$define GDB_V6}
 -  {$define GDB_NEEDS_NO_ERROR_INIT}
 -{$endif def GDB_V605}
-+{$undef GDB_VERSION_RECOGNIZED}
++{$ifdef GDB_VER_GE_709}
++  {$define GDB_VER_GE_708}
++{$endif}
  
 -{ 6.6.x }
 -{$ifdef GDB_V606}
@@ -71,11 +80,11 @@
 -  {$define GDB_USES_EXPAT_LIB}
 -  {$define GDB_HAS_DEBUG_FILE_DIRECTORY}
 -{$endif def GDB_V606}
-+{ 7.6.x }
-+{$ifdef GDB_V706}
-+  {$info using gdb 7.6.x}
++{ 7.8.x }
++{$ifdef GDB_V708}
++  {$info using gdb 7.8.x}
 +  {$define GDB_VERSION_RECOGNIZED}
-+  {$define GDB_VER_GE_706}
++  {$define GDB_VER_GE_708}
 +{$endif}
  
 -{ 6.7.x }
@@ -87,14 +96,10 @@
 -  {$define GDB_USES_EXPAT_LIB}
 -  {$define GDB_HAS_DEBUG_FILE_DIRECTORY}
 -{$endif def GDB_V607}
-+{$ifdef GDB_VER_GE_706}
-+  {$define GDB_VER_GE_705}
-+{$endif}
-+{ 7.5.x }
-+{$ifdef GDB_V705}
-+  {$info using gdb 7.5.x}
-+  {$define GDB_VERSION_RECOGNIZED}
-+  {$define GDB_VER_GE_705}
++{$ifdef GDB_VER_GE_708}
++  {$define USE_CATCH_EXCEPTIONS}
++  {$define USE_LOCAL_SET_GDB_DATA_DIRECTORY}
++  {$define GDB_VER_GE_707}
 +{$endif}
  
 -{ 6.8.x }
@@ -110,10 +115,41 @@
 -  // {$define GDB_HAS_OBSERVER_NOTIFY_BREAKPOINT_CREATED}
 -  {$define GDB_HAS_BP_NONE}
 -{$endif def GDB_V608}
++{ 7.7.x }
++{$ifdef GDB_V707}
++  {$info using gdb 7.7.x}
++  {$define GDB_VERSION_RECOGNIZED}
++  {$define GDB_VER_GE_707}
++{$endif}
++
++{$ifdef GDB_VER_GE_707}
++  {$define GDB_VER_GE_706}
++{$endif}
++
++{ 7.6.x }
++{$ifdef GDB_V706}
++  {$info using gdb 7.6.x}
++  {$define GDB_VERSION_RECOGNIZED}
++  {$define GDB_VER_GE_706}
++{$endif}
++
++{$ifdef GDB_VER_GE_706}
++  {$define GDB_UI_FILE_HAS_FSEEK}
++  {$define GDB_VER_GE_705}
++{$endif}
++
++{ 7.5.x }
++{$ifdef GDB_V705}
++  {$info using gdb 7.5.x}
++  {$define GDB_VERSION_RECOGNIZED}
++  {$define GDB_VER_GE_705}
++{$endif}
++
 +{$ifdef GDB_VER_GE_705}
 +  {$define GDB_VER_GE_704}
 +  {$define GDB_BP_LOCATION_HAS_COND_BYTECODE}
 +  {$define GDB_BP_LOCATION_HAS_RELATED_ADDRESS}
++  {$define GDB_BP_HAS_ENABLE_COUNT}
 +{$endif}
  
  { 7.4.x }
@@ -127,7 +163,7 @@
    {$define GDB_V7}
    {$define GDB_BP_LOCATION_HAS_GDBARCH}
    {$define GDB_HAS_PROGRAM_SPACE}
-@@ -131,11 +105,12 @@
+@@ -131,11 +143,12 @@
    {$ifdef win32}
        {$define GDB_USES_LIBADVAPI32}
    {$endif win32}
@@ -141,7 +177,7 @@
    {$define GDB_V7}
    {$define GDB_BP_LOCATION_HAS_GDBARCH}
    {$define GDB_HAS_PROGRAM_SPACE}
-@@ -150,11 +125,13 @@
+@@ -150,11 +163,13 @@
      {$define GDB_BP_LOCATION_HAS_OPS}
      {$define GDB_UI_FILE_HAS_WRITE_ASYNC}
    {$endif GDB_CVS}
@@ -155,7 +191,7 @@
    {$define GDB_V7}
    {$define GDB_BP_LOCATION_HAS_GDBARCH}
    {$define GDB_HAS_PROGRAM_SPACE}
-@@ -163,6 +140,7 @@
+@@ -163,6 +178,7 @@
  { 7.1.x }
  {$ifdef GDB_V701}
    {$info using gdb 7.1.x}
@@ -163,7 +199,7 @@
    {$define GDB_V7}
    {$define GDB_BP_LOCATION_HAS_GDBARCH}
    {$define GDB_HAS_PROGRAM_SPACE}
-@@ -173,6 +151,7 @@
+@@ -173,6 +189,7 @@
  { 7.0.x }
  {$ifdef GDB_V700}
    {$info using gdb 7.0.x}
@@ -171,7 +207,7 @@
    {$define GDB_V7}
    {$ifdef GDB_CVS}
      {$define GDB_BP_LOCATION_HAS_GDBARCH}
-@@ -197,9 +176,92 @@
+@@ -197,9 +214,92 @@
    {$define GDB_HAS_OBSERVER_NOTIFY_BREAKPOINT_CREATED}
    {$define GDB_TARGET_CLOSE_HAS_PTARGET_ARG}
    {$define GDB_HAS_BP_NONE}
@@ -213,7 +249,7 @@
 +  {$define GDB_USES_BP_LOCATION}
 +  {$define GDB_NEEDS_NO_ERROR_INIT}
 +  {$define GDB_USES_EXPAT_LIB}
-+  {$define GDB_HAS_DEBUG_FILE_DIRECTORY}
++  {Official 6.6 release doesn't have GDB_HAS_DEBUG_FILE_DIRECTORY}
 +{$endif def GDB_V606}
 +
 +{ 6.5.x }
@@ -264,7 +300,7 @@
  {$ifdef GDB_V6}
    {$define GDB_HAS_SYSROOT}
    {$define GDB_HAS_DB_COMMANDS}
-@@ -207,6 +269,10 @@
+@@ -207,6 +307,10 @@
    {$define GDB_INIT_HAS_ARGV0}
  {$endif GDB_V6}
  
@@ -275,7 +311,61 @@
  
  {$ifdef GDB_HAS_OBSERVER_NOTIFY_BREAKPOINT_CREATED}
    {$define DO_NOT_USE_CBPH}
-@@ -961,7 +1027,7 @@
+@@ -426,9 +530,9 @@
+ {$ifdef NotImplemented}
+   {$undef NotImplemented}
+   {$LINKLIB libgdb.a}
+- {$ifdef GDB_HAS_SIM}
+-  {$LINKLIB libsim.a}
+- {$endif GDB_HAS_SIM}
++  {$ifdef GDB_HAS_SIM}
++   {$LINKLIB libsim.a}
++  {$endif GDB_HAS_SIM}
+   {$LINKLIB libbfd.a}
+   {$LINKLIB libreadline.a}
+   {$LINKLIB libopcodes.a}
+@@ -552,6 +656,11 @@
+   {$LINKLIB gcc}
+ {$endif beos}
+ 
++{$ifdef aix}
++  { AIX linker requires more precise external/public separation }
++  {$define NEED_EXTERNAL_CVAR}
++  {$undef NotImplemented}
++{$endif aix}
+ 
+ {$ifdef go32v2}
+   {$define supportexceptions}
+@@ -631,6 +740,9 @@
+   {$ifdef GDB_V6}
+   ui_file_read_ftype = function (stream : pui_file; buffer : pchar; len : longint):longint;cdecl;
+   {$endif}
++  {$ifdef GDB_UI_FILE_HAS_FSEEK}
++  ui_file_fseek_ftype = function (stream : pui_file; offset : longint{clong}; whence : longint {cint}) : longint{cint};cdecl;
++  {$endif GDB_UI_FILE_HAS_FSEEK}
+ 
+   ui_file = record
+       magic : plongint;
+@@ -647,6 +759,9 @@
+       to_isatty : ui_file_isatty_ftype;
+       to_rewind : ui_file_rewind_ftype;
+       to_put    : ui_file_put_ftype;
++     {$ifdef GDB_UI_FILE_HAS_FSEEK}
++     to_fseek   : ui_file_fseek_ftype;
++     {$endif GDB_UI_FILE_HAS_FSEEK}
+       to_data   : pointer;
+     end;
+ 
+@@ -822,6 +937,8 @@
+ var
+   cli_uiout : ui_out;cvar;external;
+   current_uiout : ui_out;cvar;external;
++  { out local copy for catch_exceptions call }
++  our_uiout : ui_out;
+ {$endif GDB_NO_UIOUT}
+ function cli_out_new (stream : pui_file):ui_out;cdecl;external;
+ {$endif GDB_V6}
+@@ -960,7 +1077,7 @@
       pprogram_space = pointer;
       pgdbarch = pointer;
  
@@ -284,7 +374,19 @@
       pbreakpoint = ^breakpoint;
       breakpoint = record
  {$ifdef GDB_USES_BP_OPS}
-@@ -1022,6 +1088,9 @@
+@@ -984,8 +1101,10 @@
+ {$ifdef GDB_USES_BP_OPS}
+           display_canonical: byte;
+ {$endif GDB_USES_BP_OPS}
+-
+           ignore_count : longint;
++{$ifdef GDB_BP_HAS_ENABLE_COUNT}
++          enable_count : longint;
++{$endif GDB_BP_HAS_ENABLE_COUNT}
+ {$ifndef GDB_USES_BP_LOCATION}
+           shadow_contents : array[0..15] of char;
+           inserted : char;
+@@ -1021,6 +1140,9 @@
            section : pointer; {^asection}
         end;
  
@@ -294,7 +396,7 @@
       bp_target_info = record
            placed_address_space : pointer;{paddress_space;}
            placed_address : CORE_ADDR;
-@@ -1050,6 +1119,12 @@
+@@ -1049,6 +1171,12 @@
           owner : pbreakpoint;
  {$ifdef GDB_BP_LOCATION_HAS_GLOBAL_NEXT}
           cond : pointer;{pexpression;}
@@ -307,7 +409,7 @@
           shlib_disabled : byte;
           enabled : byte;
  {$endif GDB_BP_LOCATION_HAS_GLOBAL_NEXT}
-@@ -1068,6 +1143,10 @@
+@@ -1067,6 +1195,10 @@
  {$endif GDB_BP_LOCATION_HAS_GLOBAL_NEXT}
           section : pointer;{pobj_section;}
           requested_address : CORE_ADDR;
@@ -318,16 +420,18 @@
  {$ifdef GDB_BP_LOCATION_HAS_GLOBAL_NEXT}
           function_name : ^char;
  {$endif GDB_BP_LOCATION_HAS_GLOBAL_NEXT}
-@@ -1122,6 +1201,8 @@
+@@ -1121,6 +1253,10 @@
              avoid stack memory corruption PM }
            explicit_pc : longint;
            explicit_line : longint;
 +          { New field added in GDB 7.5 version }
 +          probe : pointer;{struct probe *probe; }
++          { New field added in GDB 7.8? version }
++          objfile : pointer; { struct objfile * }
         end;
  
       symtabs_and_lines = record
-@@ -1567,7 +1648,7 @@
+@@ -1566,7 +1702,7 @@
            to_magic : longint;
         end;
  
@@ -336,7 +440,17 @@
  
  {*****************************************************************************
                     Define external calls to libgdb.a
-@@ -1616,9 +1697,17 @@
+@@ -1576,7 +1712,8 @@
+ { external variables }
+   error_return : jmp_buf;cvar;public;
+   quit_return  : jmp_buf;cvar;public;
+-  deprecated_query_hook : pointer;cvar;public;
++  deprecated_query_hook : pointer;cvar;
++{$ifdef NEED_EXTERNAL_CVAR}external;{$else}public;{$endif}
+ 
+   {$ifndef GDB_HAS_OBSERVER_NOTIFY_BREAKPOINT_CREATED}
+     {$ifdef GDB_HAS_DEPRECATED_CBPH}
+@@ -1615,9 +1752,17 @@
  var
    instream : P_C_FILE;cvar;external;
    function gdb_fopen (filename : pchar; mode : pchar) : pui_file;cdecl;external;
@@ -355,7 +469,7 @@
      and instanciated in main.c since version 5.0 }
    gdb_stdout : pui_file;cvar;public;
    gdb_stderr : pui_file;cvar;public;
-@@ -1640,7 +1729,11 @@
+@@ -1639,7 +1784,11 @@
  { xvasprintf is present at least from GDB 5.3
    while xstrvprintf only appears in version 6.2,
    so only use xvasprintf function }
@@ -367,7 +481,7 @@
  procedure xfree(p : pointer); cdecl; external;
  function  find_pc_line(i:CORE_ADDR;l:longint):symtab_and_line;cdecl;external;
  function  find_pc_function(i:CORE_ADDR):psymbol;cdecl;external;
-@@ -2022,6 +2115,13 @@
+@@ -2021,6 +2170,13 @@
      stop_breakpoint_number:=num;
  end;
  
@@ -381,7 +495,7 @@
  
  procedure annotate_watchpoint(num:longint);cdecl;public;
  begin
-@@ -2359,6 +2459,14 @@
+@@ -2358,6 +2514,14 @@
  {$endif}
  end;
  
@@ -396,7 +510,7 @@
  procedure annotate_display_begin;cdecl;public;
  begin
  {$ifdef Verbose}
-@@ -2528,7 +2636,11 @@
+@@ -2527,7 +2691,11 @@
          QueryHook:=1
        else if pos('%',question)>0 then
          begin
@@ -408,62 +522,45 @@
            { xvasprintf can failed, in that case local is set to nil }
            if not assigned(local) then
              local:=question;
-@@ -3117,32 +3229,48 @@
+@@ -2752,6 +2920,16 @@
+ var
+    top_level_val : longint;
  
++{$ifdef USE_CATCH_EXCEPTIONS}
++function catch_exceptions(uiout : ui_out; func : pointer; command : pchar; mask : longint) : longint;cdecl;external;
++
++function gdbint_execute_command(uiout : ui_out; command : pchar) : longint;cdecl;
++begin
++  gdbint_execute_command:=1;
++  execute_command(command,1);
++  gdbint_execute_command:=0;
++end;
++{$else not USE_CATCH_EXCEPTIONS}
+ function catch_command_errors(func : pointer; command : pchar; from_tty,mask : longint) : longint;cdecl;external;
+ 
+ function gdbint_execute_command(command : pchar; from_tty : longint) : longint;cdecl;
+@@ -2760,6 +2938,7 @@
+   execute_command(command,from_tty);
+   gdbint_execute_command:=0;
+ end;
++{$endif not USE_CATCH_EXCEPTIONS}
+ 
+ {$ifdef cpui386}
+ type
+@@ -2861,8 +3040,12 @@
+    begin
+      quit_return:=error_return;
+      mask:=longint($ffffffff);
++{$ifdef USE_CATCH_EXCEPTIONS}
++     catch_exceptions(our_uiout, @gdbint_execute_command, at command,mask);
++{$else i.e. not USE_CATCH_EXCEPTIONS}
+      catch_command_errors(@gdbint_execute_command, at command,
+        1,mask);
++{$endif not def USE_CATCH_EXCEPTIONS}
  {$ifdef go32v2}
- var
--  c_environ : ppchar;external name '_environ';
-+  c_environ : ppchar;external name '__environ';
-   c_argc : longint;external name '___crt0_argc';
-   c_argv : ppchar;external name '___crt0_argv';
- 
-   procedure ReallocateEnvironUsingCMalloc;
- 
-   var
--    neededsize , count : longint;
-+    neededsize , i, count : longint;
-     penv : pchar;
-     newenv : ppchar;
-   begin
-     if not assigned(c_environ) then
--      neededsize:=0
-+      neededsize:=sizeof(pchar)
-     else
-       begin
-         count:=0;
--        penv:=c_environ^;
-+        penv:=c_environ[count];
-         while assigned(penv) do
-           begin
-             inc(count);
--            inc(penv,sizeof(pchar));
-+            penv:=c_environ[count];
-           end;
-+        inc(count);
-         neededsize:=count*sizeof(pchar);
-       end;
-     newenv:=malloc(neededsize);
--    system.move(c_environ,newenv,neededsize);
-+    system.move(c_environ^,newenv^,neededsize);
-+    if assigned(c_environ) then
-+      begin
-+        for i:=0 to count-1 do
-+          begin
-+            penv:=c_environ[i];
-+            if assigned(penv) then
-+              begin
-+                neededsize:=strlen(penv)+1;
-+                newenv[i]:=malloc(neededsize);
-+                system.move(penv^,newenv[i]^,neededsize);
-+              end
-+            else
-+              newenv[i]:=nil;
-+          end;
-+      end;
-     c_environ:=newenv;
-   end;
- 
-@@ -3211,6 +3339,10 @@
+      reload_fs;
+ {$endif go32v2}
+@@ -3226,6 +3409,10 @@
      ui_file_delete(gdb_stdin);
    gdb_stdin:=mem_fileopen;
    save_gdb_stdin:=gdb_stdin;
@@ -474,7 +571,7 @@
    dummy_file :=gdb_fopen('dummy.$$$','a');
    {in captured_main code, this is simply
     instream:=stdin; but stdin is a highly system dependent macro
-@@ -3219,6 +3351,7 @@
+@@ -3234,6 +3421,7 @@
      instream:=pstdio_file(dummy_file^.to_data)^._file
    else
      instream:=nil;
@@ -482,7 +579,15 @@
  {$endif GDB_NEEDS_SET_INSTREAM}
  
    gdb_stderr:=mem_fileopen;
-@@ -3313,10 +3446,10 @@
+@@ -3297,6 +3485,7 @@
+ {$ifdef GDB_NO_UIOUT}
+   cli_uiout := cli_out_new (gdb_stdout);
+   current_uiout:=cli_uiout;
++  our_uiout:=cli_uiout;
+ {$endif GDB_NO_UIOUT}
+ {$endif GDB_NEEDS_INTERPRETER_SETUP}
+ {$ifdef supportexceptions}
+@@ -3328,10 +3517,10 @@
      variables that are defined in main.c source.
      We must not load main.o otherwise, we will get
      into multiply defined symbols troubles. }
@@ -495,31 +600,19 @@
      { gdb_sysroot global variable is declared in defs.h and
        instanciated in main.c since version 6.0 }
      gdb_datadir  : pchar; cvar;public;
---- fpcbuild-2.6.2/fpcsrc/packages/gdbint/src/gdbint.pp.orig	2013-08-08 20:14:59.169199840 +0200
-+++ fpcbuild-2.6.2/fpcsrc/packages/gdbint/src/gdbint.pp	2013-08-08 21:50:53.262291698 +0200
-@@ -68,6 +68,7 @@
- 
- {$ifdef GDB_VER_GE_706}
-   {$define GDB_VER_GE_705}
-+  {$define GDB_UI_FILE_HAS_TO_FSEEK}
- {$endif}
- { 7.5.x }
- {$ifdef GDB_V705}
-@@ -695,6 +696,7 @@
-   ui_file_rewind_ftype = procedure(stream : pui_file);cdecl;
-   ui_file_put_method_ftype = procedure(var _object; buffer : pchar;length_buffer : longint);cdecl;
-   ui_file_put_ftype = procedure(stream : pui_file;method : ui_file_put_method_ftype;var context);cdecl;
-+  ui_file_fseek_ftype = function(stream : pui_file; offset : longint; whence  : integer):integer;cdecl;
-   {$ifdef GDB_V6}
-   ui_file_read_ftype = function (stream : pui_file; buffer : pchar; len : longint):longint;cdecl;
-   {$endif}
-@@ -714,6 +716,9 @@
-       to_isatty : ui_file_isatty_ftype;
-       to_rewind : ui_file_rewind_ftype;
-       to_put    : ui_file_put_ftype;
-+      {$ifdef GDB_UI_FILE_HAS_TO_FSEEK}
-+      to_fseek  : ui_file_fseek_ftype;
-+      {$endif}
-       to_data   : pointer;
-     end;
- 
+@@ -3358,6 +3547,15 @@
+   debug_file_directory : pchar; cvar; external;
+ {$endif GDB_HAS_DEBUG_FILE_DIRECTORY}
+ 
++{$ifdef USE_LOCAL_SET_GDB_DATA_DIRECTORY}
++{ Avoid loading of main.o object by providing a
++  stripped down version of relocate_gdb_directory function }
++procedure set_gdb_data_directory(path : pchar); cdecl; public;
++begin
++  gdb_datadir:=path;
++end;
++{$endif USE_LOCAL_SET_GDB_DATA_DIRECTORY}
++
+ begin
+ {$ifdef GDB_HAS_SYSROOT}
+   gdb_sysrootc := #0;
diff --git a/fpc-link.patch b/fpc-link.patch
index d73e584..c3beed4 100644
--- a/fpc-link.patch
+++ b/fpc-link.patch
@@ -1,6 +1,6 @@
 --- fpcbuild-2.6.2/fpcsrc/packages/gdbint/src/gdbint.pp.orig	2012-10-29 11:20:11.000000000 +0100
 +++ fpcbuild-2.6.2/fpcsrc/packages/gdbint/src/gdbint.pp	2013-04-01 18:28:20.664497672 +0200
-@@ -266,10 +266,13 @@
+@@ -266,10 +266,16 @@
      {$LINKLIB libsim.a}
    {$endif GDB_HAS_SIM}
 -  {$LINKLIB libbfd.a}
@@ -11,6 +11,9 @@
 +  {$LINKLIB opcodes}
 +  {$LINKLIB readline}
 +  {$LINKLIB history}
++  {$LINKLIB guile-2.0}
++  {$LINKLIB babeltrace}
++  {$LINKLIB babeltrace-ctf}
    {$LINKLIB libiberty.a}
 +  {$LINKLIB selinux}
 +  {$LINKLIB z}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/fpc.git/commitdiff/9a6604f5af214ec4be01e3279d9aa11b97c5fba6



More information about the pld-cvs-commit mailing list