fpc: also add support fpr ppc64 and ppc
This commit is contained in:
parent
0f7882bd11
commit
565662bb9f
2 changed files with 43 additions and 6 deletions
25
srcpkgs/fpc/patches/ppc64.patch
Normal file
25
srcpkgs/fpc/patches/ppc64.patch
Normal file
|
@ -0,0 +1,25 @@
|
|||
commit 5120237db67c066764563df36fcf171699ff7c6f
|
||||
Author: q66 <daniel@octaforge.org>
|
||||
Date: Mon Apr 5 01:50:14 2021 +0200
|
||||
|
||||
always use elfv2 abi by default on ppc64
|
||||
|
||||
diff --git fpcsrc/compiler/options.pas fpcsrc/compiler/options.pas
|
||||
index 2cc36670..c35cc785 100644
|
||||
--- fpcbuild-3.2.0/fpcsrc/compiler/options.pas
|
||||
+++ fpcbuild-3.2.0/fpcsrc/compiler/options.pas
|
||||
@@ -4299,13 +4299,8 @@ begin
|
||||
likely to fail in spectacular ways" }
|
||||
if not option.ABISetExplicitly then
|
||||
begin
|
||||
- if (target_info.abi=abi_powerpc_sysv) and
|
||||
- (target_info.endian=endian_little) then
|
||||
+ if (target_info.abi=abi_powerpc_sysv) then
|
||||
target_info.abi:=abi_powerpc_elfv2
|
||||
- else
|
||||
- if (target_info.abi=abi_powerpc_elfv2) and
|
||||
- (target_info.endian=endian_big) then
|
||||
- target_info.abi:=abi_powerpc_sysv
|
||||
end;
|
||||
{$endif}
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
pkgname=fpc
|
||||
version=3.2.0
|
||||
revision=1
|
||||
archs="x86_64* i686* ppc64le"
|
||||
archs="x86_64* i686* ppc64le ppc64 ppc"
|
||||
create_wrksrc=yes
|
||||
build_wrksrc="${pkgname}build-${version}"
|
||||
conf_files="/etc/fpc.cfg /etc/fppkg.cfg"
|
||||
|
@ -26,6 +26,15 @@ i686*)
|
|||
ppc64le*)
|
||||
distfiles+=" ${SOURCEFORGE_SITE}/freepascal/Linux/${version}/${pkgname}-${version}.powerpc64le-linux.tar"
|
||||
checksum+=" 9bf59ae3d336f0de4624c63e4e892ea95de4be2ca66182d185defc50b69b65f3"
|
||||
;;
|
||||
ppc64*)
|
||||
distfiles+=" ${SOURCEFORGE_SITE}/freepascal/Linux/${version}/${pkgname}-${version}.powerpc64-linux.tar"
|
||||
checksum+=" b7700e126ae37f32ee03c6113c4d07c8b97e451022419387a1da7744dfaa7e25"
|
||||
;;
|
||||
ppc*)
|
||||
distfiles+=" ${SOURCEFORGE_SITE}/freepascal/Linux/${version}/${pkgname}-${version}.powerpc-linux.tar"
|
||||
checksum+=" cd35d8f520ddcd3020862658b9a5273724dbaab1e265d5e227cefb59173de81d"
|
||||
;;
|
||||
esac
|
||||
# TODO: figure out cross-build and how to unwrap the ARM .tar.
|
||||
nocross=yes
|
||||
|
@ -35,15 +44,18 @@ noverifyrdeps=yes
|
|||
post_extract() {
|
||||
# extract recursive tar files or otherwise post-process.
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
ppc64le*)
|
||||
ppc*)
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
ppc64*) PPC_SUFFIX="64";;
|
||||
esac
|
||||
mkdir ${wrksrc}/usr
|
||||
cd ${wrksrc}/${pkgname}-${version}.powerpc64-linux
|
||||
for f in $(bsdtar -tf binary.powerpc64-linux.tar)
|
||||
cd ${wrksrc}/${pkgname}-${version}.powerpc${PPC_SUFFIX}-linux
|
||||
for f in $(bsdtar -tf binary.powerpc${PPC_SUFFIX}-linux.tar)
|
||||
do
|
||||
bsdtar -xOf binary.powerpc64-linux.tar $f | bsdtar -C ${wrksrc}/usr -xzf -
|
||||
bsdtar -xOf binary.powerpc${PPC_SUFFIX}-linux.tar $f | bsdtar -C ${wrksrc}/usr -xzf -
|
||||
done
|
||||
cd ${wrksrc}
|
||||
ln -sf ../lib/fpc/${version}/ppcppc64 usr/bin
|
||||
ln -sf ../lib/fpc/${version}/ppcppc${PPC_SUFFIX} usr/bin
|
||||
;;
|
||||
x86_64*|i686*)
|
||||
# relative links needed
|
||||
|
|
Loading…
Reference in a new issue