Hello community,

here is the log from the commit of package fpc for openSUSE:Factory checked in 
at 2020-09-25 16:27:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/fpc (Old)
 and      /work/SRC/openSUSE:Factory/.fpc.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "fpc"

Fri Sep 25 16:27:01 2020 rev:8 rq:837228 version:3.2.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/fpc/fpc.changes  2020-08-23 09:18:52.350608427 
+0200
+++ /work/SRC/openSUSE:Factory/.fpc.new.4249/fpc.changes        2020-09-25 
16:28:53.215749645 +0200
@@ -1,0 +2,16 @@
+Thu Sep 24 06:30:04 UTC 2020 - Dirk Mueller <[email protected]>
+
+- add aarch64-fpc-compilation-fix.patch: pass vfp flags to 
+  gas
+- Handle fpu initialization (bsc#1122855):
+  * add aarch64-fpu-initialization.patch: initialize fpu properly
+  * aarch64: disable bootstrap mode
+
+-------------------------------------------------------------------
+Mon Sep 21 15:02:29 UTC 2020 - Tom de Vries <[email protected]>
+
+- Backport r46209 - "@PLT is needed for calls to link it properly
+  with pic code" [bsc#1176706]:
+  * fpc-si_c-x86_64-plt.patch
+
+-------------------------------------------------------------------

New:
----
  aarch64-fpc-compilation-fix.patch
  aarch64-fpu-initialization.patch
  fpc-si_c-x86_64-plt.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ fpc.spec ++++++
--- /var/tmp/diff_new_pack.PbHty2/_old  2020-09-25 16:28:56.059752162 +0200
+++ /var/tmp/diff_new_pack.PbHty2/_new  2020-09-25 16:28:56.063752166 +0200
@@ -22,7 +22,7 @@
 %global psuffix -%{flavor}
 %endif
 
-%ifarch aarch64 ppc64le ppc64 ppc
+%ifarch ppc64le ppc64 ppc
 # Bootstrap the compiler for a new architecture. Set this to 0 after we've 
bootstrapped.
 %bcond_without bootstrap
 %else
@@ -68,10 +68,13 @@
 Release:        0
 %if "%{flavor}" == ""
 Summary:        Free Pascal Compiler
+License:        GPL-2.0-or-later AND LGPL-2.1-or-later
+Group:          Documentation/Other
 %else
 Summary:        Freepascal Compiler documentation
-%endif
 License:        GPL-2.0-or-later AND LGPL-2.1-or-later
+Group:          Documentation/Other
+%endif
 URL:            https://www.freepascal.org/
 Source:         fpcbuild-%{version}.tar.gz
 Source1:        fpc-3.2.0-aarch64.zip
@@ -80,6 +83,10 @@
 Source4:        fpc-3.2.0-ppc.zip
 Source90:       fpc-rpmlintrc
 Patch0:         fpc-fix-library-paths-on-aarch64.patch
+Patch1:         fpc-si_c-x86_64-plt.patch
+Patch2:         aarch64-fpc-compilation-fix.patch
+# From 
https://github.com/graemeg/freepascal/commit/aad68409bec902e39f9292930238edd32dbc5ac7
+Patch3:         aarch64-fpu-initialization.patch
 BuildRequires:  binutils
 %if 0%{?suse_version}
 BuildRequires:  fdupes
@@ -150,6 +157,9 @@
 %prep
 %setup -q -n fpcbuild-%{version}
 %patch0 -p1
+%patch1 -p0
+%patch2 -p1
+%patch3 -p1
 
 %if %{with bootstrap}
 %if "%{flavor}" == ""

++++++ aarch64-fpc-compilation-fix.patch ++++++
--- fpcbuild-3.2.0/fpcsrc/compiler/arm/agarmgas.pas     (Revision 46921)
+++ fpcbuild-3.2.0/fpcsrc/compiler/arm/agarmgas.pas     (Revision 46922)
@@ -105,6 +105,12 @@
         result:=inherited MakeCmdLine;
         if (current_settings.fputype = fpu_soft) then
           result:='-mfpu=softvfp '+result;
+        if (current_settings.fputype = fpu_fpa) then
+          result:='-mfpu=fpa '+result;
+        if (current_settings.fputype = fpu_fpa10) then
+          result:='-mfpu=fpa10 '+result;
+        if (current_settings.fputype = fpu_fpa11) then
+          result:='-mfpu=fpa11 '+result;
         if (current_settings.fputype = fpu_vfpv2) then
           result:='-mfpu=vfpv2 '+result;
         if (current_settings.fputype = fpu_vfpv3) then

++++++ aarch64-fpu-initialization.patch ++++++
--- fpcbuild-3.2.0/fpcsrc/compiler/aarch64/cgcpu.pas    2018-12-13 
19:27:26.000000000 +0100
+++ fpcbuild-3.2.0/fpcsrc/compiler/aarch64/cgcpu.pas    2020-09-24 
09:53:53.047492225 +0200
@@ -980,6 +980,7 @@
             { Notify the register allocator that we have written a move
               instruction so it can try to eliminate it. }
             add_move_instruction(instr);
+            { FMOV cannot generate a floating point exception }
           end
         else
           begin
--- fpcbuild-3.2.0/fpcsrc/rtl/aarch64/aarch64.inc       2015-02-23 
23:54:03.000000000 +0100
+++ fpcbuild-3.2.0/fpcsrc/rtl/aarch64/aarch64.inc       2020-09-24 
13:52:50.744053033 +0200
@@ -50,26 +50,46 @@
     mrs x0,fpsr
   end;
 
+const
+  FPSR_IOC = 1;
+  FPSR_DZC = 1 shl 1;
+  FPSR_OFC = 1 shl 2;
+  FPSR_UFC = 1 shl 3;
+  FPSR_IXC = 1 shl 4;
+  FPSR_IDC = 1 shl 7;
+  FPSR_EXCEPTIONS = FPSR_IOC or FPSR_DZC or FPSR_OFC or FPSR_UFC or FPSR_IXC 
or FPSR_IDC;
 
 procedure setfpsr(val: dword); nostackframe; assembler;
   asm
     msr fpsr, x0
   end;
 
-
-procedure fpc_enable_fpu_exceptions;
+{$define FPC_SYSTEM_HAS_SYSINITFPU}
+procedure SysInitFPU;
   begin
+    softfloat_rounding_mode:=rmNearest;
+    { 0 is rmNearest }
+    setfpcr(getfpcr and $ff3fffff);
     { clear all "exception happened" flags we care about}
-    setfpsr(getfpsr and not(fpu_exception_mask shr 
fpu_exception_mask_to_status_mask_shift));
-    { enable invalid operations and division by zero exceptions. }
-    setfpcr(getfpcr or fpu_exception_mask);
+     setfpsr(getfpsr and not(fpu_exception_mask shr 
fpu_exception_mask_to_status_mask_shift));
+     { enable invalid operations and division by zero exceptions. }
+    setfpcr(((getfpcr and not(fpu_exception_mask)) or fpu_dze or fpu_ofe or 
fpu_ioe));
+    
softfloat_exception_mask:=[float_flag_underflow,float_flag_inexact,float_flag_denormal];
+    softfloat_exception_flags:=[];
   end;
 
+{$define FPC_SYSTEM_HAS_SYSRESETFPU}
+Procedure SysResetFPU;{$ifdef SYSTEMINLINE}inline;{$endif}
+begin
+  softfloat_exception_flags:=[];
+  setfpsr(getfpsr and not(FPSR_EXCEPTIONS));
+end;
+
 procedure fpc_cpuinit;
   begin
     { don't let libraries influence the FPU cw set by the host program }
     if not IsLibrary then
-      fpc_enable_fpu_exceptions;
+      SysInitFPU;
   end;
 
 




++++++ fpc-si_c-x86_64-plt.patch ++++++
Index: fpcsrc/rtl/linux/x86_64/si_c.inc
===================================================================
--- fpcsrc/rtl/linux/x86_64/si_c.inc    (revision 46208)
+++ fpcsrc/rtl/linux/x86_64/si_c.inc    (revision 46209)
@@ -86,7 +86,7 @@
 
     { start the program }
     xorq    %rbp,%rbp
-    call    PASCALMAIN
+    call    PASCALMAIN@PLT
 {$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
     hlt
   end;
@@ -162,7 +162,7 @@
 
     { Call the user's main function, and exit with its value.
      But let the libc call main.    }
-    call libc_start_main
+    call libc_start_main@PLT
 
     hlt                     { Crash if somehow `exit' does return.  }
   end;

Reply via email to