Skip to content

Commit

Permalink
Support 12.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewwutw committed Jun 1, 2022
1 parent a78d29a commit d60ded3
Show file tree
Hide file tree
Showing 3 changed files with 471 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Expand Up @@ -92,11 +92,12 @@ Currently supported gcc-version :
* 10.1.0
* 10.2.0
* 10.3.0
* 12.1.0

For example, to build DJGPP for gcc 10.3.0 :
For example, to build DJGPP for gcc 12.1.0 :

```
./build-djgpp.sh 10.3.0
./build-djgpp.sh 12.1.0
```

It will download all necessary files, build DJGPP compiler and binutils, and install it.
Expand Down
39 changes: 39 additions & 0 deletions patch/patch-gcc12-mingw.txt
@@ -0,0 +1,39 @@
diff -Naur gnu-orig/gcc-12.10/gcc/cp/fstat-mingw-fix.h gnu/gcc-12.10/gcc/cp/fstat-mingw-fix.h
--- gnu-orig/gcc-12.10/gcc/cp/fstat-mingw-fix.h 1970-01-01 08:00:00.000000000 +0800
+++ gnu/gcc-12.10/gcc/cp/fstat-mingw-fix.h 2022-05-30 18:06:48.000000000 +0800
@@ -0,0 +1,23 @@
+#ifndef __H_FSTAT_MINGW_FIX
+#define __H_FSTAT_MINGW_FIX
+/* Copied from gcc-12.10/libgfortran/io/unix.c */
+
+/* These flags aren't defined on all targets (mingw32), so provide them
+ here. */
+#ifndef S_IRGRP
+#define S_IRGRP 0
+#endif
+
+#ifndef S_IWGRP
+#define S_IWGRP 0
+#endif
+
+#ifndef S_IROTH
+#define S_IROTH 0
+#endif
+
+#ifndef S_IWOTH
+#define S_IWOTH 0
+#endif
+
+#endif /* __H_FSTAT_MINGW_FIX */
diff -Naur gnu-orig/gcc-12.10/gcc/cp/module.cc gnu/gcc-12.10/gcc/cp/module.cc
--- gnu-orig/gcc-12.10/gcc/cp/module.cc 2022-05-30 18:06:44.000000000 +0800
+++ gnu/gcc-12.10/gcc/cp/module.cc 2022-05-30 18:06:48.000000000 +0800
@@ -229,6 +229,8 @@
#define CODY_NETWORKING 0
#include "mapper-client.h"

+#include "fstat-mingw-fix.h"
+
#if 0 // 1 for testing no mmap
#define MAPPED_READING 0
#define MAPPED_WRITING 0

0 comments on commit d60ded3

Please sign in to comment.