diff options
| author | Yelninei <yelninei@tutamail.com> | 2026-03-13 18:56:33 +0000 |
|---|---|---|
| committer | Janneke Nieuwenhuizen <janneke@gnu.org> | 2026-05-10 19:08:07 +0200 |
| commit | e5b92baa27e63d0a18960e596aaee98e4dc90477 (patch) | |
| tree | aab47c225de87975eebd7512e0853ba314e1e244 /gnu/packages/patches/phobos-hurd.patch | |
| parent | 0c53e15628f0a6cf293d226bba81112c7bba6a3d (diff) | |
gnu: dmd: Support GNU/Hurd.hurd-team
* gnu/packages/patches/dmd-hurd.patch, gnu/packages/patches/phobos-hurd.patch
: New patches.
* gnu/local.mk: Register them.
* gnu/packages/dlang.scm (dmd-bootstrap): Add dmd patch.
[native-inputs]: Make gdb/pinned linux-only, add patch to phobos.
[#:make-flags]: Set DISABLED_TESTS.
[#:phases]: In 'patch-tests disable more tests.
Change-Id: Id5e2fee30bb48a27785682d1b6a30666f33e37c5
Change-Id: I16ad0cba2666fe475cd4028287316e9f8cbad2fe
Diffstat (limited to 'gnu/packages/patches/phobos-hurd.patch')
| -rw-r--r-- | gnu/packages/patches/phobos-hurd.patch | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/gnu/packages/patches/phobos-hurd.patch b/gnu/packages/patches/phobos-hurd.patch new file mode 100644 index 00000000000..c8b5523ea03 --- /dev/null +++ b/gnu/packages/patches/phobos-hurd.patch | |||
| @@ -0,0 +1,64 @@ | |||
| 1 | From e2d65597896089a8bd06992a4b83e3d14176b02c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Yelninei <yelninei@tutamail.com> | ||
| 3 | Date: Tue, 24 Mar 2026 19:46:30 +0000 | ||
| 4 | Subject: [PATCH] phobos: Fixes for GNU/Hurd. | ||
| 5 | |||
| 6 | --- | ||
| 7 | Makefile | 2 +- | ||
| 8 | std/datetime/timezone.d | 1 + | ||
| 9 | std/math/algebraic.d | 1 + | ||
| 10 | std/process.d | 2 ++ | ||
| 11 | 4 files changed, 5 insertions(+), 1 deletion(-) | ||
| 12 | |||
| 13 | diff --git a/Makefile b/Makefile | ||
| 14 | index 4fa51299e..a9d4789f6 100644 | ||
| 15 | --- a/Makefile | ||
| 16 | +++ b/Makefile | ||
| 17 | @@ -305,7 +305,7 @@ else | ||
| 18 | endif | ||
| 19 | |||
| 20 | # build with shared library support (defaults to true on supported platforms) | ||
| 21 | -SHARED=$(if $(findstring $(OS),linux freebsd),1,) | ||
| 22 | +SHARED=$(if $(findstring $(OS),linux freebsd hurd),1,) | ||
| 23 | |||
| 24 | TESTS_EXTRACTOR=$(ROOT)/tests_extractor$(DOTEXE) | ||
| 25 | PUBLICTESTS_DIR=$(ROOT)/publictests | ||
| 26 | diff --git a/std/datetime/timezone.d b/std/datetime/timezone.d | ||
| 27 | index 7461fcaa3..05c2999d3 100644 | ||
| 28 | --- a/std/datetime/timezone.d | ||
| 29 | +++ b/std/datetime/timezone.d | ||
| 30 | @@ -338,6 +338,7 @@ public: | ||
| 31 | else version (linux) enum utcZone = "UTC"; | ||
| 32 | else version (Darwin) enum utcZone = "UTC"; | ||
| 33 | else version (Solaris) enum utcZone = "UTC"; | ||
| 34 | + else version (Hurd) enum utcZone = "UTC"; | ||
| 35 | else static assert(0, "The location of the UTC timezone file on this Posix platform must be set."); | ||
| 36 | |||
| 37 | auto tzs = [testTZ("America/Los_Angeles", "PST", "PDT", dur!"hours"(-8), dur!"hours"(1)), | ||
| 38 | diff --git a/std/math/algebraic.d b/std/math/algebraic.d | ||
| 39 | index f96f24f15..05bf08b9c 100644 | ||
| 40 | --- a/std/math/algebraic.d | ||
| 41 | +++ b/std/math/algebraic.d | ||
| 42 | @@ -631,6 +631,7 @@ else version (FreeBSD) version = GenericPosixVersion; | ||
| 43 | else version (OpenBSD) version = GenericPosixVersion; | ||
| 44 | else version (Solaris) version = GenericPosixVersion; | ||
| 45 | else version (DragonFlyBSD) version = GenericPosixVersion; | ||
| 46 | +else version (Hurd) version = GenericPosixVersion; | ||
| 47 | |||
| 48 | private real polyImpl(real x, in real[] A) @trusted pure nothrow @nogc | ||
| 49 | { | ||
| 50 | diff --git a/std/process.d b/std/process.d | ||
| 51 | index d359ca0ba..dc981c5e5 100644 | ||
| 52 | --- a/std/process.d | ||
| 53 | +++ b/std/process.d | ||
| 54 | @@ -1031,6 +1031,8 @@ private Pid spawnProcessPosix(scope const(char[])[] args, | ||
| 55 | import core.sys.freebsd.unistd : closefrom; | ||
| 56 | else version (OpenBSD) | ||
| 57 | import core.sys.openbsd.unistd : closefrom; | ||
| 58 | + else version (Hurd) | ||
| 59 | + import core.sys.hurd.unistd : closefrom; | ||
| 60 | |||
| 61 | static if (!__traits(compiles, closefrom)) | ||
| 62 | { | ||
| 63 | -- | ||
| 64 | 2.52.0 | ||
