summaryrefslogtreecommitdiff
path: root/fpc-src-svn
diff options
context:
space:
mode:
Diffstat (limited to 'fpc-src-svn')
-rw-r--r--fpc-src-svn/.gitignore1
-rw-r--r--fpc-src-svn/38680_refined_htypechk.pas-2.patch195
-rw-r--r--fpc-src-svn/PKGBUILD47
3 files changed, 243 insertions, 0 deletions
diff --git a/fpc-src-svn/.gitignore b/fpc-src-svn/.gitignore
new file mode 100644
index 000000000..65d12c1d4
--- /dev/null
+++ b/fpc-src-svn/.gitignore
@@ -0,0 +1 @@
+fpcsrc
diff --git a/fpc-src-svn/38680_refined_htypechk.pas-2.patch b/fpc-src-svn/38680_refined_htypechk.pas-2.patch
new file mode 100644
index 000000000..e859cddd6
--- /dev/null
+++ b/fpc-src-svn/38680_refined_htypechk.pas-2.patch
@@ -0,0 +1,195 @@
+Index: compiler/htypechk.pas
+===================================================================
+--- compiler/htypechk.pas (리비전 49131)
++++ compiler/htypechk.pas (작업 사본)
+@@ -2892,11 +2892,15 @@
+ obj_to : tobjectdef;
+ def_from,
+ def_to : tdef;
++ tempn,
+ currpt,
+ pt : tcallparanode;
++ eqtemp,
+ eq,
+ mineq : tequaltype;
++ nconvtyp,
+ convtype : tconverttype;
++ npd,
+ pdtemp,
+ pdoper : tprocdef;
+ releasecurrpt : boolean;
+@@ -3001,7 +3005,10 @@
+ is_integer(def_to) and
+ is_in_limit(def_from,def_to) then
+ begin
+- eq:=te_equal;
++ if torddef(def_from).ordtype=torddef(def_to).ordtype then
++ eq:=te_exact
++ else
++ eq:=te_equal;
+ hp^.ordinal_distance:=hp^.ordinal_distance+
+ abs(bestreal(torddef(def_from).low)-bestreal(torddef(def_to).low));
+ rth:=bestreal(torddef(def_to).high);
+@@ -3023,7 +3030,10 @@
+ is_real_or_cextended(def_from) and
+ is_real_or_cextended(def_to) then
+ begin
+- eq:=te_equal;
++ if tfloatdef(def_from).floattype=tfloatdef(def_to).floattype then
++ eq:=te_exact
++ else
++ eq:=te_equal;
+ if is_extended(def_to) then
+ rth:=4
+ else
+@@ -3130,6 +3140,30 @@
+ para_allowed(eq,currpt,def_to);
+ end;
+ end;
++ { to specialize pointer }
++ if (eq<te_exact) and
++ is_pointer(def_from) and is_pointer(def_to) and
++ (tstoreddef(tpointerdef(def_to).pointeddef).is_specialization) then
++ begin
++ eqtemp:=compare_defs_ext(tpointerdef(def_from).pointeddef,tpointerdef(def_to).pointeddef,nothingn,nconvtyp,npd,[cdo_equal_check]);
++ if eqtemp<>te_exact then
++ { void pointer }
++ if currpt.left.nodetype=addrn then
++ begin
++ tempn:=tcallparanode(currpt.left);
++ while assigned(tempn) do
++ begin
++ if tempn.nodetype in [loadn,derefn] then
++ begin
++ eqtemp:=compare_defs_ext(tempn.resultdef,tpointerdef(def_to).pointeddef,nothingn,nconvtyp,npd,[cdo_equal_check]);
++ break;
++ end;
++ tempn:=tcallparanode(tempn.left);
++ end;
++ end;
++ if eqtemp=te_exact then
++ eq:=te_exact;
++ end;
+
+ { univ parameters match if the size matches (don't override the
+ comparison result if it was ok, since a match based on the
+@@ -3145,7 +3179,6 @@
+ procvar is choosen. See tb0471 (PFV) }
+ if (pt<>currpt) and (eq=te_exact) then
+ eq:=te_equal;
+-
+ { increase correct counter }
+ case eq of
+ te_exact :
+@@ -3291,53 +3324,53 @@
+ res:=(bestpd^.coper_count-currpd^.coper_count);
+ if (res=0) then
+ begin
+- { less cl6 parameters? }
+- res:=(bestpd^.cl6_count-currpd^.cl6_count);
+- if (res=0) then
+- begin
+- { less cl5 parameters? }
+- res:=(bestpd^.cl5_count-currpd^.cl5_count);
+- if (res=0) then
+- begin
+- { less cl4 parameters? }
+- res:=(bestpd^.cl4_count-currpd^.cl4_count);
++ { more exact parameters? }
++ res:=(currpd^.exact_count-bestpd^.exact_count);
++ if (res=0) then
++ begin
++ { less cl6 parameters? }
++ res:=(bestpd^.cl6_count-currpd^.cl6_count);
++ if (res=0) then
++ begin
++ { less cl5 parameters? }
++ res:=(bestpd^.cl5_count-currpd^.cl5_count);
+ if (res=0) then
+ begin
+- { less cl3 parameters? }
+- res:=(bestpd^.cl3_count-currpd^.cl3_count);
++ { less cl4 parameters? }
++ res:=(bestpd^.cl4_count-currpd^.cl4_count);
+ if (res=0) then
+ begin
+- { less cl2 parameters? }
+- res:=(bestpd^.cl2_count-currpd^.cl2_count);
+- if (res=0) then
+- begin
+- { less cl1 parameters? }
+- res:=(bestpd^.cl1_count-currpd^.cl1_count);
+- if (res=0) then
+- begin
+- { more exact parameters? }
+- res:=(currpd^.exact_count-bestpd^.exact_count);
+- if (res=0) then
+- begin
+- { less equal parameters? }
+- res:=(bestpd^.equal_count-currpd^.equal_count);
+- if (res=0) then
+- begin
+- { smaller ordinal distance? }
+- if (currpd^.ordinal_distance<bestpd^.ordinal_distance) then
+- res:=1
+- else
+- if (currpd^.ordinal_distance>bestpd^.ordinal_distance) then
+- res:=-1
+- else
+- res:=0;
+- end;
+- end;
+- end;
+- end;
++ { less cl3 parameters? }
++ res:=(bestpd^.cl3_count-currpd^.cl3_count);
++ if (res=0) then
++ begin
++ { less cl2 parameters? }
++ res:=(bestpd^.cl2_count-currpd^.cl2_count);
++ if (res=0) then
++ begin
++ { less cl1 parameters? }
++ res:=(bestpd^.cl1_count-currpd^.cl1_count);
++ if (res=0) then
++ begin
++ { less equal parameters? }
++ res:=(bestpd^.equal_count-currpd^.equal_count);
++ if (res=0) then
++ begin
++ { smaller ordinal distance? }
++ if (currpd^.ordinal_distance<bestpd^.ordinal_distance) then
++ res:=1
++ else
++ if (currpd^.ordinal_distance>bestpd^.ordinal_distance) then
++ res:=-1
++ else
++ res:=0;
++ end;
++ end;
++ end;
++ end;
+ end;
+ end;
+- end;
++ end;
+ end;
+ end;
+ end;
+@@ -3608,7 +3641,7 @@
+ cpoptions:=cpoptions+[cpo_rtlproc];
+
+ compare_by_old_sortout_check := 0; // can't decide, bestpd probably wasn't sorted out in unpatched
+- if (compare_paras(pd^.data.paras,bestpd^.data.paras,cp_value_equal_const,cpoptions)>=te_equal) and
++ if (compare_paras(pd^.data.paras,bestpd^.data.paras,cp_value_equal_const,cpoptions)>te_equal) and
+ (not(po_objc in bestpd^.data.procoptions) or (bestpd^.data.messageinf.str^=pd^.data.messageinf.str^)) then
+ compare_by_old_sortout_check := 1; // bestpd was sorted out before patch
+ end;
+@@ -3643,7 +3676,6 @@
+ end;
+ end;
+
+-
+ function tcallcandidates.choose_best(var bestpd:tabstractprocdef; singlevariant: boolean):integer;
+ var
+ pd: tprocdef;
diff --git a/fpc-src-svn/PKGBUILD b/fpc-src-svn/PKGBUILD
new file mode 100644
index 000000000..4db37322a
--- /dev/null
+++ b/fpc-src-svn/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Erich Eckner <arch at eckner dot net>
+# Contributor: L <alaviss 0 at gmail dot com>
+# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Valeriy Lyasotskiy <onestep@ukr.net>
+# Contributor: Jan Willemson <janwil@hot.ee>
+# Contributor: Hugo Ideler <hugoideler@dse.nl>
+# Contributor: BlackIkeEagle <ike DOT devolder AT gmail DOT com>
+# Original PKGBUILD: Andre Naumann <anaumann@SPARCed.org>
+# See http://bbs.archlinux.org/viewtopic.php?t=9318&highlight=fpc
+
+pkgname='fpc-src-svn'
+pkgver=3.3.1.r49238
+_pkgver="${pkgver%.r*}"
+_revision="${pkgver##*.r}"
+pkgrel=1
+arch=('any')
+url='http://www.freepascal.org/'
+license=('GPL' 'LGPL' 'custom')
+depends=()
+pkgdesc='Sources for the Free Pascal Compiler (required by the Lazarus IDE)'
+options=('!strip')
+conflicts=('fpc-src')
+provides=("fpc-src=${pkgver}")
+
+source=('38680_refined_htypechk.pas-2.patch'
+'fpcsrc::svn+http://svn.freepascal.org/svn/fpc/trunk#revision='"${_revision}")
+sha512sums=('583e26eca23d4fde9b6dc163c8e97cd5f271ca98e38560e0da0b79d30652a876f5c66e4b7c2ea32b429f34855b1cdc48987f4fd7bb7cf63eeafcbb6a08ee9693'
+ 'SKIP')
+
+pkgver() {
+ cd "${srcdir}"/fpcsrc
+ printf '%s.r%s' \
+ $(grep -m 1 'version' Makefile.fpc | cut -d '=' -f 2) \
+ $(svnversion | tr -d [A-z])
+}
+
+prepare() {
+ cd "${srcdir}"/fpcsrc
+ patch -p0 -i "${srcdir}/38680_refined_htypechk.pas-2.patch"
+}
+
+package() {
+
+ install -dm755 "${pkgdir}"/usr/lib/fpc/src
+
+ mv "${srcdir}"/fpcsrc/* "${pkgdir}"/usr/lib/fpc/src/
+}