-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy path0001-gcc-10.patch
131 lines (121 loc) · 4.15 KB
/
0001-gcc-10.patch
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
diff --git a/gcc/config/arm/arm-c.c b/gcc/config/arm/arm-c.c
index 7468a20bd..3496590c4 100644
--- a/gcc/config/arm/arm-c.c
+++ b/gcc/config/arm/arm-c.c
@@ -372,6 +372,8 @@ arm_cpu_cpp_builtins (struct cpp_reader * pfile)
builtin_assert ("cpu=arm");
builtin_assert ("machine=arm");
+ builtin_define ("__vita__");
+
arm_cpu_builtins (pfile);
}
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 30e1d6dc9..bd5f7b19c 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -731,6 +731,10 @@ extern const int arm_arch_cde_coproc_bits[];
#define WCHAR_TYPE_SIZE BITS_PER_WORD
#endif
+/* use int and unsigned int for int32_t and uint32_t */
+#undef STDINT_LONG32
+#define STDINT_LONG32 0
+
/* Sized for fixed-point types. */
#define SHORT_FRACT_TYPE_SIZE 8
@@ -1996,7 +2000,7 @@ enum arm_auto_incmodes
/* signed 'char' is most compatible, but RISC OS wants it unsigned.
unsigned is probably best, but may break some code. */
#ifndef DEFAULT_SIGNED_CHAR
-#define DEFAULT_SIGNED_CHAR 0
+#define DEFAULT_SIGNED_CHAR 1
#endif
/* Max number of bytes we can move from memory to memory
diff --git a/gcc/config/arm/arm.opt b/gcc/config/arm/arm.opt
index cd3d8e1be..523b92aa1 100644
--- a/gcc/config/arm/arm.opt
+++ b/gcc/config/arm/arm.opt
@@ -30,6 +30,9 @@ const char *x_arm_cpu_string
TargetSave
const char *x_arm_tune_string
+pthread
+Driver
+
Enum
Name(tls_type) Type(enum arm_tls_type)
TLS dialect to use:
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 9f790db0d..27a38bb02 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -673,8 +673,9 @@ proper position among the other output files. */
#endif
/* config.h can define LIB_SPEC to override the default libraries. */
+#undef LIB_SPEC
#ifndef LIB_SPEC
-#define LIB_SPEC "%{!shared:%{g*:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}}"
+#define LIB_SPEC "%{!shared:%{g*:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}} %{pthread:--whole-archive -lpthread --no-whole-archive} -lSceRtc_stub -lSceSysmem_stub -lSceKernelThreadMgr_stub -lSceKernelModulemgr_stub -lSceIofilemgr_stub -lSceProcessmgr_stub -lSceLibKernel_stub -lSceNet_stub -lSceNetCtl_stub -lSceSysmodule_stub"
#endif
/* When using -fsplit-stack we need to wrap pthread_create, in order
diff --git a/gcc/genconditions.c b/gcc/genconditions.c
index 3a5b85d11..3ca61913f 100644
--- a/gcc/genconditions.c
+++ b/gcc/genconditions.c
@@ -58,7 +58,7 @@ write_header (void)
/* It is necessary, but not entirely safe, to include the headers below\n\
in a generator program. As a defensive measure, don't do so when the\n\
table isn't going to have anything in it. */\n\
-#if GCC_VERSION >= 3001\n\
+#if GCC_VERSION >= 3001 && __clang_major__ < 9\n\
\n\
/* Do not allow checking to confuse the issue. */\n\
#undef CHECKING_P\n\
@@ -170,7 +170,7 @@ struct c_test\n\
vary at run time. It works in 3.0.1 and later; 3.0 only when not\n\
optimizing. */\n\
\n\
-#if GCC_VERSION >= 3001\n\
+#if GCC_VERSION >= 3001 && __clang_major__ < 9\n\
static const struct c_test insn_conditions[] = {\n");
traverse_c_tests (write_one_condition, 0);
@@ -191,7 +191,7 @@ write_writer (void)
" unsigned int i;\n"
" const char *p;\n"
" puts (\"(define_conditions [\");\n"
- "#if GCC_VERSION >= 3001\n"
+ "#if GCC_VERSION >= 3001 && __clang_major__ < 9\n"
" for (i = 0; i < ARRAY_SIZE (insn_conditions); i++)\n"
" {\n"
" printf (\" (%d \\\"\", insn_conditions[i].value);\n"
diff --git a/libgomp/configure b/libgomp/configure
index 5240f7e9d..de5dc96e4 100755
--- a/libgomp/configure
+++ b/libgomp/configure
@@ -15768,29 +15768,6 @@ $as_echo "#define HAVE_UNAME 1" >>confdefs.h
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Check for gethostname.
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <unistd.h>
-int
-main ()
-{
-
- char buf[256];
- if (gethostname (buf, sizeof (buf) - 1) == 0)
- buf[255] = '\0';
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-$as_echo "#define HAVE_GETHOSTNAME 1" >>confdefs.h
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
# Check for getpid.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */