diff --git a/.gitignore b/.gitignore index 1875400..b3ec925 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /fpc-r44016.zip /fpcbuild-r1430.zip /fpcdocs-r1681.zip +/fpc-3.2.0-bin.zip diff --git a/fpc.spec b/fpc.spec index b804f0e..c24a578 100644 --- a/fpc.spec +++ b/fpc.spec @@ -1,8 +1,8 @@ -%ifarch ppc64 -# Bootstrap the ppc64-compiler. Set this to 0 after we've bootstrapped. -%{!?_with_bootstrap: %global bootstrap 0} +%ifarch ppc64le aarch64 +# Bootstrap the compiler for a new architecture. Set this to 0 after we've bootstrapped. +%global bootstrap 1 %else -%{!?_with_bootstrap: %global bootstrap 0} +%global bootstrap 0 %endif %global fpc_svn_rev 44016 @@ -13,7 +13,7 @@ Name: fpc Version: 3.2.0 -Release: 0.%{fpc_svn_date}svn%{fpc_svn_rev}.1%{?dist} +Release: 0.%{fpc_svn_date}svn%{fpc_svn_rev}.2%{?dist} Summary: Free Pascal Compiler License: GPLv2+ and LGPLv2+ with exceptions @@ -41,12 +41,18 @@ Source2: fpcdocs-r%{docs_svn_rev}.zip # 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 ppc64 bootstrap, 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=ppc64-linux-gnu- -# in the fpcsrc directory of fpcbuild-3.0.0.tar.gz. The compiler is then copied from -# fpcsrc/compiler/ppcppc64 to fpc-3.0.0-bin-ppcppc64/bin/ppcppc64-3.0.0. -# Source1: https://joost.fedorapeople.org/fpc-3.0.0-bin-ppc64.tar.gz +# 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.zip # Configuration templates: Source10: fpc.cft @@ -68,7 +74,7 @@ BuildRequires: fpc BuildRequires: glibc-devel BuildRequires: tex(tex), tex(latex), tetex-fonts -ExclusiveArch: %{arm} %{ix86} x86_64 ppc ppc64 +ExclusiveArch: %{arm} %{ix86} x86_64 ppc64le %description Free Pascal is a free 32/64bit Pascal Compiler. It comes with a run-time @@ -93,39 +99,41 @@ BuildArch: noarch The fpc-src package contains the sources of Free Pascal, for documentation or automatical-code generation purposes. -%define smart _smart -%define fpcopt -k"--build-id" -%define fpcdebugopt -gl -%ifarch ppc -%define ppcname ppcppc -%define fpcarchname ppc -%else -%ifarch x86_64 -%define ppcname ppcx64 -%define fpcarchname x86_64 -%else -%ifarch ppc64 -%define ppcname ppcppc64 -%define fpcarchname powerpc64 -%else +%global smart _smart +%global fpcopt -k"--build-id" +%global fpcdebugopt -gl %ifarch %{arm} -%define fpcopt -dFPC_ARMHF -k"--build-id" -%define ppcname ppcarm -%define fpcarchname arm + %global fpcopt -dFPC_ARMHF -k"--build-id" + %global ppcname ppcarm + %global fpcarchname arm %else -%define ppcname ppc386 -%define fpcarchname i386 -%endif -%endif -%endif + %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 -%if 0%{?bootstrap} -%setup -a1 -n fpcbuild-%{version} -q -%else %setup -n fpcbuild-r%{build_svn_rev} -q -%endif unzip %{SOURCE1} mv fpc-r%{fpc_svn_rev} fpcsrc/ @@ -133,6 +141,10 @@ mv fpc-r%{fpc_svn_rev} fpcsrc/ unzip %{SOURCE2} mv fpcdocs-r%{docs_svn_rev}/ fpcdocs/ +%if 0%{?bootstrap} +unzip %{SOURCE100} +%endif + pushd fpcsrc %patch0 %patch1 @@ -147,14 +159,14 @@ rm -rf fpc_src/packages/extra/amunits rm -rf fpc_src/packages/extra/winunits %if 0%{?bootstrap} -STARTPP=`pwd`/fpc-3.0.0-bin-ppc64/bin/%{ppcname}-%{version} +STARTPP=$(pwd)/fpc-%{version}-bin/%{ppcname}-%{version}-bootstrap %else STARTPP=%{ppcname} %endif pushd fpcsrc -NEWPP=`pwd`/compiler/%{ppcname} -DATA2INC=`pwd`/utils/data2inc +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}' @@ -167,8 +179,8 @@ make -j1 -C fpcdocs pdf FPC=${NEWPP} %install pushd fpcsrc -NEWPP=`pwd`/compiler/%{ppcname} -NEWFPCMAKE=`pwd`/utils/fpcm/bin/%{fpcarchname}-linux/fpcmake +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} \ @@ -249,6 +261,9 @@ rm -rf %{buildroot}/usr/lib/%{name}/lexyacc %changelog +* Mon Jan 27 2020 Artur Iwicki - 3.2.0-0.20200122svn44016.2 +- Bootstrap the compiler for ppc64le + * Sun Jan 26 2020 Artur Iwicki - 3.2.0-0.20200122svn44016.1 - Update to latest upstream SVN revision - Drop r1448 and r38400 patches (backports from upstream) diff --git a/sources b/sources index fe73cf5..6e9111b 100644 --- a/sources +++ b/sources @@ -1,3 +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