summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Kaufmann <timokau@zoho.com>2020-09-03 12:51:31 +0200
committerTimo Kaufmann <timokau@zoho.com>2020-09-03 14:52:26 +0200
commit6ff5c406eba3e5ef47a9552c4d0939d0ff9ec367 (patch)
treefd349d659e671c1c7c4dc06f85b3049b025519e5
parentf928b91f349403090d055a613abc527bb442254e (diff)
fpc: add support for aarch64-linux
Supported since fpc 3.2.0.
-rw-r--r--pkgs/development/compilers/fpc/binary.nix5
-rw-r--r--pkgs/development/compilers/fpc/mark-paths.patch11
2 files changed, 15 insertions, 1 deletions
diff --git a/pkgs/development/compilers/fpc/binary.nix b/pkgs/development/compilers/fpc/binary.nix
index 8441c91b09f2..c7e3ec30b49f 100644
--- a/pkgs/development/compilers/fpc/binary.nix
+++ b/pkgs/development/compilers/fpc/binary.nix
@@ -15,6 +15,11 @@ stdenv.mkDerivation rec {
url = "mirror://sourceforge/project/freepascal/Linux/${version}/fpc-${version}-x86_64-linux.tar";
sha256 = "0gfbwjvjqlx0562ayyl08khagslrws758al2yhbi4bz5rzk554ni";
}
+ else if stdenv.hostPlatform.system == "aarch64-linux" then
+ fetchurl {
+ url = "mirror://sourceforge/project/freepascal/Linux/${version}/fpc-${version}.aarch64-linux.tar";
+ sha256 = "1h481ngg3m8nlsg9mw7rr1bn2c4sj4wzqny9bxyq3xvcral12r71";
+ }
else throw "Not supported on ${stdenv.hostPlatform.system}.";
builder = ./binary-builder.sh;
diff --git a/pkgs/development/compilers/fpc/mark-paths.patch b/pkgs/development/compilers/fpc/mark-paths.patch
index e8844ad7cfe7..707c5352de7f 100644
--- a/pkgs/development/compilers/fpc/mark-paths.patch
+++ b/pkgs/development/compilers/fpc/mark-paths.patch
@@ -1,5 +1,5 @@
diff --git a/fpcsrc/compiler/systems/t_linux.pas b/fpcsrc/compiler/systems/t_linux.pas
-index a7398fb9..a1e41ecb 100644
+index a7398fb9..8e46fec0 100644
--- a/fpcsrc/compiler/systems/t_linux.pas
+++ b/fpcsrc/compiler/systems/t_linux.pas
@@ -135,13 +135,13 @@ begin
@@ -19,6 +19,15 @@ index a7398fb9..a1e41ecb 100644
{$else powerpc64}
LibrarySearchPath.AddLibraryPath(sysrootpath,'=/lib;=/usr/lib;=/usr/X11R6/lib',true);
{$endif powerpc64}
+@@ -164,7 +164,7 @@ begin
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib/i386-linux-gnu',true);
+ {$endif i386}
+ {$ifdef aarch64}
+- LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib/aarch64-linux-gnu',true);
++ LibrarySearchPath.AddLibraryPath(sysrootpath,'=@syslibpath@',true);
+ {$endif aarch64}
+ {$ifdef powerpc}
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib/powerpc-linux-gnu',true);
@@ -185,53 +185,53 @@ begin
end;