]> git.pld-linux.org Git - packages/fpc.git/commitdiff
- enhanced gdb patch not to crash with gdb-lib 7.6
authorJakub Bogusz <qboosh@pld-linux.org>
Thu, 8 Aug 2013 20:01:43 +0000 (22:01 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Thu, 8 Aug 2013 20:01:43 +0000 (22:01 +0200)
- avoid stripping when building with --debug

fpc-gdb.patch
fpc.spec

index b8e32b0fe12b95f05da4875892ebcfc255b5de8c..fea8c03b4b59d2872a47c64d17cec576c583b78e 100644 (file)
      { 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;
index 944c71cfa74774cf03b8d6b72ad71d695de1fd0e..80ce20e536f1dbbb4354a69de01792af0bff5f20 100644 (file)
--- 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} \
This page took 0.115302 seconds and 4 git commands to generate.