OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
2.3 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../musl/pkg/gcc/0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch
  5. # Copyright (C) 2020 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. From ef5f7880cff27a2b92952ce53a207d5dd896923b Mon Sep 17 00:00:00 2001
  17. From: Ariadne Conill <ariadne@dereferenced.org>
  18. Date: Fri, 21 Aug 2020 06:58:22 +0000
  19. Subject: [PATCH 17/30] dlang: fix fcntl on mips, add libucontext dep
  20. ---
  21. libphobos/configure.tgt | 1 +
  22. libphobos/libdruntime/core/sys/posix/fcntl.d | 15 +++++++++++++++
  23. 2 files changed, 16 insertions(+)
  24. diff --git a/libphobos/configure.tgt b/libphobos/configure.tgt
  25. index 94e42bf5509..73f2e4b7f01 100644
  26. --- a/libphobos/configure.tgt
  27. +++ b/libphobos/configure.tgt
  28. @@ -35,6 +35,7 @@ case "${target}" in
  29. ;;
  30. mips*-*-linux*)
  31. LIBPHOBOS_SUPPORTED=yes
  32. + LIBDRUNTIME_NEEDS_UCONTEXT=yes
  33. ;;
  34. power*-*-linux*)
  35. LIBPHOBOS_SUPPORTED=yes
  36. diff --git a/libphobos/libdruntime/core/sys/posix/fcntl.d b/libphobos/libdruntime/core/sys/posix/fcntl.d
  37. index 9febcff849b..cb34e2108bd 100644
  38. --- a/libphobos/libdruntime/core/sys/posix/fcntl.d
  39. +++ b/libphobos/libdruntime/core/sys/posix/fcntl.d
  40. @@ -870,6 +870,21 @@ else version (CRuntime_Musl)
  41. F_SETLKW = 7,
  42. }
  43. }
  44. + else version (MIPS_Any)
  45. + {
  46. + enum
  47. + {
  48. + O_DIRECTORY = 0x010000, // octal 0200000
  49. + O_NOFOLLOW = 0x020000, // octal 0400000
  50. + O_DIRECT = 0x008000, // octal 0100000
  51. + O_LARGEFILE = 0x002000, // octal 0020000
  52. + O_TMPFILE = 0x410000, // octal 020200000
  53. +
  54. + F_GETLK = 33,
  55. + F_SETLK = 34,
  56. + F_SETLKW = 35,
  57. + }
  58. + }
  59. else
  60. static assert(0, "Platform not supported");
  61. --
  62. 2.27.0