summaryrefslogtreecommitdiff
path: root/packages/fcl-passrc
diff options
context:
space:
mode:
Diffstat (limited to 'packages/fcl-passrc')
-rw-r--r--packages/fcl-passrc/Makefile23
-rw-r--r--packages/fcl-passrc/src/pasresolver.pp26
2 files changed, 41 insertions, 8 deletions
diff --git a/packages/fcl-passrc/Makefile b/packages/fcl-passrc/Makefile
index 056e8499b0..879fbbedb5 100644
--- a/packages/fcl-passrc/Makefile
+++ b/packages/fcl-passrc/Makefile
@@ -2,7 +2,7 @@
# Don't edit, this file is generated by FPCMake Version 2.0.0
#
default: all
-MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim i386-android i386-aros m68k-linux m68k-netbsd m68k-amiga m68k-atari m68k-palmos m68k-macosclassic m68k-embedded m68k-sinclairql powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macosclassic powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii powerpc-aix sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-haiku x86_64-netbsd x86_64-solaris x86_64-openbsd x86_64-darwin x86_64-win64 x86_64-embedded x86_64-iphonesim x86_64-android x86_64-aros x86_64-dragonfly arm-linux arm-netbsd arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian arm-android arm-aros arm-freertos arm-ios powerpc64-linux powerpc64-darwin powerpc64-embedded powerpc64-aix avr-embedded armeb-linux armeb-embedded mips-linux mipsel-linux mipsel-embedded mipsel-android mips64el-linux jvm-java jvm-android i8086-embedded i8086-msdos i8086-win16 aarch64-linux aarch64-darwin aarch64-win64 aarch64-android aarch64-ios wasm32-embedded wasm32-wasi sparc64-linux riscv32-linux riscv32-embedded riscv64-linux riscv64-embedded xtensa-linux xtensa-embedded xtensa-freertos z80-embedded z80-zxspectrum z80-msxdos z80-amstradcpc
+MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim i386-android i386-aros m68k-linux m68k-netbsd m68k-amiga m68k-atari m68k-palmos m68k-macosclassic m68k-embedded m68k-sinclairql powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macosclassic powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii powerpc-aix sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-haiku x86_64-netbsd x86_64-solaris x86_64-openbsd x86_64-darwin x86_64-win64 x86_64-embedded x86_64-iphonesim x86_64-android x86_64-aros x86_64-dragonfly arm-linux arm-netbsd arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian arm-android arm-aros arm-freertos arm-ios powerpc64-linux powerpc64-darwin powerpc64-embedded powerpc64-aix avr-embedded armeb-linux armeb-embedded mips-linux mipsel-linux mipsel-embedded mipsel-android mips64el-linux jvm-java jvm-android i8086-embedded i8086-msdos i8086-win16 aarch64-linux aarch64-freebsd aarch64-darwin aarch64-win64 aarch64-android aarch64-ios wasm32-embedded wasm32-wasi sparc64-linux riscv32-linux riscv32-embedded riscv64-linux riscv64-embedded xtensa-linux xtensa-embedded xtensa-freertos z80-embedded z80-zxspectrum z80-msxdos z80-amstradcpc
BSDs = freebsd netbsd openbsd darwin dragonfly
UNIXs = linux $(BSDs) solaris qnx haiku aix
LIMIT83fs = go32v2 os2 emx watcom msdos win16 atari
@@ -1816,6 +1816,14 @@ REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_LIBTAR=1
REQUIRE_PACKAGES_FPMKUNIT=1
endif
+ifeq ($(FULL_TARGET),aarch64-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_LIBTAR=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+endif
ifeq ($(FULL_TARGET),aarch64-darwin)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
@@ -2291,6 +2299,19 @@ override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
endif
endif
+ifdef SYSROOTPATH
+override FPCOPT+=-XR$(SYSROOTPATH)
+else
+ifeq ($(OS_TARGET),$(OS_SOURCE))
+ifneq ($(findstring $(OS_TARGET),darwin),)
+ifneq ($(findstring $(CPU_TARGET),aarch64),)
+ifneq ($(wildcard /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk),)
+override FPCOPT+=-XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
+endif
+endif
+endif
+endif
+endif
ifdef CREATESHARED
override FPCOPT+=-Cg
endif
diff --git a/packages/fcl-passrc/src/pasresolver.pp b/packages/fcl-passrc/src/pasresolver.pp
index 0d8819301d..ed20471c25 100644
--- a/packages/fcl-passrc/src/pasresolver.pp
+++ b/packages/fcl-passrc/src/pasresolver.pp
@@ -10628,6 +10628,7 @@ begin
end;
eopAdd:
begin
+ // handle multi add
Left:=El.left;
while (Left.ClassType=TBinaryExpr) do
begin
@@ -12994,6 +12995,7 @@ begin
exit;
end;
+ Flags:=Flags-[rcNoImplicitProc,rcNoImplicitProcType];
if Bin.OpCode=eopAdd then
begin
// handle multi-adds without stack
@@ -13005,10 +13007,10 @@ begin
Left:=SubBin.left;
end;
// Left is now left-most of multi add
- ComputeElement(Left,LeftResolved,Flags-[rcNoImplicitProc],StartEl);
+ ComputeElement(Left,LeftResolved,Flags,StartEl);
repeat
SubBin:=TBinaryExpr(Left.Parent);
- ComputeElement(Bin.right,RightResolved,Flags-[rcNoImplicitProc],StartEl);
+ ComputeElement(SubBin.right,RightResolved,Flags,StartEl);
// ToDo: check operator overloading
ComputeBinaryExprRes(SubBin,ResolvedEl,Flags,LeftResolved,RightResolved);
@@ -13018,8 +13020,8 @@ begin
end
else
begin
- ComputeElement(Bin.left,LeftResolved,Flags-[rcNoImplicitProc],StartEl);
- ComputeElement(Bin.right,RightResolved,Flags-[rcNoImplicitProc],StartEl);
+ ComputeElement(Bin.left,LeftResolved,Flags,StartEl);
+ ComputeElement(Bin.right,RightResolved,Flags,StartEl);
// ToDo: check operator overloading
ComputeBinaryExprRes(Bin,ResolvedEl,Flags,LeftResolved,RightResolved);
@@ -17947,7 +17949,7 @@ begin
if GenEl.Body<>nil then
begin
- // implementation proc
+ // implementation or anonymous proc
if SpecializedItem<>nil then
SpecializedItem.Step:=prssImplementationBuilding;
GenBody:=GenEl.Body;
@@ -18435,11 +18437,21 @@ begin
end;
procedure TPasResolver.SpecializeProcedureExpr(GenEl, SpecEl: TProcedureExpr);
+var
+ GenProc: TPasAnonymousProcedure;
+ NewClass: TPTreeElement;
begin
SpecializeExpr(GenEl,SpecEl);
- if GenEl.Proc=nil then
+ GenProc:=GenEl.Proc;
+ if GenProc=nil then
RaiseNotYetImplemented(20190808221018,GenEl);
- RaiseNotYetImplemented(20190808221040,GenEl);
+ if not (GenProc is TPasAnonymousProcedure) then
+ RaiseNotYetImplemented(20210331224052,GenEl);
+ if GenProc.Parent<>GenEl then
+ RaiseNotYetImplemented(20210331223856,GenEl);
+ NewClass:=TPTreeElement(GenProc.ClassType);
+ SpecEl.Proc:=TPasAnonymousProcedure(NewClass.Create(GenProc.Name,SpecEl));
+ SpecializeElement(GenProc,SpecEl.Proc);
end;
procedure TPasResolver.SpecializeResString(GenEl, SpecEl: TPasResString);