aboutsummaryrefslogtreecommitdiffstats
path: root/main/gcc/405-dlang-mips.patch
blob: 1b222a0d43a737e0c6c0d73b8d7518521a0ea123 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--- gcc-9.3.0.orig/libphobos/libdruntime/core/sys/posix/fcntl.d
+++ gcc-9.3.0/libphobos/libdruntime/core/sys/posix/fcntl.d
@@ -870,6 +870,21 @@
             F_SETLKW       = 7,
         }
     }
+    else version (MIPS_Any)
+    {
+        enum 
+        {
+            O_DIRECTORY     = 0x010000, // octal   0200000
+            O_NOFOLLOW      = 0x020000, // octal   0400000
+            O_DIRECT        = 0x008000, // octal   0100000
+            O_LARGEFILE     = 0x002000, // octal   0020000
+            O_TMPFILE       = 0x410000, // octal 020200000
+
+            F_GETLK        = 33,
+            F_SETLK        = 34,
+            F_SETLKW       = 35,
+        }
+    }
     else
         static assert(0, "Platform not supported");
 
--- gcc-9.3.0.orig/libphobos/configure.tgt
+++ gcc-9.3.0/libphobos/configure.tgt
@@ -38,6 +38,7 @@
 	;;
   mips*-*-linux*)
 	LIBPHOBOS_SUPPORTED=yes
+	LIBDRUNTIME_NEEDS_UCONTEXT=yes
 	;;
   riscv*-*-linux*)
 	LIBPHOBOS_SUPPORTED=yes