Import package content from "rawhide" branch

epel9
Artur Frenszek-Iwicki 3 years ago
parent 87077f4d0d
commit 13ce7ef7ec

1
.gitignore vendored

@ -0,0 +1 @@
/fpcbuild-3.2.2.tar.gz

@ -0,0 +1,8 @@
[Defaults]
ConfigVersion=4
GlobalPrefix=%GlobalPrefix%
GlobalInstallDir={GlobalPrefix}%lib%/fpc/{CompilerVersion}
LocalPrefix={LocalRepository}
Compiler=%fpcbin%
OS=%fpctargetos%
CPU=%fpctarget%

@ -0,0 +1,101 @@
--- compiler/systems/i_linux.pas 2020-01-26 11:13:16.348466579 +0100
+++ compiler/systems/i_linux.pas 2020-01-26 11:29:40.397595384 +0100
@@ -73,7 +73,7 @@
linkextern : ld_linux;
ar : ar_gnu_ar;
res : res_elf;
- dbg : dbg_stabs;
+ dbg : dbg_dwarf2;
script : script_unix;
endian : endian_little;
alignment :
@@ -139,7 +139,7 @@
linkextern : ld_linux;
ar : ar_gnu_ar;
res : res_elf;
- dbg : dbg_stabs;
+ dbg : dbg_dwarf2;
script : script_unix;
endian : endian_little;
alignment :
@@ -205,7 +205,7 @@
linkextern : ld_linux;
ar : ar_gnu_ar;
res : res_elf;
- dbg : dbg_stabs;
+ dbg : dbg_dwarf2;
script : script_unix;
endian : endian_big;
alignment :
@@ -270,7 +270,7 @@
linkextern : ld_linux;
ar : ar_gnu_ar;
res : res_elf;
- dbg : dbg_stabs;
+ dbg : dbg_dwarf2;
script : script_unix;
endian : endian_big;
alignment :
@@ -466,7 +466,7 @@
linkextern : ld_linux;
ar : ar_gnu_ar;
res : res_elf;
- dbg : dbg_stabs;
+ dbg : dbg_dwarf2;
script : script_unix;
endian : endian_big;
alignment :
@@ -600,7 +600,7 @@
linkextern : ld_linux;
ar : ar_gnu_ar;
res : res_elf;
- dbg : dbg_stabs;
+ dbg : dbg_dwarf2;
script : script_unix;
endian : endian_little;
alignment :
@@ -667,7 +667,7 @@
linkextern : ld_linux;
ar : ar_gnu_ar;
res : res_elf;
- dbg : dbg_stabs;
+ dbg : dbg_dwarf2;
script : script_unix;
endian : endian_little;
alignment :
@@ -734,7 +734,7 @@
linkextern : ld_linux;
ar : ar_gnu_ar;
res : res_elf;
- dbg : dbg_stabs;
+ dbg : dbg_dwarf2;
script : script_unix;
endian : endian_big;
alignment :
@@ -799,7 +799,7 @@
linkextern : ld_linux;
ar : ar_gnu_ar;
res : res_elf;
- dbg : dbg_stabs;
+ dbg : dbg_dwarf2;
script : script_unix;
endian : endian_little;
alignment :
@@ -937,7 +937,7 @@
linkextern : ld_linux;
ar : ar_gnu_ar;
res : res_elf;
- dbg : dbg_stabs;
+ dbg : dbg_dwarf2;
script : script_unix;
endian : endian_big;
alignment :
@@ -1004,7 +1004,7 @@
linkextern : ld_linux;
ar : ar_gnu_ar;
res : res_elf;
- dbg : dbg_stabs;
+ dbg : dbg_dwarf2;
script : script_unix;
endian : endian_little;
alignment :

@ -0,0 +1,21 @@
--- compiler/systems/t_linux.pas 2020-01-26 12:38:49.026082370 +0100
+++ compiler/systems/t_linux.pas 2020-01-28 02:28:20.365389393 +0100
@@ -141,10 +141,17 @@
if target_info.abi<>abi_powerpc_elfv2 then
LibrarySearchPath.AddLibraryPath(sysrootpath,'=/lib64;=/usr/lib64;=/usr/X11R6/lib64',true)
else
LibrarySearchPath.AddLibraryPath(sysrootpath,'=/lib64;=/usr/lib/powerpc64le-linux-gnu;=/usr/X11R6/powerpc64le-linux-gnu',true);
-{$else powerpc64}
+{$else}
+{$ifdef aarch64}
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib',true);
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/lib',true);
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib64',true);
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/lib64',true);
+{$else}
LibrarySearchPath.AddLibraryPath(sysrootpath,'=/lib;=/usr/lib;=/usr/X11R6/lib',true);
+{$endif aarch64}
{$endif powerpc64}
{$endif x86_64}
{$ifdef arm}

