summaryrefslogtreecommitdiffstats
path: root/scripts/gcc-13.2.0.diff
blob: 45dbe98f59b1a34d3df1c2d553d784fcdeefd173 (plain) (blame)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
diff -rNau gcc-13.2.0/config.sub gcc-13.2.0-patched/config.sub
--- gcc-13.2.0/config.sub	2023-07-27 04:13:03.000000000 -0400
+++ gcc-13.2.0-patched/config.sub	2024-03-10 23:33:56.596289806 -0400
@@ -1749,7 +1749,7 @@
 	     | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
 	     | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
 	     | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
-	     | fiwix* )
+	     | fiwix* | jove* )
 		;;
 	# This one is extra strict with allowed versions
 	sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
diff -rNau gcc-13.2.0/fixincludes/mkfixinc.sh gcc-13.2.0-patched/fixincludes/mkfixinc.sh
--- gcc-13.2.0/fixincludes/mkfixinc.sh	2023-07-27 04:13:03.000000000 -0400
+++ gcc-13.2.0-patched/fixincludes/mkfixinc.sh	2024-03-10 23:49:24.405547826 -0400
@@ -20,6 +20,7 @@
     powerpcle-*-eabisim* | \
     powerpcle-*-eabi* | \
     *-*-vxworks7* | \
+    *-*-jove* | \
     *-musl* )
 	#  IF there is no include fixing,
 	#  THEN create a no-op fixer and exit
diff -rNau gcc-13.2.0/gcc/config/jove.h gcc-13.2.0-patched/gcc/config/jove.h
--- gcc-13.2.0/gcc/config/jove.h	1969-12-31 19:00:00.000000000 -0500
+++ gcc-13.2.0-patched/gcc/config/jove.h	2024-03-10 23:44:13.570083205 -0400
@@ -0,0 +1,8 @@
+#undef TARGET_JOVE
+#define TARGET_JOVE 1
+
+#undef LIB_SPEC
+#define LIB_SPEC "-lc"
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "crt0.o%s crti.o%s crtbegin.o%s"
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
diff -rNau gcc-13.2.0/gcc/config.gcc gcc-13.2.0-patched/gcc/config.gcc
--- gcc-13.2.0/gcc/config.gcc	2023-07-27 04:13:04.000000000 -0400
+++ gcc-13.2.0-patched/gcc/config.gcc	2024-03-10 23:42:11.659119360 -0400
@@ -843,6 +843,12 @@
 *-*-fuchsia*)
   native_system_header_dir=/include
   ;;
+*-*-jove*)
+  gas=yes
+  gnu_ld=yes
+  default_use_cxa_atexit=yes
+  use_gcc_stdint=provide
+  ;;
 *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu | *-*-uclinuxfdpiceabi)
   extra_options="$extra_options gnu-user.opt"
   gas=yes
@@ -1891,6 +1897,9 @@
 x86_64-*-freebsd*)
 	tm_file="${tm_file} i386/unix.h i386/att.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h"
 	;;
+x86_64-*-jove*)
+    tm_file="${tm_file} i386/unix.h i386/att.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h jove.h"
+    ;;
 i[34567]86-*-netbsdelf*)
 	tm_file="${tm_file} i386/unix.h i386/att.h elfos.h ${nbsd_tm_file} i386/netbsd-elf.h"
 	extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
diff -rNau gcc-13.2.0/libgcc/config.host gcc-13.2.0-patched/libgcc/config.host
--- gcc-13.2.0/libgcc/config.host	2023-07-27 04:13:07.000000000 -0400
+++ gcc-13.2.0-patched/libgcc/config.host	2024-03-10 23:47:32.669386544 -0400
@@ -386,6 +386,10 @@
 esac
 
 case ${host} in
+x86_64-*-jove*)
+  tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
+  extra_parts="$extra_parts crti.o crtbegin.o crtend.o crtn.o"
+  ;;
 aarch64*-*-elf | aarch64*-*-rtems*)
 	extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o"
 	extra_parts="$extra_parts crtfastmath.o"