[packages/fpc] - enhanced gdb patch not to crash with gdb-lib 7.6 - avoid stripping when building with --debug

qboosh qboosh at pld-linux.org
Thu Aug 8 22:02:23 CEST 2013


commit 008ddcda22382416bd43b3a28083794962dcd034
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Aug 8 22:01:43 2013 +0200

    - enhanced gdb patch not to crash with gdb-lib 7.6
    - avoid stripping when building with --debug

 fpc-gdb.patch | 28 ++++++++++++++++++++++++++++
 fpc.spec      |  8 ++++++--
 2 files changed, 34 insertions(+), 2 deletions(-)
---
diff --git a/fpc.spec b/fpc.spec
index 944c71c..80ce20e 100644
--- a/fpc.spec
+++ b/fpc.spec
@@ -156,6 +156,10 @@ install -d fpc-src
 cp -af fpcsrc/* fpc-src
 rm -r fpc-src/{ide,tests}
 
+%if 0%{?debug:1}
+find fpcsrc -name Makefile | xargs %{__sed} -i -e 's/-Xs//'
+%endif
+
 %build
 # use ld.bfd
 [ -d our-ld ] || install -d our-ld
@@ -177,7 +181,7 @@ case "%{_build_cpu}" in
 esac
 
 %{__make} -C fpcsrc compiler_cycle \
-	OPT="$OPTF -Xs -n" \
+	OPT="$OPTF %{!?debug:-Xs} -n" \
 	RELEASE="1" \
 	BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
 	BININSTALLDIR=%{_bindir} \
@@ -185,7 +189,7 @@ esac
 	FPC="$PP" \
 	LINKSMART=YES
 
-%{__make} -C fpcsrc OPT="$OPTF -Xs -n" \
+%{__make} -C fpcsrc OPT="$OPTF %{!?debug:-Xs} -n" \
 	RELEASE="1" \
 	BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
 	BININSTALLDIR=%{_bindir} \
diff --git a/fpc-gdb.patch b/fpc-gdb.patch
index b8e32b0..fea8c03 100644
--- a/fpc-gdb.patch
+++ b/fpc-gdb.patch
@@ -495,3 +495,31 @@
      { 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;
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/fpc.git/commitdiff/008ddcda22382416bd43b3a28083794962dcd034



More information about the pld-cvs-commit mailing list