File: gcc15.patch

package info (click to toggle)
spim 8.0%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 1,780 kB
  • sloc: asm: 8,560; ansic: 8,439; yacc: 2,298; makefile: 1,107; lex: 706; sh: 219
file content (38 lines) | stat: -rw-r--r-- 1,380 bytes parent folder | download
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
35
36
37
38
Description: make it compile with gcc15
Index: spim/Makefile
===================================================================
--- spim.orig/Makefile	2025-09-23 09:14:17.610821381 +0200
+++ spim/Makefile	2025-09-23 10:10:33.237884897 +0200
@@ -1,4 +1,4 @@
-MAKE += CC="$(CC) -Wl,--as-needed" CDEBFLAGS="$(CFLAGS)" EXCEPTION_DIR=/usr/lib/spim
+MAKE += CC="$(CC) -Wl,--as-needed -std=c17" CDEBFLAGS="$(CFLAGS)" EXCEPTION_DIR=/usr/lib/spim
 build:
 	cd spim && $(MAKE) spim
 	cd xspim && xmkmf && $(MAKE) xspim
Index: spim/CPU/spim-utils.c
===================================================================
--- spim.orig/CPU/spim-utils.c	2025-09-22 18:28:34.318591803 +0200
+++ spim/CPU/spim-utils.c	2025-09-23 09:33:45.143880968 +0200
@@ -34,6 +34,8 @@
 #include <stdio.h>
 #include <ctype.h>
 #include <string.h>
+extern char *strdup (const char *__s)
+     __THROW __attribute_malloc__ __nonnull ((1));
 #include <stdarg.h>
 
 #include "spim.h"
Index: spim/CPU/scanner.l
===================================================================
--- spim.orig/CPU/scanner.l	2025-09-23 09:14:17.690821455 +0200
+++ spim/CPU/scanner.l	2025-09-23 09:40:00.160221310 +0200
@@ -31,7 +31,7 @@
    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-
+int fileno(FILE *stream);
 #include "spim.h"
 #include "string-stream.h"
 #include "spim-utils.h"