@ -0,0 +1,51 @@
--- compiler/globals.pas 2020-01-26 11:40:37.848057995 +0100
+++ compiler/globals.pas 2020-01-26 11:40:31.014043335 +0100
@@ -559,8 +559,9 @@
startsystime : TSystemTime;
function getdatestr:string;
function gettimestr:string;
+ Function UnixToDateTime(const AValue: Int64): TDateTime;
function filetimestring( t : longint) : string;
function getrealtime(const st: TSystemTime) : real;
function getrealtime : real;
@@ -816,13 +817,34 @@
get the current date in a string YY/MM/DD
}
var
st: TSystemTime;
+ Year, Month, Day: Word;
+ SourceDateEpoch: string;
begin
- GetLocalTime(st);
- getdatestr:=L0(st.Year)+'/'+L0(st.Month)+'/'+L0(st.Day);
- end;
-
+ SourceDateEpoch := GetEnvironmentVariable('SOURCE_DATE_EPOCH');
+ if Length(SourceDateEpoch)>0 then begin
+ DecodeDate(UnixToDateTime(StrToInt64(SourceDateEpoch)),year,month,day);
+ getdatestr:=L0(Year)+'/'+L0(Month)+'/'+L0(Day)
+ end else begin
+ GetLocalTime(st);
+ getdatestr:=L0(st.Year)+'/'+L0(st.Month)+'/'+L0(st.Day)
+ end
+ end;
+
+ Function UnixToDateTime(const AValue: Int64): TDateTime;
+ { Code copied from fpcsrc/packages/rtl-objpas/src/inc/dateutil.inc and
+ fpcsrc/rtl/objpas/sysutils/datih.inc }
+ const
+ TDateTimeEpsilon = 2.2204460493e-16 ;
+ UnixEpoch = TDateTime(-2415018.5) + TDateTime(2440587.5) ;
+ begin
+ Result:=UnixEpoch + AValue/SecsPerDay;
+ if (UnixEpoch>=0) and (Result<-TDateTimeEpsilon) then
+ Result:=int(Result-1.0+TDateTimeEpsilon)-frac(1.0+frac(Result))
+ // else if (UnixEpoch<=-1.0) and (Result>-1.0+TDateTimeEpsilon) then
+ // Result:=int(Result+1.0-TDateTimeEpsilon)+frac(1.0-abs(frac(1.0+Result)));
+ end;
function filetimestring( t : longint) : string;
{
convert dos datetime t to a string YY/MM/DD HH:MM:SS

@ -0,0 +1,141 @@
From a6c82b6642871e1c68f3839e090b055bee4254b0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Tue, 21 Sep 2021 12:47:28 +0200
Subject: [PATCH] update startup data structs for glibc >= 2.34
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2005910
Fixes: https://gitlab.com/freepascal.org/fpc/source/-/issues/39295
---
rtl/linux/aarch64/cprt0.as | 6 ++----
rtl/linux/i386/si_c21.inc | 7 +++----
rtl/linux/powerpc64/cprt0.as | 4 ++--
rtl/linux/powerpc64/gprt0.as | 4 ++--
rtl/linux/powerpc64/si_c.inc | 7 ++-----
rtl/linux/powerpc64/si_g.inc | 7 ++-----
6 files changed, 13 insertions(+), 22 deletions(-)
diff --git a/rtl/linux/aarch64/cprt0.as b/rtl/linux/aarch64/cprt0.as
index fd83610fbc..c8f2ca4baa 100644
--- a/rtl/linux/aarch64/cprt0.as
+++ b/rtl/linux/aarch64/cprt0.as
@@ -41,10 +41,8 @@ _start:
init, fini, rtld_fini, stack_end) */
adrp x0,:got:PASCALMAIN
ldr x0,[x0,#:got_lo12:PASCALMAIN]
- adrp x3,:got:__libc_csu_init
- ldr x3,[x3,#:got_lo12:__libc_csu_init]
- adrp x4,:got:__libc_csu_fini
- ldr x4,[x4,#:got_lo12:__libc_csu_fini]
+ mov x3, #0 /* Used to be init. */
+ mov x4, #0 /* Used to be fini. */
bl __libc_start_main
/* This should never happen */
diff --git a/rtl/linux/i386/si_c21.inc b/rtl/linux/i386/si_c21.inc
index 71df29b6ef..084cdcf3ce 100644
--- a/rtl/linux/i386/si_c21.inc
+++ b/rtl/linux/i386/si_c21.inc
@@ -35,8 +35,6 @@
{$asmmode att}
-procedure __libc_csu_init; cdecl; external;
-procedure __libc_csu_fini; cdecl; external;
procedure libc_start_main; external name '__libc_start_main';
procedure libc_exit(code: longint); cdecl; external name 'exit';
@@ -93,8 +91,9 @@ procedure _FPC_libc21_start; assembler; nostackframe; public name '_start';
pushl %esp { stack_end }
pushl %edx { function to be registered with
atexit(), passed by loader }
- pushl $__libc_csu_fini
- pushl $__libc_csu_init
+ { This used to be the addresses of .fini and .init. }
+ pushl $0
+ pushl $0
pushl %esi { Push second argument: argv. }
pushl %ecx { Push first argument: argc. }
diff --git a/rtl/linux/powerpc64/cprt0.as b/rtl/linux/powerpc64/cprt0.as
index 2b8309d4bf..3eace2813d 100644
--- a/rtl/linux/powerpc64/cprt0.as
+++ b/rtl/linux/powerpc64/cprt0.as
@@ -351,8 +351,8 @@ _restvr_31: addi r12,r0,-16
start_addresses:
.quad 0 /* was _SDA_BASE_ but not in 64-bit ABI*/
.quad main_stub
- .quad __libc_csu_init
- .quad __libc_csu_fini
+ .quad 0 /* Used to be init. */
+ .quad 0 /* Used to be fini. */
.size start_adresses, .-start_addresses
/*
diff --git a/rtl/linux/powerpc64/gprt0.as b/rtl/linux/powerpc64/gprt0.as
index de31b6b08d..6b6fc9011b 100644
--- a/rtl/linux/powerpc64/gprt0.as
+++ b/rtl/linux/powerpc64/gprt0.as
@@ -351,8 +351,8 @@ _restvr_31: addi r12,r0,-16
start_addresses:
.quad 0 /* was _SDA_BASE_ but not in 64-bit ABI*/
.quad main_stub
- .quad __libc_csu_init
- .quad __libc_csu_fini
+ .quad 0 /* Used to be init. */
+ .quad 0 /* Used to be fini. */
.size start_adresses, .-start_addresses
/*
diff --git a/rtl/linux/powerpc64/si_c.inc b/rtl/linux/powerpc64/si_c.inc
index c7e5e353a0..2833258c93 100644
--- a/rtl/linux/powerpc64/si_c.inc
+++ b/rtl/linux/powerpc64/si_c.inc
@@ -657,9 +657,6 @@ procedure _restfpr_30; cdecl; public; assembler; nostackframe;
Process start/halt
******************************************************************************}
-procedure __libc_csu_init; cdecl; external;
-procedure __libc_csu_fini; cdecl; external;
-
procedure __libc_start_main(r3,r4,r5,r6,r7,r8,r9: pointer); cdecl; external;
var
@@ -724,8 +721,8 @@ procedure main_stub(argc: longint; argv, envp: ppchar); cdecl; assembler; nostac
end
= (sda_base: nil; {* was _SDA_BASE_ but not in 64-bit ABI }
main: @main_stub;
- libc_csu_init: @__libc_csu_init;
- libc_csu_fini: @__libc_csu_fini
+ libc_csu_init: nil;
+ libc_csu_fini: nil
);
diff --git a/rtl/linux/powerpc64/si_g.inc b/rtl/linux/powerpc64/si_g.inc
index 8c99a39bc6..58cdf19f9c 100644
--- a/rtl/linux/powerpc64/si_g.inc
+++ b/rtl/linux/powerpc64/si_g.inc
@@ -657,9 +657,6 @@ procedure _restfpr_30; cdecl; public; assembler; nostackframe;
Process start/halt
******************************************************************************}
-procedure __libc_csu_init; cdecl; external;
-procedure __libc_csu_fini; cdecl; external;
-
procedure __libc_start_main(r3,r4,r5,r6,r7,r8,r9: pointer); cdecl; external;
type
@@ -745,8 +742,8 @@ procedure main_stub(argc: longint; argv, envp: ppchar); cdecl; assembler; nostac
end
= (sda_base: nil; {* was _SDA_BASE_ but not in 64-bit ABI }
main: @main_stub;
- libc_csu_init: @__libc_csu_init;
- libc_csu_fini: @__libc_csu_fini
+ libc_csu_init: nil;
+ libc_csu_fini: nil
);
procedure call_libc_start_main(r3,r4,r5,r6,r7,r8,r9: pointer); cdecl;
--
2.31.1

@ -0,0 +1,27 @@
From 355ac3c7e2bb7bbdee1b16d41cad8e3e0c4e2728 Mon Sep 17 00:00:00 2001
From: suve <veg@svgames.pl>
Date: Wed, 16 Mar 2022 23:01:09 +0100
Subject: [PATCH] Make pas2jni use cthreads on Unices
---
utils/pas2jni/pas2jni.pas | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/utils/pas2jni/pas2jni.pas b/utils/pas2jni/pas2jni.pas
index c0a8d67917..c89fe92791 100644
--- a/utils/pas2jni/pas2jni.pas
+++ b/utils/pas2jni/pas2jni.pas
@@ -22,7 +22,9 @@
{$mode objfpc}{$H+}
program pas2jni;
-uses SysUtils, Classes, writer, ppuparser;
+uses
+ {$IFDEF UNIX}cthreads,{$ENDIF}
+ SysUtils, Classes, writer, ppuparser;
var
w: TWriter;
--
GitLab

@ -0,0 +1,278 @@
diff -U4 -r fpcbuild-3.2.2--orig/fpcsrc/compiler/ncgvmt.pas fpcbuild-3.2.2--patched/fpcsrc/compiler/ncgvmt.pas
--- fpcbuild-3.2.2--orig/fpcsrc/compiler/ncgvmt.pas 2018-09-26 14:50:46.000000000 +0200
+++ fpcbuild-3.2.2--patched/fpcsrc/compiler/ncgvmt.pas 2022-02-05 21:45:01.331925919 +0100
@@ -1221,16 +1221,27 @@
i,j : longint;
tmps : string;
pd : TProcdef;
ImplIntf : TImplementedInterface;
-{$ifdef cpuhighleveltarget}
wrapperpd: tprocdef;
wrapperinfo: pskpara_interface_wrapper;
-{$else}
- tmplist: tasmlist;
- oldfileposinfo: tfileposinfo;
-{$endif cpuhighleveltarget}
+ tmplist: tasmlist;
+ oldfileposinfo: tfileposinfo;
+ usehighlevelwrapper: Boolean;
begin
+{$if defined(cpuhighleveltarget)}
+ usehighlevelwrapper:=true;
+{$else defined(cpuhighleveltarget)}
+ { on PPC systems that use a TOC the linker needs to be able to insert
+ an instruction to restore the TOC register after every branch
+ between code fragments that use a different TOC (which has to be
+ executed when that "branch" returns). So we can't use tail call
+ branches to routines potentially using a different TOC there }
+ if target_info.system in systems_ppc_toc then
+ usehighlevelwrapper:=true
+ else
+ usehighlevelwrapper:=false;
+{$endif defined(cpuhighleveltarget)}
for i:=0 to _class.ImplementedInterfaces.count-1 do
begin
ImplIntf:=TImplementedInterface(_class.ImplementedInterfaces[i]);
if (ImplIntf=ImplIntf.VtblImplIntf) and
@@ -1245,45 +1256,49 @@
if (po_virtualmethod in pd.procoptions) and
not is_objectpascal_helper(tprocdef(pd).struct) then
tobjectdef(tprocdef(pd).struct).register_vmt_call(tprocdef(pd).extnumber);
tmps:=CreateWrapperName(_Class,ImplIntf,j,pd);
-{$ifdef cpuhighleveltarget}
- new(wrapperinfo);
- wrapperinfo^.pd:=pd;
- wrapperinfo^.offset:=ImplIntf.ioffset;
- { insert the wrapper procdef in the current unit's local
- symbol table, but set the owning "struct" to the current
- class (so self will have the correct type) }
- wrapperpd:=create_procdef_alias(pd,tmps,tmps,
- current_module.localsymtable,_class,
- tsk_interface_wrapper,wrapperinfo);
- include(wrapperpd.procoptions,po_noreturn);
-{$else cpuhighleveltarget}
- oldfileposinfo:=current_filepos;
- if pd.owner.iscurrentunit then
- current_filepos:=pd.fileinfo
- else
- begin
- current_filepos.moduleindex:=current_module.unit_index;
- current_filepos.fileindex:=1;
- current_filepos.line:=1;
- current_filepos.column:=1;
- end;
- { create wrapper code }
- tmplist:=tasmlist.create;
- new_section(tmplist,sec_code,tmps,target_info.alignment.procalign);
- tmplist.Concat(tai_function_name.create(tmps));
- hlcg.init_register_allocators;
- hlcg.g_intf_wrapper(tmplist,pd,tmps,ImplIntf.ioffset);
- hlcg.done_register_allocators;
- if ((cs_debuginfo in current_settings.moduleswitches) or
- (cs_use_lineinfo in current_settings.globalswitches)) and
- (target_dbg.id<>dbg_stabx) then
- current_debuginfo.insertlineinfo(tmplist);
- list.concatlist(tmplist);
- tmplist.Free;
- current_filepos:=oldfileposinfo;
-{$endif cpuhighleveltarget}
+
+ if usehighlevelwrapper then
+ begin
+ new(wrapperinfo);
+ wrapperinfo^.pd:=pd;
+ wrapperinfo^.offset:=ImplIntf.ioffset;
+ { insert the wrapper procdef in the current unit's local
+ symbol table, but set the owning "struct" to the current
+ class (so self will have the correct type) }
+ wrapperpd:=create_procdef_alias(pd,tmps,tmps,
+ current_module.localsymtable,_class,
+ tsk_interface_wrapper,wrapperinfo);
+ include(wrapperpd.implprocoptions,pio_thunk);
+ end
+ else
+ begin
+ oldfileposinfo:=current_filepos;
+ if pd.owner.iscurrentunit then
+ current_filepos:=pd.fileinfo
+ else
+ begin
+ current_filepos.moduleindex:=current_module.unit_index;
+ current_filepos.fileindex:=1;
+ current_filepos.line:=1;
+ current_filepos.column:=1;
+ end;
+ { create wrapper code }
+ tmplist:=tasmlist.create;
+ new_section(tmplist,sec_code,tmps,target_info.alignment.procalign);
+ tmplist.Concat(tai_function_name.create(tmps));
+ hlcg.init_register_allocators;
+ hlcg.g_intf_wrapper(tmplist,pd,tmps,ImplIntf.ioffset);
+ hlcg.done_register_allocators;
+ if ((cs_debuginfo in current_settings.moduleswitches) or
+ (cs_use_lineinfo in current_settings.globalswitches)) and
+ (target_dbg.id<>dbg_stabx) then
+ current_debuginfo.insertlineinfo(tmplist);
+ list.concatlist(tmplist);
+ tmplist.Free;
+ current_filepos:=oldfileposinfo;
+ end;
end;
end;
end;
end;
diff -U4 -r fpcbuild-3.2.2--orig/fpcsrc/compiler/powerpc64/cgcpu.pas fpcbuild-3.2.2--patched/fpcsrc/compiler/powerpc64/cgcpu.pas
--- fpcbuild-3.2.2--orig/fpcsrc/compiler/powerpc64/cgcpu.pas 2018-04-22 19:03:16.000000000 +0200
+++ fpcbuild-3.2.2--patched/fpcsrc/compiler/powerpc64/cgcpu.pas 2022-02-05 18:58:45.936363402 +0100
@@ -336,12 +336,8 @@
into tempreg }
reference_reset_base(tmpref, reg, 0, ctempposinvalid, sizeof(pint), []);
a_load_ref_reg(list, OS_ADDR, OS_ADDR, tmpref, tempreg);
- { save TOC pointer in stackframe }
- reference_reset_base(tmpref, NR_STACK_POINTER_REG, get_rtoc_offset, ctempposinvalid, 8, []);
- a_load_reg_ref(list, OS_ADDR, OS_ADDR, NR_RTOC, tmpref);
-
{ move actual function pointer to CTR register }
list.concat(taicpu.op_reg(A_MTCTR, tempreg));
{ load new TOC pointer from function descriptor into RTOC register }
@@ -1268,8 +1264,15 @@
list.concat(taicpu.op_reg_reg_reg(A_STDUX, NR_R1, NR_R1, NR_R0));
end;
end;
+ { save current RTOC for restoration after calls if necessary }
+ if pi_do_call in current_procinfo.flags then
+ begin
+ reference_reset_base(href,NR_STACK_POINTER_REG,get_rtoc_offset,ctempposinvalid,target_info.stackalign,[]);
+ a_load_reg_ref(list,OS_ADDR,OS_ADDR,NR_RTOC,href);
+ end;
+
{ CR register not used by FPC atm }
{ keep R1 allocated??? }
a_reg_dealloc(list, NR_R0);
diff -U4 -r fpcbuild-3.2.2--orig/fpcsrc/compiler/ppcgen/cgppc.pas fpcbuild-3.2.2--patched/fpcsrc/compiler/ppcgen/cgppc.pas
--- fpcbuild-3.2.2--orig/fpcsrc/compiler/ppcgen/cgppc.pas 2020-09-15 21:40:36.000000000 +0200
+++ fpcbuild-3.2.2--patched/fpcsrc/compiler/ppcgen/cgppc.pas 2022-02-05 19:00:55.758168678 +0100
@@ -1054,8 +1054,9 @@
(target_info.system in systems_aix)) and
(assigned(ref.symbol) and
not assigned(ref.relsymbol)) then
begin
+ include(current_procinfo.flags,pi_needs_got);
tmpreg := load_got_symbol(list, ref.symbol.name, asmsym2indsymflags(ref.symbol));
if (ref.base = NR_NO) then
ref.base := tmpreg
else if (ref.index = NR_NO) then
Only in fpcbuild-3.2.2--patched/fpcsrc/compiler/ppcgen: cgppc.pas.orig
diff -U4 -r fpcbuild-3.2.2--orig/fpcsrc/compiler/ppcgen/hlcgppc.pas fpcbuild-3.2.2--patched/fpcsrc/compiler/ppcgen/hlcgppc.pas
--- fpcbuild-3.2.2--orig/fpcsrc/compiler/ppcgen/hlcgppc.pas 2020-08-06 11:31:05.000000000 +0200
+++ fpcbuild-3.2.2--patched/fpcsrc/compiler/ppcgen/hlcgppc.pas 2022-02-02 17:47:13.942711248 +0100
@@ -182,13 +182,18 @@
case target_info.system of
system_powerpc_darwin,
system_powerpc64_darwin:
list.concat(taicpu.op_sym(A_B,tcgppcgen(cg).get_darwin_call_stub(procdef.mangledname,false)));
- else if use_dotted_functions then
- {$note ts:todo add GOT change?? - think not needed :) }
- list.concat(taicpu.op_sym(A_B,current_asmdata.RefAsmSymbol('.' + procdef.mangledname,AT_FUNCTION)))
else
- list.concat(taicpu.op_sym(A_B,current_asmdata.RefAsmSymbol(procdef.mangledname,AT_FUNCTION)))
+ begin
+ if use_dotted_functions then
+ {$note ts:todo add GOT change?? - think not needed :) }
+ list.concat(taicpu.op_sym(A_B,current_asmdata.RefAsmSymbol('.' + procdef.mangledname,AT_FUNCTION)))
+ else
+ list.concat(taicpu.op_sym(A_B,current_asmdata.RefAsmSymbol(procdef.mangledname,AT_FUNCTION)));
+ if (target_info.system in ([system_powerpc64_linux]+systems_aix)) then
+ list.concat(taicpu.op_none(A_NOP));
+ end;
end;
List.concat(Tai_symbol_end.Createname(labelname));
end;
diff -U4 -r fpcbuild-3.2.2--orig/fpcsrc/compiler/psub.pas fpcbuild-3.2.2--patched/fpcsrc/compiler/psub.pas
--- fpcbuild-3.2.2--orig/fpcsrc/compiler/psub.pas 2020-12-17 16:22:03.000000000 +0100
+++ fpcbuild-3.2.2--patched/fpcsrc/compiler/psub.pas 2022-02-02 17:27:09.120255281 +0100
@@ -2305,10 +2305,12 @@
either be symcreat- or hlcgobj-based
}
if (not pd.forwarddef) and
(pd.hasforward) and
- (proc_get_importname(pd)<>'') then
- call_through_new_name(pd,proc_get_importname(pd))
+ (proc_get_importname(pd)<>'') then begin
+ call_through_new_name(pd,proc_get_importname(pd))
+ include(pd.implprocoptions,pio_thunk);
+ end
else
{$endif cpuhighleveltarget}
begin
create_hlcodegen;
diff -U4 -r fpcbuild-3.2.2--orig/fpcsrc/compiler/symconst.pas fpcbuild-3.2.2--patched/fpcsrc/compiler/symconst.pas
--- fpcbuild-3.2.2--orig/fpcsrc/compiler/symconst.pas 2019-08-31 13:43:41.000000000 +0200
+++ fpcbuild-3.2.2--patched/fpcsrc/compiler/symconst.pas 2022-02-02 17:24:00.943089235 +0100
@@ -424,9 +424,19 @@
timplprocoption = (
{ the routine contains no code }
pio_empty,
{ the inline body of this routine is available }
- pio_has_inlininginfo
+ pio_has_inlininginfo,
+ { inline is not possible (has assembler block, etc) }
+ pio_inline_not_possible,
+ { a nested routine accesses a local variable from this routine }
+ pio_nested_access,
+ { a stub/thunk }
+ pio_thunk,
+ { compiled with fastmath enabled }
+ pio_fastmath,
+ { inline is forbidden (calls get_frame) }
+ pio_inline_forbidden
);
timplprocoptions = set of timplprocoption;
{ kinds of synthetic procdefs that can be generated }
diff -U4 -r fpcbuild-3.2.2--orig/fpcsrc/compiler/systems.pas fpcbuild-3.2.2--patched/fpcsrc/compiler/systems.pas
--- fpcbuild-3.2.2--orig/fpcsrc/compiler/systems.pas 2020-09-29 16:53:00.000000000 +0200
+++ fpcbuild-3.2.2--patched/fpcsrc/compiler/systems.pas 2022-02-05 21:45:42.560186621 +0100
@@ -392,8 +392,18 @@
{ all systems where a value parameter passed by reference must be copied
on the caller side rather than on the callee side }
systems_caller_copy_addr_value_para = [system_aarch64_ios,system_aarch64_darwin,system_aarch64_linux];
+ { all PPC systems that use a TOC register to address globals }
+ { TODO: not used by Darwin, but don't know about others (JM) }
+ systems_ppc_toc = [
+ system_powerpc_linux,
+ system_powerpc64_linux,
+ system_powerpc_aix,
+ system_powerpc64_aix,
+ system_powerpc_macosclassic
+ ];
+
{ pointer checking (requires special code in FPC_CHECKPOINTER,
and can never work for libc-based targets or any other program
linking to an external library)
}
diff -U4 -r fpcbuild-3.2.2--orig/fpcsrc/compiler/utils/ppuutils/ppudump.pp fpcbuild-3.2.2--patched/fpcsrc/compiler/utils/ppuutils/ppudump.pp
--- fpcbuild-3.2.2--orig/fpcsrc/compiler/utils/ppuutils/ppudump.pp 2020-09-15 21:40:36.000000000 +0200
+++ fpcbuild-3.2.2--patched/fpcsrc/compiler/utils/ppuutils/ppudump.pp 2022-02-02 17:25:26.671620712 +0100
@@ -3086,9 +3086,14 @@
end;
const
piopt : array[low(timplprocoption)..high(timplprocoption)] of tpiopt=(
(mask:pio_empty; str:'IsEmpty'),
- (mask:pio_has_inlininginfo; str:'HasInliningInfo')
+ (mask:pio_has_inlininginfo; str:'HasInliningInfo'),
+ (mask:pio_inline_not_possible; str:'InlineNotPossible'),
+ (mask:pio_nested_access; str:'NestedAccess'),
+ (mask:pio_thunk; str:'Thunk'),
+ (mask:pio_fastmath; str:'FastMath'),
+ (mask:pio_inline_forbidden; str:'InlineForbidden')
);
var
i: timplprocoption;
first: boolean;

@ -0,0 +1,303 @@
#
# Config file generated by fpcmkcfg on %BUILDDATE% - %BUILDTIME%
# Example fpc.cfg for Free Pascal Compiler
#
# ----------------------
# Defines (preprocessor)
# ----------------------
#
# nested #IFNDEF, #IFDEF, #ENDIF, #ELSE, #DEFINE, #UNDEF are allowed
#
# -d is the same as #DEFINE
# -u is the same as #UNDEF
#
#
# Some examples (for switches see below, and the -? helppages)
#
# Try compiling with the -dRELEASE or -dDEBUG on the commandline
#
# For a release compile with optimizes and strip debuginfo
#IFDEF RELEASE
-O2
-Xs
#WRITE Compiling Release Version
#ENDIF
# For a debug version compile with debuginfo and all codegeneration checks on
#IFDEF DEBUG
-gl
-Crtoi
#WRITE Compiling Debug Version
#ENDIF
# assembling
#ifdef darwin
# use pipes instead of temporary files for assembling
-ap
# path to Xcode 4.3+ utilities (no problem if it doesn't exist)
-FD/Applications/Xcode.app/Contents/Developer/usr/bin
#endif
# ----------------
# Parsing switches
# ----------------
# Pascal language mode
# -Mfpc free pascal dialect (default)
# -Mobjfpc switch some Delphi 2 extensions on
# -Mdelphi tries to be Delphi compatible
# -Mtp tries to be TP/BP 7.0 compatible
# -Mgpc tries to be gpc compatible
# -Mmacpas tries to be compatible to the macintosh pascal dialects
#
# Turn on Object Pascal extensions by default
#-Mobjfpc
# Assembler reader mode
# -Rdefault use default assembler
# -Ratt read AT&T style assembler
# -Rintel read Intel style assembler
#
# All assembler blocks are AT&T styled by default
#-Ratt
# Semantic checking
# -S2 same as -Mobjfpc
# -Sc supports operators like C (*=,+=,/= and -=)
# -Sa include assertion code.
# -Sd same as -Mdelphi
# -Se<x> error options. <x> is a combination of the following:
# <n> : compiler stops after <n> errors (default is 1)
# w : compiler stops also after warnings
# n : compiler stops also after notes
# h : compiler stops also after hints
# -Sg allow LABEL and GOTO
# -Sh Use ansistrings
# -Si support C++ styled INLINE
# -Sk load fpcylix unit
# -SI<x> set interface style to <x>
# -SIcom COM compatible interface (default)
# -SIcorba CORBA compatible interface
# -Sm support macros like C (global)
# -So same as -Mtp
# -Sp same as -Mgpc
# -Ss constructor name must be init (destructor must be done)
# -Sx enable exception keywords (default in Delphi/ObjFPC modes)
#
# Allow goto, inline, C-operators, C-vars
-Sgic
# ---------------
# Code generation
# ---------------
# Uncomment the next line if you always want static/dynamic units by default
# (can be overruled with -CD, -CS at the commandline)
#-CS
#-CD
# Set the default heapsize to 8Mb
#-Ch8000000
# Set default codegeneration checks (iocheck, overflow, range, stack)
#-Ci
#-Co
#-Cr
#-Ct
# Optimizer switches
# -Os generate smaller code
# -Oa=N set alignment to N
# -O1 level 1 optimizations (quick optimizations, debuggable)
# -O2 level 2 optimizations (-O1 + optimizations which make debugging more difficult)
# -O3 level 3 optimizations (-O2 + optimizations which also may make the program slower rather than faster)
# -Oo<x> switch on optimalization x. See fpc -i for possible values
# -OoNO<x> switch off optimalization x. See fpc -i for possible values
# -Op<x> set target cpu for optimizing, see fpc -i for possible values
#ifdef darwin
#ifdef cpui386
-Cppentiumm
-Oppentiumm
#endif
#endif
# -----------------------
# Use BuildId by default
# -----------------------
-k--build-id
# -----------------------
# Set Filenames and Paths
# -----------------------
# Both slashes and backslashes are allowed in paths
# path to the messagefile, not necessary anymore but can be used to override
# the default language
#-Fr%basepath%/lib/fpc/$fpcversion/msg/errore.msg
#-Fr%basepath%/lib/fpc/$fpcversion/msg/errorn.msg
#-Fr%basepath%/lib/fpc/$fpcversion/msg/errores.msg
#-Fr%basepath%/lib/fpc/$fpcversion/msg/errord.msg
#-Fr%basepath%/lib/fpc/$fpcversion/msg/errorr.msg
# search path for unicode binary files (FPC 2.x does not know this switch)
#ifndef VER2
-FM%sharepath%/unicode/
#endif
# searchpath for units and other system dependent things
#IFDEF CPU64
-Fu%basepath%/lib64/fpc/$fpcversion/units/$fpctarget
-Fu%basepath%/lib64/fpc/$fpcversion/units/$fpctarget/*
-Fu%basepath%/lib64/fpc/$fpcversion/units/$fpctarget/rtl
#ELSE
-Fu%basepath%/lib/fpc/$fpcversion/units/$fpctarget
-Fu%basepath%/lib/fpc/$fpcversion/units/$fpctarget/*
-Fu%basepath%/lib/fpc/$fpcversion/units/$fpctarget/rtl
#ENDIF
#ifdef cpui8086
-Fu%basepath%/units/$fpctarget/$fpcsubarch-$fpcmemorymodel
-Fu%basepath%/units/$fpctarget/$fpcsubarch-$fpcmemorymodel/*
-Fu%basepath%/units/$fpctarget/$fpcsubarch-$fpcmemorymodel/rtl
#endif
#IFDEF FPCAPACHE_1_3
#IFDEF CPU64
-Fu%basepath%/lib64/fpc/$fpcversion/units/$fpctarget/httpd13/
#ELSE
-Fu%basepath%/lib/fpc/$fpcversion/units/$fpctarget/httpd13/
#ENDIF
#ELSE
#IFDEF FPCAPACHE_2_0
#IFDEF CPU64
-Fu%basepath%/lib64/fpc/$fpcversion/units/$fpctarget/httpd20/
#ELSE
-Fu%basepath%/lib/fpc/$fpcversion/units/$fpctarget/httpd20/
#ENDIF
#ELSE
#IFDEF CPU64
-Fu%basepath%/lib64/fpc/$fpcversion/units/$fpctarget/httpd22/
#ELSE
-Fu%basepath%/lib/fpc/$fpcversion/units/$fpctarget/httpd22/
#ENDIF
#ENDIF
#ENDIF
# searchpath for fppkg user-specific packages
-Fu%localbasepath%/units/$FPCTARGET/*
# path to the gcclib
%gcclibpath%
# searchpath for libraries
#IFDEF CPU64
#-Fl%basepath%/lib64/fpc/$fpcversion/lib
#-Fl/lib64;/usr/lib64
-Fl%basepath%/lib64/fpc/$fpcversion/lib/$FPCTARGET
#ELSE
#-Fl%basepath%/lib/fpc/$fpcversion/lib
#-Fl/lib;/usr/lib
-Fl%basepath%/lib/fpc/$fpcversion/lib/$FPCTARGET
#ENDIF
# searchpath for tools
#IFDEF CPU64
-FD%basepath%/lib64/fpc/$fpcversion/bin/$FPCTARGET
#ELSE
-FD%basepath%/lib/fpc/$fpcversion/bin/$FPCTARGET
#ENDIF
%NEEDCROSSBINUTILSIFDEF%
# never need cross-prefix when targeting the JVM
# (no native compiler, always cross-compiling)
#ifdef cpujvm
#undef NEEDCROSSBINUTILS
#endif
# for android cross-prefix is set by compiler
#ifdef android
#undef NEEDCROSSBINUTILS
#endif
# never need cross-prefix when targeting the i8086
# (no native compiler, always cross-compiling)
#ifdef cpui8086
#undef NEEDCROSSBINUTILS
#endif
# never need cross-prefix when targeting the i8086
# (no native compiler, always cross-compiling)
#ifdef cpujvm
#undef NEEDCROSSBINUTILS
#endif
# binutils prefix for cross compiling
#IFDEF FPC_CROSSCOMPILING
#IFDEF NEEDCROSSBINUTILS
-XP$FPCTARGET-
#ENDIF
#ENDIF
# -------------
# Linking
# -------------
# generate always debugging information for GDB (slows down the compiling
# process)
# -gc generate checks for pointers
# -gd use dbx
# -gg use gsym
# -gh use heap trace unit (for memory leak debugging)
# -gl use line info unit to show more info for backtraces
# -gv generates programs tracable with valgrind
# -gw generate dwarf debugging info
#
# Enable debuginfo and use the line info unit by default
#-gl
# always pass an option to the linker
#-k-s
# Always strip debuginfo from the executable
-Xs
# Always use smartlinking on i8086, because the system unit exceeds the 64kb
# code limit
#ifdef cpui8086
-CX
-XX
#endif
# -------------
# Miscellaneous
# -------------
# Write always a nice FPC logo ;)
-l
# Verbosity
# e : Show errors (default) d : Show debug info
# w : Show warnings u : Show unit info
# n : Show notes t : Show tried/used files
# h : Show hints s : Show time stamps
# i : Show general info q : Show message numbers
# l : Show linenumbers c : Show conditionals
# a : Show everything 0 : Show nothing (except errors)
# b : Write file names messages r : Rhide/GCC compatibility mode
# with full path x : Executable info (Win32 only)
# v : write fpcdebug.txt with p : Write tree.log with parse tree
# lots of debugging info
#
# Display Info, Warnings and Notes
-viwn
# If you don't want so much verbosity use
#-vw

@ -0,0 +1,635 @@
%ifarch aarch64
# Bootstrap the compiler for a new architecture. Set this to 0 after we've bootstrapped.
%global bootstrap 0
%else
%global bootstrap 0
%endif
Name: fpc
Version: 3.2.2
Release: 7%{?dist}
Summary: Free Pascal Compiler
License: GPLv2+ and LGPLv2+ with exceptions
URL: http://www.freepascal.org/
Source0: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/source/fpcbuild-%{version}.tar.gz
# This is only needed when we're bootstrapping.
# But it's not in an 'if defined' block, since the file has to be included in the srpm
# Thus you should enable this line when we're bootstrapping for any target
#
# Last used for aaarch64 and ppc64le bootstrap.
# For the aarch64 bootstrap, a compiler has been used that has been cross-compiled on a x86_64 system using:
# make all CPU_TARGET=aarch64 OS_TARGET=linux BINUTILSPREFIX=aarch64-linux-gnu-
# For the ppc64 boostrap, a compiler has been used that has been cross-compiled on a x86_64 system using:
# make all CPU_TARGET=powerpc64 OS_TARGET=linux BINUTILSPREFIX=powerpc64le-linux-gnu- CROSSOPT="-Cb- -Caelfv2"
#
# in the main directory of fpc-r44016. The compilers were then copied using:
# cp compiler/ppca64 ~/fpc-3.2.0-bin/ppca64-3.2.0-bootstrap
# cp compiler/ppcppc64 ~/fpc-3.2.0-bin/ppcppc64-3.2.0-bootstrap
# The zip file was then created using:
# zip -9 fpc-3.2.0-bin.zip -r fpc-3.2.0-bin/
#
# Source100: https://suve.fedorapeople.org/fpc-3.2.0-bin--patch0.zip
# Configuration templates:
Source10: fpc.cft
Source11: fppkg.cfg
Source12: default.cft
# On Fedora we do not want stabs debug-information. (even on 32 bit platforms)
# https://bugzilla.redhat.com/show_bug.cgi?id=1475223
Patch0: fpc-3.2.0--dwarf-debug.patch
# Allow for reproducible builds
# https://bugzilla.redhat.com/show_bug.cgi?id=1778875
Patch1: fpc-3.2.0--honor_SOURCE_DATE_EPOCH_in_date.patch
# Upstream assumes /usr/lib/ for aarch64, but Fedora uses /usr/lib64/
Patch2: fpc-3.2.0--fix-lib-paths-on-aarch64.patch
# Update for new glibc >= 2.34
# RHBZ bug: https://bugzilla.redhat.com/show_bug.cgi?id=2005910
# Upstream bug: https://gitlab.com/freepascal.org/fpc/source/-/issues/39295
Patch3: fpc-3.2.2--glibc-2.34.patch
# Fix missing TOC loads on ppc64le. A backport of upstream commits:
# - https://gitlab.com/freepascal.org/fpc/source/-/commit/12f48c230bccd49f368be1e5a2855cb6c3a60c0f
# - https://gitlab.com/freepascal.org/fpc/source/-/commit/9314bbbf080418827eef94a8bc392ce0497bf72b
# - https://gitlab.com/freepascal.org/fpc/source/-/commit/2de72c854115908271912cd9b260a607c826eadb
# - https://gitlab.com/freepascal.org/fpc/source/-/commit/83c18df69a79fe1035a0cf0bc0897c60d1af0293
# - https://gitlab.com/freepascal.org/fpc/source/-/commit/68b5ca633ca71a83c29b78cd3669bf15477cd94f
# Some modifications were made to make the changes apply cleanly to v3.2.2.
# Upstream bug report: https://gitlab.com/freepascal.org/fpc/source/-/issues/39542
Patch4: fpc-3.2.2--ppc64le-toc-fixes.patch
# The "pas2jni" util program shipped with FPC uses threads,
# but is compiled without thread support and fails to actually do anything useful when run.
# Submitted upstream: https://gitlab.com/freepascal.org/fpc/source/-/merge_requests/185
Patch5: fpc-3.2.2--pas2jni-cthreads.patch
Requires: binutils
Requires: gpm
Requires: ncurses
%if ! 0%{?bootstrap}
BuildRequires: fpc
%endif
BuildRequires: glibc-devel
BuildRequires: make
BuildRequires: tex(imakeidx.sty)
BuildRequires: tex(latex)
BuildRequires: tex(tex)
BuildRequires: tex(upquote.sty)
BuildRequires: tetex-fonts
ExclusiveArch: %{arm} aarch64 %{ix86} x86_64 ppc64le
%description
Free Pascal is a free 32/64bit Pascal Compiler. It comes with a run-time
library and is fully compatible with Turbo Pascal 7.0 and nearly Delphi
compatible. Some extensions are added to the language, like function
overloading and generics. Shared libraries can be linked. This package
contains the command-line compiler and utilities. Provided units are the
runtime library (RTL), free component library (FCL) and packages.
%package doc
Summary: Free Pascal Compiler - documentation and examples
%description doc
The fpc-doc package contains the documentation (in pdf format) and examples
of Free Pascal.
%package src
Summary: Free Pascal Compiler - sources
BuildArch: noarch
%description src
The fpc-src package contains the sources of Free Pascal, for documentation or
automatical-code generation purposes.
%global smart _smart
%global fpcopt -k"--build-id"
%global fpcdebugopt -gl
%ifarch %{arm}
%global fpcopt -dFPC_ARMHF -k"--build-id"
%global ppcname ppcarm
%global fpcarchname arm
%else
%ifarch aarch64
%global ppcname ppca64
%global fpcarchname aarch64
%else
%ifarch ppc64
%global ppcname ppcppc64
%global fpcarchname powerpc64
%else
%ifarch ppc64le
%global fpcopt -Cb- -Caelfv2 -k"--build-id"
%global ppcname ppcppc64
%global fpcarchname powerpc64
%else
%ifarch x86_64
%global ppcname ppcx64
%global fpcarchname x86_64
%else
%global ppcname ppc386
%global fpcarchname i386
%endif
%endif
%endif
%endif
%endif
%prep
%setup -n fpcbuild-%{version} -q
%if 0%{?bootstrap}
unzip %{SOURCE100}
%endif
pushd fpcsrc
%patch0
%patch1
%patch2
%patch3 -p1
%patch4 -p2
%patch5 -p1
%build
# The source-files:
mkdir -p fpc_src
cp -a fpcsrc/rtl fpc_src
cp -a fpcsrc/packages fpc_src
rm -rf fpc_src/packages/extra/amunits
rm -rf fpc_src/packages/extra/winunits
%if 0%{?bootstrap}
STARTPP=$(pwd)/fpc-%{version}-bin/%{ppcname}-%{version}-bootstrap
%else
STARTPP=%{ppcname}
%endif
pushd fpcsrc
NEWPP=$(pwd)/compiler/%{ppcname}
DATA2INC=$(pwd)/utils/data2inc
# FIXME: -j1 as there is a race on armv7hl - seen on "missing" `prt0.o' and 'dllprt0.o'.
make -j1 compiler_cycle FPC=${STARTPP} OPT='%{fpcopt} %{fpcdebugopt}'
make %{?_smp_mflags} rtl_clean rtl%{smart} FPC=${NEWPP} OPT='%{fpcopt}'
make %{?_smp_mflags} packages%{smart} FPC=${NEWPP} OPT='%{fpcopt}'
make %{?_smp_mflags} utils_all FPC=${NEWPP} DATA2INC=${DATA2INC} OPT='%{fpcopt} %{fpcdebugopt}'
popd
# FIXME: -j1 as there is a race - seen on "missing" `rtl.xct'.
make -j1 -C fpcdocs pdf FPC=${NEWPP}
%install
pushd fpcsrc
NEWPP=$(pwd)/compiler/%{ppcname}
NEWFPCMAKE=$(pwd)/utils/fpcm/bin/%{fpcarchname}-linux/fpcmake
INSTALLOPTS="-j1 FPC=${NEWPP} FPCMAKE=${NEWFPCMAKE} \
INSTALL_PREFIX=%{buildroot}%{_prefix} \
INSTALL_LIBDIR=%{buildroot}%{_libdir} \
INSTALL_BASEDIR=%{buildroot}%{_libdir}/%{name}/%{version} \
CODPATH=%{buildroot}%{_libdir}/%{name}/lexyacc \
INSTALL_DOCDIR=%{buildroot}%{_defaultdocdir}/%{name} \
INSTALL_BINDIR=%{buildroot}%{_bindir}
INSTALL_EXAMPLEDIR=%{buildroot}%{_defaultdocdir}/%{name}/examples"
make compiler_distinstall ${INSTALLOPTS}
make rtl_distinstall ${INSTALLOPTS}
make packages_distinstall ${INSTALLOPTS}
make utils_distinstall ${INSTALLOPTS}
popd
pushd install
make -C doc ${INSTALLOPTS}
make -C man ${INSTALLOPTS} INSTALL_MANDIR=%{buildroot}%{_mandir}
popd
make -C fpcdocs pdfinstall ${INSTALLOPTS}
# create link
ln -sf ../%{_lib}/%{name}/%{version}/%{ppcname} %{buildroot}%{_bindir}/%{ppcname}
# Remove the version-number from the documentation-directory
mv %{buildroot}%{_defaultdocdir}/%{name}-%{version}/* %{buildroot}%{_defaultdocdir}/%{name}
rmdir %{buildroot}%{_defaultdocdir}/%{name}-%{version}
# Create a version independent compiler-configuration file with build-id
# enabled by default
# For this purpose some non-default templates are used. So the samplecfg
# script could not be used and fpcmkcfg is called directly.
%{buildroot}%{_bindir}/fpcmkcfg -p -t %{SOURCE10} -d "basepath=%{_exec_prefix}" -o %{buildroot}%{_sysconfdir}/fpc.cfg
# Create the IDE configuration files
%{buildroot}%{_bindir}/fpcmkcfg -p -1 -d "basepath=%{_libdir}/%{name}/\$fpcversion" -o %{buildroot}%{_libdir}/%{name}/%{version}/ide/text/fp.cfg
%{buildroot}%{_bindir}/fpcmkcfg -p -2 -o %{buildroot}%{_libdir}/%{name}/%{version}/ide/text/fp.ini
# Create the fppkg configuration files
%{buildroot}%{_bindir}/fpcmkcfg -p -t %{SOURCE11} -d CompilerConfigDir=%{_sysconfdir}/fppkg -d arch=%{_arch} -o %{buildroot}%{_sysconfdir}/fppkg.cfg
%{buildroot}%{_bindir}/fpcmkcfg -p -t %{SOURCE12} -d fpcbin=%{_bindir}/fpc -d GlobalPrefix=%{_exec_prefix} -d lib=%{_lib} -o %{buildroot}%{_sysconfdir}/fppkg/default_%{_arch}
# Include the COPYING-information for the compiler/rtl/fcl in the documentation
cp -a fpcsrc/compiler/COPYING.txt %{buildroot}%{_defaultdocdir}/%{name}/COPYING
cp -a fpcsrc/rtl/COPYING.txt %{buildroot}%{_defaultdocdir}/%{name}/COPYING.rtl
cp -a fpcsrc/rtl/COPYING.FPC %{buildroot}%{_defaultdocdir}/%{name}/COPYING.FPC
# The source-files:
mkdir -p %{buildroot}%{_datadir}/fpcsrc
cp -a fpc_src/* %{buildroot}%{_datadir}/fpcsrc/
# Workaround:
# newer rpm versions do not allow garbage
# delete lexyacc (The hardcoded library path is necessary because 'make
# install' places this file hardcoded at usr/lib)
rm -rf %{buildroot}/usr/lib/%{name}/lexyacc
%files
%{_bindir}/*
%{_libdir}/%{name}
%{_libdir}/libpas2jslib.so*
%config(noreplace) %{_sysconfdir}/%{name}.cfg
%config(noreplace) %{_sysconfdir}/fppkg.cfg
%config(noreplace) %{_sysconfdir}/fppkg/default_%{_arch}
%dir %{_defaultdocdir}/%{name}/
%doc %{_defaultdocdir}/%{name}/NEWS
%doc %{_defaultdocdir}/%{name}/README
%doc %{_defaultdocdir}/%{name}/faq*
%license %{_defaultdocdir}/%{name}/COPYING*
%{_mandir}/*/*
%files doc
%dir %{_defaultdocdir}/%{name}/
%doc %{_defaultdocdir}/%{name}/*.pdf
%doc %{_defaultdocdir}/%{name}/*/*
%files src
%{_datadir}/fpcsrc
%changelog
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Wed Mar 16 2022 Artur Frenszek-Iwicki <fedora@svgames.pl> - 3.2.2-6
- Add a patch to fix pas2jni failing to run properly
* Mon Feb 07 2022 Artur Frenszek-Iwicki <fedora@svgames.pl> - 3.2.2-5
- Add a patch to fix linking errors on ppc64le
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Tue Sep 21 2021 Dan Horák <dan[at]danny.cz> - 3.2.2-3
- Update for new glibc >= 2.34
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Thu Jun 03 2021 Artur Frenszek-Iwicki <fedora@svgames.pl> - 3.2.2-1
- Update to v3.2.2
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Sat Jun 20 2020 Artur Iwicki <fedora@svgames.pl> - 3.2.0-1
- Update to v3.2.0 (official release - no longer using SVN snapshots)
- Drop Patch3 (missing consts - merged upstream)
* Wed Jun 03 2020 Artur Iwicki <fedora@svgames.pl> - 3.2.0-0.20200530svn45533.1
- Update to latest upstream SVN revision
* Mon May 04 2020 Artur Iwicki <fedora@svgames.pl> - 3.2.0-0.20200503svn45235.1
- Update to latest upstream SVN revision
* Sun Apr 12 2020 Artur Iwicki <fedora@svgames.pl> - 3.2.0-0.20200410svn44680.1
- Update to latest upstream SVN revision
* Sat Mar 28 2020 Artur Iwicki <fedora@svgames.pl> - 3.2.0-0.20200327svn44375.1
- Update to latest upstream SVN revision
* Mon Mar 16 2020 Artur Iwicki <fedora@svgames.pl> - 3.2.0-0.20200314svn44301.1
- Update to latest upstream SVN revision
* Mon Feb 24 2020 Artur Iwicki <fedora@svgames.pl> - 3.2.0-0.20200222svn44232.1
- Update to latest upstream SVN revision
* Wed Feb 12 2020 Artur Iwicki <fedora@svgames.pl> - 3.2.0-0.20200212svn44160.1
- Update to latest upstream SVN revision
* Sat Feb 08 2020 Artur Iwicki <fedora@svgames.pl> - 3.2.0-0.20200203svn44109.1
- Update to latest upstream SVN revision
* Sun Feb 02 2020 Artur Iwicki <fedora@svgames.pl> - 3.2.0-0.20200202svn44092.5
- Update to latest upstream SVN revision
* Sat Feb 01 2020 Artur Iwicki <fedora@svgames.pl> - 3.2.0-0.20200130svn44069.4
- Unmark the aarch64 build as requiring bootstrap
- Update to latest upstream SVN revision
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-0.20200122svn44016.3.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Jan 28 2020 Artur Iwicki <fedora@svgames.pl> - 3.2.0-0.20200122svn44016.3
- Bootstrap the compiler for aarch64
* Mon Jan 27 2020 Artur Iwicki <fedora@svgames.pl> - 3.2.0-0.20200122svn44016.2
- Bootstrap the compiler for ppc64le
* Sun Jan 26 2020 Artur Iwicki <fedora@svgames.pl> - 3.2.0-0.20200122svn44016.1
- Update to latest upstream SVN revision
- Drop r1448 and r38400 patches (backports from upstream)
* Sat Dec 21 2019 Artur Iwicki <fedora@svgames.pl> - 3.0.4-8
- Allow for reproducible builds by honoring the SOURCE_DATE_EPOCH variable
(patch imported from Debian)
- Mark the fpc-src package as noarch
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sat Feb 02 2019 Artur Iwicki <fedora@svgames.pl> - 3.0.4-5
- Add BuildRequires: for glibc-devel
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Sat Mar 03 2018 Richard Shaw <hobbes1069@gmail.com> - 3.0.4-2
- Add patch to fix assembly alignment code, fixes #1526848.
* Thu Mar 01 2018 Joost van der Sluis <joost@cnoc.nl> - 3.0.4-1
- Generate Dwarf debug by default on 32-bit targets (rhbz#1475223)
- Use the %%license macro instead of %%doc for licence files
* Fri Feb 09 2018 Joost van der Sluis <joost@cnoc.nl> - 3.0.4-1
- Upgrade to upstream release 3.0.4.
- Generate Dwarf- instead of Stabs-debuginfo on i686 and ARMHF
- Force armhf on arm-architectures
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Mar 18 2017 Joost van der Sluis <joost@cnoc.nl> - 3.0.2-1
- Upgrade to upstream release 3.0.2.
- Attempt to fix race-problem during compiler-compilation on ARM
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Sat Feb 4 2017 Joost van der Sluis <joost@cnoc.nl> - 3.0.0-5
- Drop powerpc64-arm binary added for bootstrapping on powerpc64,
completing the bootstrap procedure
* Mon Jan 30 2017 Joost van der Sluis <joost@cnoc.nl> - 3.0.0-4
- Bootstrap ppc64 using cross-compiled compiler binary
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Mon Jan 11 2016 Joost van der Sluis <joost@cnoc.nl> - 3.0.0-2
- Drop fpc-arm binary added for bootstrapping on ARM, completing the
bootstrap procedure
* Sat Jan 9 2016 Joost van der Sluis <joost@cnoc.nl> - 3.0.0-1
- Upgrade to upstream release 3.0.0.
- Bootstrap ARM using cross-compiled armhl binaries, because the
(patched) 2.6.4-ARM compiler in the repository is not able to compile the
3.0.0 release.
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Mar 7 2015 Joost van der Sluis <joost@cnoc.nl> - 2.6.4-1
- Upgrade to upstream release 2.6.4.
* Tue Jan 20 2015 Dan Horák <dan[at]danny.cz> - 2.6.2-7
- switch to ExclusiveArch
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Thu Aug 08 2013 Hans de Goede <hdegoede@redhat.com> - 2.6.2-4
- Drop fpc binaries added to the src.rpm for bootstrapping on ARM, completing
the boostrap procedure (rhbz#992285)
* Thu Aug 08 2013 Hans de Goede <hdegoede@redhat.com> - 2.6.2-3
- Bootstrap for arm using Debian fpc-2.6.2 armhf binaries (rhbz#992285)
- Use an unversioned docdir (rhbz#993758)
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Wed Apr 24 2013 Joost van der Sluis <joost@cnoc.nl> - 2.6.2-1
- Upgrade to upstream release 2.6.2.
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.2-0.2.rc1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sat Nov 24 2012 Bruno Wolff III <bruno@wolff.to> - 2.6.2-0.1.rc1
- Use standard versioning, so non-rc versions will be higher
- Fix issue with some things using 'rc1' appended to version name and others not
* Sat Nov 3 2012 Joost van der Sluis <joost@cnoc.nl> - 2.6.2rc1-1
- Upgrade to upstream release 2.6.2rc1.
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Mon May 14 2012 Karsten Hopp <karsten@redhat.com> 2.6.0-2
- define ppcname on ppc64
* Fri Jan 27 2012 Joost van der Sluis <joost@cnoc.nl> - 2.6.0-1
- Upgrade to upstream release 2.6.0.
- Do not use samplecfg for generating the configuration files anymore, but
call fpcmkcfg directly.
- Changed the name of the project from Freepascal to Free Pascal
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Wed Jan 5 2011 Joost van der Sluis <joost@cnoc.nl> - 2.4.2-1
- Upgrade to upstream release 2.4.2.
* Sat Oct 23 2010 Joost van der Sluis <joost@cnoc.nl> - 2.4.2-0.1.rc1
- Upgrade to upstream release 2.4.2rc1.
* Wed May 5 2010 Joost van der Sluis <joost@cnoc.nl> - 2.4.0-1.fc14
- Drop fpc-2.2.4-stackexecute.patch since bug was fixed in 2.4.0
* Tue May 4 2010 Jan Kratochvil <jan.kratochvil@redhat.com> - 2.4.0-0.fc14
- Upgrade to upstream release 2.4.0.
- Drop fpc-2.2.4-r12475.patch as present in 2.4.0.
- Base the .spec build on upstream released archive (fpcbuild-2.4.0.tar.gz).
- Remove the obsolete .spec BuildRoot tag.
- Remove BuildRequires for binutils and glibc-devel as guaranteed as always
provided in Fedora Packaging Guidlines.
- Remove Requires glibc as guaranteed on a Fedora system.
- Add %%{?_smp_mflags} and -j1 appropriately, applied one -j1 workaround.
- Change {compiler,rtl}/COPYING to COPYING.txt.
* Tue Oct 6 2009 Joost van der Sluis <joost@cnoc.nl> 2.2.4-4
- fixed procvar parameter passing on ppc/sysv (by value instead of by
reference -- except for method procvars, for tmethod record compatibility)
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Thu Jun 18 2009 Dan Horak <dan[at]danny.cz> 2.2.4-2
- Exclude s390/s390x architectures
* Sun Apr 19 2009 Joost van der Sluis <joost@cnoc.nl> 2.2.4-1
- Updated to version 2.2.4
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Sat Oct 25 2008 Joost van der Sluis <joost@cnoc.nl> 2.2.2-3
- Do not distribute the RTL and packages with debug-info included
- Fix the location of the fpc-binary in the samplecfg script
* Sun Oct 19 2008 Joost van der Sluis <joost@cnoc.nl> 2.2.2-2
- Pass -z noexecstack to the linker from within the configuration file fpc.cfg (fpc-bug #11563)
- Added patch to fix fpc-bug #11837 for usage with newer gtk2-versions
* Wed Aug 13 2008 Joost van der Sluis <joost@cnoc.nl> 2.2.2-1
- Updated to version 2.2.2
- Disabled debuginfo for ppc64 again
- Detect 32 or 64 bit compilation in the configuration file fpc.cfg
* Sun Jun 22 2008 Joost van der Sluis <joost@cnoc.nl> 2.2.2rc1-1
- Updated to version 2.2.2rc1
- Enabled debuginfo for ppc64 again
- Do not strip the debugdata on x86_64 anymore
- Packages_base, packages_fcl and packages_extra are merged into packages
- Don't install packages_fv separately anymore
- Fix for incorrect path in official fpc 2.2.2rc1-sourcefile
- Updated licence-tag from "GPL and modified LGPL" to fedora-tag "GPLv2+ and LGPLv2+ with exceptions"
- Removed UsePrebuildcompiler define for ppc64
* Wed Apr 16 2008 Joost van der Sluis <joost@cnoc.nl> 2.2.0-12
- Fix for DWARF-debug generation - fixes some more build problems on x86_64 and F9, bugzilla 337051
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.2.0-11
- Autorebuild for GCC 4.3
* Tue Oct 16 2007 Joost van der Sluis <joost@cnoc.nl> 2.2.0-10
- Strip the debuginfo from grab_vcsa and ppudump, since debugedit chokes on it
- Only strip debugdata on x86_64
* Tue Oct 16 2007 Joost van der Sluis <joost@cnoc.nl> 2.2.0-9
- Strip the debuginfo from mkxmlrpc, since debugedit chokes on it
* Tue Oct 16 2007 Joost van der Sluis <joost@cnoc.nl> 2.2.0-8
- Strip the debuginfo from h2pas, since debugedit chokes on it
* Tue Oct 16 2007 Joost van der Sluis <joost@cnoc.nl> 2.2.0-7
- Include the startcompiler on all targets, for the srpm-building
* Tue Oct 16 2007 Joost van der Sluis <joost@cnoc.nl> 2.2.0-6
- Disabled debuginfo for ppc64 only
- Enabled smart-linking on ppc64
- Added a patch for building documentation without fpc already installed
* Tue Oct 16 2007 Joost van der Sluis <joost@cnoc.nl> 2.2.0-5
- Disabled debuginfo
* Tue Oct 16 2007 Joost van der Sluis <joost@cnoc.nl> 2.2.0-4
- Enabled BuildId, added it to fpc.cfg
* Tue Oct 16 2007 Joost van der Sluis <joost@cnoc.nl> 2.2.0-3
- Disabled smart-linking on ppc64
* Tue Oct 16 2007 Joost van der Sluis <joost@cnoc.nl> 2.2.0-2
- Buildrequirement fpc is not needed when using a pre-built compiler binary
* Sun Oct 14 2007 Joost van der Sluis <joost@cnoc.nl> 2.2.0-1
- Updated to version 2.2.0
- Updated description
- Enabled smart-linking for ppc
- Do not include the built binary-files in fpc-src
- Added support for ppc64
- Added support to configuration file for dual 32/64 bit installations
- Fixed and enabled debug-package
* Sat Sep 16 2006 Joost van der Sluis <joost@cnoc.nl> 2.0.4-2
- Fixed documentation building on powerpc
* Fri Sep 15 2006 Joost van der Sluis <joost@cnoc.nl> 2.0.4-1
- Updated to version 2.0.4
* Wed Mar 1 2006 Joost van der Sluis <joost@cnoc.nl> 2.0.2-4
- Rebuild for Fedora Extras 5
* Tue Dec 20 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.2-3
- Disabled smart-linking for ppc
* Tue Dec 20 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.2-2
- Updated fpc-2.0.2-G5.patch
* Tue Dec 20 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.2-1
- Updated to version 2.0.2
* Wed Aug 17 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-4
- Added %%{?dist} to release.
* Wed Aug 17 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-3
- replaced the ppcpcc-2.1.1 startcompilercompiler for the
ppcppc-2.0.0 startcompiler
* Wed Aug 17 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-2
- Added a patch for compilation on POWER5, and provided
the new ppcppc binary/startcompiler
* Fri Aug 5 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-1
- Removed gpm-devel requirement
- Fixed a type in the -src description
* Thu Jul 28 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-1
- Added some requirements
- Added COPYING-info to %%doc
* Tue Jun 28 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-0.6
- Only rtl, fcl and packages are added to src-subpackage
- Silenced post-script
- disabled the debuginfo-package
* Sun Jun 5 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-0.5
- Added doc-subpackage
- Added src-subpackage
* Fri Jun 3 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-0.4
- New fix for lib64 on x86_64
- small patches from Jens Petersen <petersen@redhat.com>
* Thu May 26 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-0.3
- replaced 'lib' and 'lib64' by %%{_lib}
* Tue May 24 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-0.2
- Fixed for lib64 on x86_64
- Changed summary, description and license
- Removed examples from installation
- Make clean removed from clean-section
- Clean-up
- replaced $RPM_BUILD_ROOT by %%{buildroot}
* Mon May 23 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-0.1
- Initial build.

@ -0,0 +1,11 @@
[Defaults]
ConfigVersion=4
LocalRepository=%LocalRepository%
BuildDir={LocalRepository}build/
ArchivesDir={LocalRepository}archives/
CompilerConfigDir=%CompilerConfigDir%
RemoteMirrors=http://www.freepascal.org/repository/mirrors.xml
RemoteRepository=auto
CompilerConfig=default_%arch%
FPMakeCompilerConfig=default_%arch%
Downloader=lnet

@ -0,0 +1 @@
SHA512 (fpcbuild-3.2.2.tar.gz) = 75889bb54adc70a6e2cbd291476b9b12d61c8f943a05b7d16d2024de3215c935465ff43b1400c412e128e260c7f49a9c66e35c21f86cb866e671b5b60a282d82
Loading…
Cancel
Save