Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions pkgs/by-name/gn/gnum4/loong-fix-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[xen0n: this is https://github.com/sunhaiyong1978/CLFS-for-LoongArch/blob/1.0/patches/stack-direction-add-loongarch.patch with line number tweak, and change to generated file added as well.]
From: Sun Haiyong <youbest@sina.com>
Date: Tue, 31 Aug 2021 11:11:52 +0800
Subject: [PATCH] stack-direction: Add support for loongarch CPU

* m4/stack-direction.m4 (SV_STACK_DIRECTION): When the CPU is loongarch,
set "sv_cv_stack_direction" to "-1" .
--- a/m4/stack-direction.m4
+++ b/m4/stack-direction.m4
@@ -31,6 +31,7 @@ AC_DEFUN([SV_STACK_DIRECTION],
i?86 | x86_64 | \
i860 | \
ia64 | \
+ loongarch* | \
m32r | \
m68* | \
m88k | \
--- a/configure
+++ b/configure
@@ -46399,6 +46399,7 @@ else $as_nop
i?86 | x86_64 | \
i860 | \
ia64 | \
+ loongarch* | \
m32r | \
m68* | \
m88k | \
--
2.17.2

6 changes: 4 additions & 2 deletions pkgs/by-name/gn/gnum4/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@

stdenv.mkDerivation rec {
pname = "gnum4";
version = "1.4.20";
version = "1.4.19";

src = fetchurl {
url = "mirror://gnu/m4/m4-${version}.tar.bz2";
hash = "sha256-rGmJ7l0q7YFzl4BjDMLOCX4qZUb+uWpKVNs31GoUUuQ=";
sha256 = "sha256-swapHA/ZO8QoDPwumMt6s5gf91oYe+oyk4EfRSyJqMg=";
};

# https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-devel/m4/m4-1.4.19-r1.ebuild
patches = lib.optional stdenv.hostPlatform.isLoongArch64 ./loong-fix-build.patch;
# this could be accomplished by updateAutotoolsGnuConfigScriptsHook, but that causes infinite recursion
# necessary for FreeBSD code path in configure
postPatch =
Expand Down