Skip to content

Commit

Permalink
lang/fpc: Fix build issue on lazarus i386 and amd64
Browse files Browse the repository at this point in the history
- Bump PORTREVISION
- Disable some default OPTIONS
Obtained from:	https://forum.lazarus.freepascal.org/index.php/topic,57752.msg429737.html#msg429737
  • Loading branch information
alonsobsd committed Feb 3, 2022
1 parent 381d3c5 commit 0de5507
Show file tree
Hide file tree
Showing 12 changed files with 80 additions and 11 deletions.
1 change: 0 additions & 1 deletion databases/fpc-mysql/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ EXTRACTUNITDIR= ${WRKUNITDIR}

OPTIONS_DEFINE= MYSQL
MYSQL_DESC= Install MySQL client
OPTIONS_DEFAULT= MYSQL

MYSQL_USES= mysql

Expand Down
1 change: 0 additions & 1 deletion databases/fpc-postgres/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ EXTRACTUNITDIR= ${WRKUNITDIR}

OPTIONS_DEFINE= PGSQL
PGSQL_DESC= Install PostgreSQL client
OPTIONS_DEFAULT= PGSQL

PGSQL_USES= pgsql

Expand Down
1 change: 0 additions & 1 deletion databases/fpc-sqlite/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ WRKUNITDIR= ${FPCSRCDIR}/packages/${PKGNAMESUFFIX:S/-//}
EXTRACTUNITDIR= ${WRKUNITDIR}

OPTIONS_DEFINE= SQLITE
OPTIONS_DEFAULT= SQLITE

SQLITE_USES= sqlite

Expand Down
2 changes: 1 addition & 1 deletion games/hedgewars/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PORTNAME= hedgewars
PORTVERSION= 1.0.0
PORTREVISION= 6
PORTREVISION= 7
CATEGORIES= games
MASTER_SITES= http://www.hedgewars.org/download/releases/ \
http://mirror.amdmi3.ru/distfiles/
Expand Down
2 changes: 1 addition & 1 deletion lang/fpc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

PORTNAME= fpc
PORTVERSION= 3.2.2
PORTREVISION?= 0
PORTREVISION?= 1
CATEGORIES?= lang
MASTER_SITES= ftp://ftp.freepascal.org/pub/fpc/dist/${PORTVERSION}/source/:source \
ftp://planetmirror.com/pub/fpc/dist/${PORTVERSION}/source/:source \
Expand Down
72 changes: 72 additions & 0 deletions lang/fpc/files/patch-compiler-x86_aoptx86.pas
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
--- compiler/x86/aoptx86.pas 2022-01-25 22:18:01.236523000 -0500
+++ compiler/x86/aoptx86.pas 2022-01-25 22:34:15.492397000 -0500
@@ -2761,6 +2761,7 @@
if (l<=4) and (l>0) then
begin
condition:=inverse_cond(taicpu(p).condition);
+ UpdateUsedRegs(tai(p.next));
GetNextInstruction(p,hp1);
repeat
if not Assigned(hp1) then
@@ -2768,7 +2769,7 @@

taicpu(hp1).opcode:=A_CMOVcc;
taicpu(hp1).condition:=condition;
- UpdateUsedRegs(hp1);
+ UpdateUsedRegs(tai(hp1.next));
GetNextInstruction(hp1,hp1);
until not(CanBeCMOV(hp1));

@@ -2815,6 +2816,7 @@
asml.Remove(p);
p.Free;

+ UpdateUsedRegs(tai(hp2.next));
GetNextInstruction(hp2, p); { Instruction after the label }

{ Remove the label if this is its final reference }
@@ -2878,6 +2880,7 @@
FindLabel(tasmlabel(taicpu(hp2).oper[0]^.ref^.symbol),hp1) then
begin
condition:=inverse_cond(taicpu(p).condition);
+ UpdateUsedRegs(tai(p.next));
GetNextInstruction(p,hp1);
repeat
taicpu(hp1).opcode:=A_CMOVcc;
@@ -2888,19 +2891,23 @@
not(CanBeCMOV(hp1));

condition:=inverse_cond(condition);
+ if GetLastInstruction(hpmov2,hp1) then
+ UpdateUsedRegs(tai(hp1.next));
+
hp1 := hpmov2;
{ hp1 is now at <several movs 2> }
while Assigned(hp1) and CanBeCMOV(hp1) do
begin
taicpu(hp1).opcode:=A_CMOVcc;
taicpu(hp1).condition:=condition;
- UpdateUsedRegs(hp1);
+ UpdateUsedRegs(tai(hp1.next));
GetNextInstruction(hp1,hp1);
end;

hp1 := p;

{ Get first instruction after label }
+ UpdateUsedRegs(tai(hp3.next));
GetNextInstruction(hp3, p);

if assigned(p) and (hp3.typ = ait_align) then
@@ -2955,10 +2962,7 @@
end;

if Assigned(p) then
- begin
- UpdateUsedRegs(p);
- result:=true;
- end;
+ result:=true;
exit;
end;
end;
2 changes: 1 addition & 1 deletion lang/nbc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

PORTNAME= nbc
PORTVERSION= 1.2.1.r4
PORTREVISION= 19
PORTREVISION= 20
CATEGORIES= lang
MASTER_SITES= SF/bricxcc/NBC_NXC/NBC%20release%20${PORTVERSION:S/.r/%20r/}
DISTNAME= ${PORTNAME}-${PORTVERSION}.src
Expand Down
2 changes: 1 addition & 1 deletion net/fpc-ldap/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Created by: Christopher Key <cjk32@cam.ac.uk>

PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= net lang
PKGNAMESUFFIX= -ldap

Expand Down
2 changes: 1 addition & 1 deletion science/checkmol/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

PORTNAME= checkmol
PORTVERSION= 0.5
PORTREVISION= 11
PORTREVISION= 12
CATEGORIES= science
MASTER_SITES= https://homepage.univie.ac.at/norbert.haider/download/chemistry/checkmol/
DISTFILES= ${PORTNAME}
Expand Down
2 changes: 1 addition & 1 deletion science/checkmol/pkg-descr
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ chemical databases.

The port installs both checkmol and matchmol.

WWW: http://merian.pch.univie.ac.at/~nhaider/cheminf/cmmm.html
WWW: https://homepage.univie.ac.at/norbert.haider/cheminf/cmmm.html
2 changes: 1 addition & 1 deletion science/mol2ps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

PORTNAME= mol2ps
PORTVERSION= 0.4b
PORTREVISION= 9
PORTREVISION= 10
CATEGORIES= science
MASTER_SITES= https://homepage.univie.ac.at/norbert.haider/download/chemistry/mol2ps/
DISTNAME= ${PORTNAME}
Expand Down
2 changes: 1 addition & 1 deletion science/mol2ps/pkg-descr
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Postscript output for 2D display. The Postscript file can then be used
e.g. for creating a bitmap file, using a Postscript interpreter like
Ghostscript.

WWW: http://merian.pch.univie.ac.at/~nhaider/cheminf/mol2ps.html
WWW: https://homepage.univie.ac.at/norbert.haider/cheminf/mol2ps.html

0 comments on commit 0de5507

Please sign in to comment.