Skip to content

Commit

Permalink
polyml*: fix build w/glibc-2.34
Browse files Browse the repository at this point in the history
  • Loading branch information
Ma27 committed Feb 27, 2022
1 parent 0bdcc48 commit 29e14f8
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
10 changes: 9 additions & 1 deletion pkgs/development/compilers/polyml/5.6.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{lib, stdenv, fetchurl, autoreconfHook}:
{lib, stdenv, fetchurl, autoreconfHook, fetchpatch }:

let
version = "5.6";
Expand All @@ -12,6 +12,14 @@ stdenv.mkDerivation {
substituteInPlace configure.ac --replace stdc++ c++
'';

patches = [
# glibc 2.34 compat
(fetchpatch {
url = "https://src.fedoraproject.org/rpms/polyml/raw/4d8868ca5a1ce3268f212599a321f8011c950496/f/polyml-pthread-stack-min.patch";
sha256 = "1h5ihg2sxld9ymrl3f2mpnbn2242ka1fsa0h4gl9h90kndvg6kby";
})
];

buildInputs = lib.optional stdenv.isDarwin autoreconfHook;

src = fetchurl {
Expand Down
12 changes: 10 additions & 2 deletions pkgs/development/compilers/polyml/5.7.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, autoreconfHook, gmp, libffi }:
{ lib, stdenv, fetchFromGitHub, autoreconfHook, gmp, libffi, fetchpatch }:

stdenv.mkDerivation rec {
pname = "polyml";
Expand All @@ -8,7 +8,15 @@ stdenv.mkDerivation rec {
substituteInPlace configure.ac --replace stdc++ c++
'';

patches = [ ./5.7-new-libffi-FFI_SYSV.patch ];
patches = [
./5.7-new-libffi-FFI_SYSV.patch

# glibc 2.34 compat
(fetchpatch {
url = "https://src.fedoraproject.org/rpms/polyml/raw/4d8868ca5a1ce3268f212599a321f8011c950496/f/polyml-pthread-stack-min.patch";
sha256 = "1h5ihg2sxld9ymrl3f2mpnbn2242ka1fsa0h4gl9h90kndvg6kby";
})
];

buildInputs = [ libffi gmp ];

Expand Down
8 changes: 8 additions & 0 deletions pkgs/development/compilers/polyml/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ stdenv.mkDerivation rec {

nativeBuildInputs = lib.optional stdenv.isDarwin autoreconfHook;

patches = [
# glibc 2.34 compat
(fetchpatch {
url = "https://src.fedoraproject.org/rpms/polyml/raw/4d8868ca5a1ce3268f212599a321f8011c950496/f/polyml-pthread-stack-min.patch";
sha256 = "1h5ihg2sxld9ymrl3f2mpnbn2242ka1fsa0h4gl9h90kndvg6kby";
})
];

configureFlags = [
"--enable-shared"
"--with-system-libffi"
Expand Down

0 comments on commit 29e14f8

Please sign in to comment.