On 19/03/16 12:26, peter green wrote:
This seems to be a result of the recent pic related backports. I'm
working on a fix now.
ok, the first thing I did was move globtype (which provides TSymStr)
from the implementation uses to the interface uses so it would be
available at that line.
However I then discovered that the signature of the function in the new
patch did not match the signature of the function it was overriding.
From the patch:
function a_call_name(list: TAsmList; pd: tprocdef; const s: TSymStr;
const paras: array of pcgpara; forceresdef: tdef; weak: boolean):
tcgpara; override;
The overridden function.
function a_call_name(list : TAsmList;pd : tprocdef;const s : TSymStr;
forceresdef: tdef; weak: boolean): tcgpara;override;
The only thing that was done with the parameter was to pass it through
to the inherited function so I simply got rid of it.
The build then failed with
/usr/bin/ppc386 -Ur -Xs -O2 -n -Fui386 -Fusystems
-Fu/fpc-3.0.0+dfsg/fpcsrc/rtl/units/i386-linux -Fii386 -FE.
-FUi386/units/i386-linux -dRELEASE
@/fpc-3.0.0+dfsg/debian/deb-host-fpc.cfg -di386 -dGDB -dBROWSERLOG
-Fux86 -Sew pp.pas
hlcgcpu.pas(187,21) Error: Identifier not found "po_external"
hlcgcpu.pas(192,21) Error: Identifier not found "taicpu"
hlcgcpu.pas(232) Fatal: There were 2 errors compiling module, stopping
That was easy enough to fix, just adding a couple of things to the
implementation uses.
The result of that was a successful build, I have not done any
functional tests of the result yet. Debdiff attached, if someone else
wants to test and commit/upload feel free to go ahead if not i'll do it
when I get around to it.
I also notice some junk in the debdiff, presumablly the clean target
needs work.
diff -Nru fpc-3.0.0+dfsg/debian/changelog fpc-3.0.0+dfsg/debian/changelog
--- fpc-3.0.0+dfsg/debian/changelog 2016-03-18 07:49:05.000000000 +0000
+++ fpc-3.0.0+dfsg/debian/changelog 2016-03-19 13:50:15.000000000 +0000
@@ -1,3 +1,13 @@
+fpc (3.0.0+dfsg-4) unstable; urgency=medium
+
+ * modify
debian/patches/Keep-the-GOT-offset-in-a-virtual-register-for-i386-n.patch
+ for compatibility with fpc 3.0.0 to fix FTBFS on i386
+ + move globtype from implementation uses to interface uses in hlcgcpu.pas
+ + remove "paras" parameter from thlcgcpu.a_call_name
+ + Add symconst and aasmcpu to implementation uses in hlcgcpu.pas
+
+ -- Peter Michael Green <plugw...@debian.org> Sat, 19 Mar 2016 12:22:05 +0000
+
fpc (3.0.0+dfsg-3) unstable; urgency=medium
[ Paul Gevers ]
diff -Nru fpc-3.0.0+dfsg/debian/fp-compiler-3.0.0.lintian-overrides
fpc-3.0.0+dfsg/debian/fp-compiler-3.0.0.lintian-overrides
--- fpc-3.0.0+dfsg/debian/fp-compiler-3.0.0.lintian-overrides 1970-01-01
01:00:00.000000000 +0100
+++ fpc-3.0.0+dfsg/debian/fp-compiler-3.0.0.lintian-overrides 2016-03-19
13:32:21.000000000 +0000
@@ -0,0 +1,5 @@
+# Free pascal binaries are often statically linked.
+# The Free Pascal Compiler does not properly support linking. Please
+# see BTS #472304.
+fp-compiler-3.0.0 binary: statically-linked-binary
+fp-compiler-3.0.0: statically-linked-binary
diff -Nru fpc-3.0.0+dfsg/debian/fpc-source-3.0.0.lintian-overrides
fpc-3.0.0+dfsg/debian/fpc-source-3.0.0.lintian-overrides
--- fpc-3.0.0+dfsg/debian/fpc-source-3.0.0.lintian-overrides 1970-01-01
01:00:00.000000000 +0100
+++ fpc-3.0.0+dfsg/debian/fpc-source-3.0.0.lintian-overrides 2016-03-19
13:32:21.000000000 +0000
@@ -0,0 +1,2 @@
+# False positive, this is a Pascal header file
+fpc-source-3.0.0: extra-license-file
diff -Nru fpc-3.0.0+dfsg/debian/fp-ide-3.0.0.lintian-overrides
fpc-3.0.0+dfsg/debian/fp-ide-3.0.0.lintian-overrides
--- fpc-3.0.0+dfsg/debian/fp-ide-3.0.0.lintian-overrides 1970-01-01
01:00:00.000000000 +0100
+++ fpc-3.0.0+dfsg/debian/fp-ide-3.0.0.lintian-overrides 2016-03-19
13:32:21.000000000 +0000
@@ -0,0 +1,3 @@
+# Free pascal binaries are often statically linked.
+fp-ide-3.0.0 binary: statically-linked-binary
+fp-ide-3.0.0: statically-linked-binary
diff -Nru fpc-3.0.0+dfsg/debian/fp-units-rtl-3.0.0.lintian-overrides
fpc-3.0.0+dfsg/debian/fp-units-rtl-3.0.0.lintian-overrides
--- fpc-3.0.0+dfsg/debian/fp-units-rtl-3.0.0.lintian-overrides 1970-01-01
01:00:00.000000000 +0100
+++ fpc-3.0.0+dfsg/debian/fp-units-rtl-3.0.0.lintian-overrides 2016-03-19
13:32:21.000000000 +0000
@@ -0,0 +1 @@
+fp-units-rtl-3.0.0: spelling-error-in-binary */rtl/stdconvs.o ang and
diff -Nru fpc-3.0.0+dfsg/debian/fp-utils-3.0.0.lintian-overrides
fpc-3.0.0+dfsg/debian/fp-utils-3.0.0.lintian-overrides
--- fpc-3.0.0+dfsg/debian/fp-utils-3.0.0.lintian-overrides 1970-01-01
01:00:00.000000000 +0100
+++ fpc-3.0.0+dfsg/debian/fp-utils-3.0.0.lintian-overrides 2016-03-19
13:32:21.000000000 +0000
@@ -0,0 +1,5 @@
+# Free pascal binaries are often statically linked.
+# The Free Pascal Compiler does not properly support linking. Please
+# see BTS #472304.
+fp-utils-3.0.0 binary: statically-linked-binary
+fp-utils-3.0.0: statically-linked-binary
diff -Nru
fpc-3.0.0+dfsg/debian/patches/Keep-the-GOT-offset-in-a-virtual-register-for-i386-n.patch
fpc-3.0.0+dfsg/debian/patches/Keep-the-GOT-offset-in-a-virtual-register-for-i386-n.patch
---
fpc-3.0.0+dfsg/debian/patches/Keep-the-GOT-offset-in-a-virtual-register-for-i386-n.patch
2016-03-08 20:13:58.000000000 +0000
+++
fpc-3.0.0+dfsg/debian/patches/Keep-the-GOT-offset-in-a-virtual-register-for-i386-n.patch
2016-03-19 13:50:33.000000000 +0000
@@ -1,3 +1,6 @@
+This patch has been modified from the commit below for compatibility
+with fpc 3.0.0
+
From bfbbb605bdce9536ca37c249492c046d08a2cc6c Mon Sep 17 00:00:00 2001
From: yury <yury@3ad0048d-3df7-0310-abae-a5850022a9f2>
Date: Mon, 12 Oct 2015 08:02:56 +0000
@@ -17,10 +20,10 @@
compiler/x86/aasmcpu.pas | 5 +--
4 files changed, 70 insertions(+), 49 deletions(-)
-diff --git fpc.orig/fpcsrc/compiler/i386/cgcpu.pas
fpc/fpcsrc/compiler/i386/cgcpu.pas
-index de73fc0..fa6e901 100644
---- fpc.orig/fpcsrc/compiler/i386/cgcpu.pas
-+++ fpc/fpcsrc/compiler/i386/cgcpu.pas
+Index: fpc-3.0.0+dfsg/fpcsrc/compiler/i386/cgcpu.pas
+===================================================================
+--- fpc-3.0.0+dfsg.orig/fpcsrc/compiler/i386/cgcpu.pas
++++ fpc-3.0.0+dfsg/fpcsrc/compiler/i386/cgcpu.pas
@@ -36,7 +36,6 @@ unit cgcpu;
type
tcg386 = class(tcgx86)
@@ -151,10 +154,10 @@
end;
end;
-diff --git fpc.orig/fpcsrc/compiler/i386/cpupi.pas
fpc/fpcsrc/compiler/i386/cpupi.pas
-index f4282af..39187cb 100644
---- fpc.orig/fpcsrc/compiler/i386/cpupi.pas
-+++ fpc/fpcsrc/compiler/i386/cpupi.pas
+Index: fpc-3.0.0+dfsg/fpcsrc/compiler/i386/cpupi.pas
+===================================================================
+--- fpc-3.0.0+dfsg.orig/fpcsrc/compiler/i386/cpupi.pas
++++ fpc-3.0.0+dfsg/fpcsrc/compiler/i386/cpupi.pas
@@ -97,8 +97,7 @@ unit cpupi;
procedure ti386procinfo.allocate_got_register(list: tasmlist);
@@ -165,34 +168,47 @@
begin
got := cg.getaddressregister(list);
end;
-diff --git fpc.orig/fpcsrc/compiler/i386/hlcgcpu.pas
fpc/fpcsrc/compiler/i386/hlcgcpu.pas
-index e437254..9a6ec0e 100644
---- fpc.orig/fpcsrc/compiler/i386/hlcgcpu.pas
-+++ fpc/fpcsrc/compiler/i386/hlcgcpu.pas
+Index: fpc-3.0.0+dfsg/fpcsrc/compiler/i386/hlcgcpu.pas
+===================================================================
+--- fpc-3.0.0+dfsg.orig/fpcsrc/compiler/i386/hlcgcpu.pas
++++ fpc-3.0.0+dfsg/fpcsrc/compiler/i386/hlcgcpu.pas
+@@ -32,7 +32,7 @@ interface
+ aasmdata,
+ symtype,symdef,parabase,
+ cgbase,cgutils,
+- hlcgobj, hlcgx86;
++ hlcgobj, hlcgx86, globtype;
+
+
+ type
@@ -40,6 +40,7 @@ interface
protected
procedure gen_loadfpu_loc_cgpara(list: TAsmList; size: tdef; const l:
tlocation; const cgpara: tcgpara; locintsize: longint); override;
public
-+ function a_call_name(list: TAsmList; pd: tprocdef; const s: TSymStr;
const paras: array of pcgpara; forceresdef: tdef; weak: boolean): tcgpara;
override;
++ function a_call_name(list: TAsmList; pd: tprocdef; const s: TSymStr;
forceresdef: tdef; weak: boolean): tcgpara; override;
procedure g_copyvaluepara_openarray(list: TAsmList; const ref:
treference; const lenloc: tlocation; arrdef: tarraydef; destreg: tregister);
override;
procedure g_releasevaluepara_openarray(list: TAsmList; arrdef:
tarraydef; const l: tlocation); override;
end;
-@@ -49,7 +50,10 @@ interface
+@@ -49,9 +50,12 @@ interface
implementation
uses
+- globtype,verbose,
+ globals, procinfo,
- globtype,verbose,
++ verbose,
+ fmodule,systems,
+ aasmbase,aasmtai,
paramgr,
- cpubase,tgobj,cgobj,cgcpu;
+- cpubase,tgobj,cgobj,cgcpu;
++ cpubase,tgobj,cgobj,cgcpu,symconst,aasmcpu;
+
+ { thlcgcpu }
@@ -170,6 +174,31 @@ implementation
end;
-+ function thlcgcpu.a_call_name(list: TAsmList; pd: tprocdef; const s:
TSymStr; const paras: array of pcgpara; forceresdef: tdef; weak: boolean):
tcgpara;
++ function thlcgcpu.a_call_name(list: TAsmList; pd: tprocdef; const s:
TSymStr; forceresdef: tdef; weak: boolean): tcgpara;
+ var
+ need_got_load: boolean;
+ begin
@@ -210,7 +226,7 @@
+ getcpuregister(list, NR_PIC_OFFSET_REG);
+
list.concat(taicpu.op_reg_reg(A_MOV,S_L,current_procinfo.got,NR_PIC_OFFSET_REG));
+ end;
-+ Result:=inherited a_call_name(list, pd, s, paras, forceresdef, weak);
++ Result:=inherited a_call_name(list, pd, s, forceresdef, weak);
+ { Free EBX }
+ if need_got_load then
+ ungetcpuregister(list, NR_PIC_OFFSET_REG);
@@ -220,10 +236,10 @@
procedure thlcgcpu.g_copyvaluepara_openarray(list: TAsmList; const ref:
treference; const lenloc: tlocation; arrdef: tarraydef; destreg: tregister);
begin
if paramanager.use_fixed_stack then
-diff --git fpc.orig/fpcsrc/compiler/x86/aasmcpu.pas
fpc/fpcsrc/compiler/x86/aasmcpu.pas
-index 9462f72..a89dee8 100644
---- fpc.orig/fpcsrc/compiler/x86/aasmcpu.pas
-+++ fpc/fpcsrc/compiler/x86/aasmcpu.pas
+Index: fpc-3.0.0+dfsg/fpcsrc/compiler/x86/aasmcpu.pas
+===================================================================
+--- fpc-3.0.0+dfsg.orig/fpcsrc/compiler/x86/aasmcpu.pas
++++ fpc-3.0.0+dfsg/fpcsrc/compiler/x86/aasmcpu.pas
@@ -1124,10 +1124,7 @@ implementation
{$ifdef i386}
or (
@@ -236,6 +252,3 @@
)
{$endif i386}
{$ifdef x86_64}
---
-2.7.0
-