From: Jakub Bogusz Date: Thu, 8 Aug 2013 20:01:43 +0000 (+0200) Subject: - enhanced gdb patch not to crash with gdb-lib 7.6 X-Git-Tag: auto/th/fpc-2.6.2-2~1 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=008ddcda22382416bd43b3a28083794962dcd034;p=packages%2Ffpc.git - enhanced gdb patch not to crash with gdb-lib 7.6 - avoid stripping when building with --debug --- 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; + 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} \