diff --git a/.gitignore b/.gitignore index b3ec925..4d133fc 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /fpcbuild-r1430.zip /fpcdocs-r1681.zip /fpc-3.2.0-bin.zip +/fpc-3.2.0-bin--patch0.zip diff --git a/fpc-3.2.0-fix-lib-paths-on-aarch64.patch b/fpc-3.2.0-fix-lib-paths-on-aarch64.patch new file mode 100644 index 0000000..3832536 --- /dev/null +++ b/fpc-3.2.0-fix-lib-paths-on-aarch64.patch @@ -0,0 +1,32 @@ +--- 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} +@@ -222,9 +229,9 @@ + {$endif FPC_ARMHF} + {$endif arm} + + {$ifdef aarch64} +-const defdynlinker='/lib/ld-linux-aarch64.so.1'; ++const defdynlinker='/lib64/ld-linux-aarch64.so.1'; + {$endif aarch64} + + {$ifdef mips} + const defdynlinker='/lib/ld.so.1'; diff --git a/fpc.spec b/fpc.spec index c24a578..e8c61e8 100644 --- a/fpc.spec +++ b/fpc.spec @@ -1,4 +1,4 @@ -%ifarch ppc64le aarch64 +%ifarch aarch64 # Bootstrap the compiler for a new architecture. Set this to 0 after we've bootstrapped. %global bootstrap 1 %else @@ -13,7 +13,7 @@ Name: fpc Version: 3.2.0 -Release: 0.%{fpc_svn_date}svn%{fpc_svn_rev}.2%{?dist} +Release: 0.%{fpc_svn_date}svn%{fpc_svn_rev}.3%{?dist} Summary: Free Pascal Compiler License: GPLv2+ and LGPLv2+ with exceptions @@ -52,7 +52,7 @@ Source2: fpcdocs-r%{docs_svn_rev}.zip # 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.zip +Source100: https://suve.fedorapeople.org/fpc-3.2.0-bin--patch0.zip # Configuration templates: Source10: fpc.cft @@ -67,6 +67,9 @@ Patch0: fpc-3.2.0-dwarfdebug.patch # 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 + Requires: gpm, ncurses, binutils %if ! 0%{?bootstrap} BuildRequires: fpc @@ -74,7 +77,7 @@ BuildRequires: fpc BuildRequires: glibc-devel BuildRequires: tex(tex), tex(latex), tetex-fonts -ExclusiveArch: %{arm} %{ix86} x86_64 ppc64le +ExclusiveArch: %{arm} aarch64 %{ix86} x86_64 ppc64le %description Free Pascal is a free 32/64bit Pascal Compiler. It comes with a run-time @@ -148,6 +151,7 @@ unzip %{SOURCE100} pushd fpcsrc %patch0 %patch1 +%patch2 %build @@ -261,6 +265,9 @@ rm -rf %{buildroot}/usr/lib/%{name}/lexyacc %changelog +* Tue Jan 28 2020 Artur Iwicki - 3.2.0-0.20200122svn44016.3 +- Bootstrap the compiler for aarch64 + * Mon Jan 27 2020 Artur Iwicki - 3.2.0-0.20200122svn44016.2 - Bootstrap the compiler for ppc64le diff --git a/sources b/sources index 6e9111b..40d3708 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (fpc-r44016.zip) = 40693645e1c56723f67f1822736be0759ea698e87d190c53a4c40c8e593797ee37d7dcc9d4a7deabdafb7e09d0252639a135c47edad1d1822447d6cb33ac0500 SHA512 (fpcbuild-r1430.zip) = 4a42b36b63ce931d457bfa489a5a28fa3cefd5b997bb796ea6e57ab0b9c5999d7e5b018846cba64558344116cfcaac7dbfd9edc5dddb3b83f95fb1774f08a314 SHA512 (fpcdocs-r1681.zip) = 7b4e8f88dfa8730eec70b3786c4f4addbc96bea55571e91a6e1fa6fc6d2e3ac0cf7f4c749aec931b4342b0e430fcdd4cdf8629449279b3d39ad2a6ee1255a0cf -SHA512 (fpc-3.2.0-bin.zip) = 564d979218fe89527ec4194df174ae8d60770433f53328664e0435e2ee9d9d0406684e87133d9fe253492d14b4d29f8690da391e3ede25622e8dec593080e1be +SHA512 (fpc-3.2.0-bin--patch0.zip) = c1fd1917956e8364fb6d0c7556fe8ac16041ae308bb06c8ddb36fd995f3f8fbb2f12d799291cd9c4e1c5a121130bd60805413d2d44c86678741eae5dfc7beca2