soc/intel/cmn/cse: Deprecate CONFIG_SOC_INTEL_CSE_RW_VERSION
[coreboot2.git] / util / crossgcc / patches / gcc-13.2.0_musl_poisoned_calloc.patch
blob552a7e7d7fad4033e647d30d10734548ddfc38a2
1 Musl's <sched.h> uses calloc() which is marked as poisoned by GCC's
2 "system.h". Work around that by making sure that <sched.h> gets
3 included first.
5 --- gcc-13.2.0/gcc/ada/adaint.c
6 +++ gcc-13.2.0.musl/gcc/ada/adaint.c
7 @@ -101,6 +101,10 @@
8 #include <sys/time.h>
9 #endif
11 +#if defined (__linux__)
12 +#include <sched.h>
13 +#endif
15 #ifdef IN_RTS
17 #ifdef STANDALONE
18 @@ -3441,7 +3445,6 @@
19 #endif
21 #if defined (__linux__)
22 -#include <sched.h>
24 /* glibc versions earlier than 2.7 do not define the routines to handle
25 dynamically allocated CPU sets. For these targets, we use the static
26 --- gcc-13.2.0/gcc/ada/argv.c
27 +++ gcc-13.2.0.musl/gcc/ada/argv.c
28 @@ -42,6 +42,8 @@
29 main program, and these routines are accessed from the
30 Ada.Command_Line.Environment package. */
32 +#include "adaint.h"
34 #ifdef IN_RTS
35 #include "runtime.h"
36 #include <stdlib.h>
37 @@ -50,8 +52,6 @@
38 #include "config.h"
39 #include "system.h"
40 #endif
42 -#include "adaint.h"
44 #ifdef __cplusplus
45 extern "C" {
46 --- gcc-13.2.0/gcc/ada/cio.c
47 +++ gcc-13.2.0.musl/gcc/ada/cio.c
48 @@ -29,6 +29,8 @@
49 * *
50 ****************************************************************************/
52 +#include "adaint.h"
54 #ifdef IN_RTS
55 #include "runtime.h"
56 #include <sys/stat.h>
57 @@ -36,8 +38,6 @@
58 #include "config.h"
59 #include "system.h"
60 #endif
62 -#include "adaint.h"
64 /* We need L_tmpnam definition */
65 #include <stdio.h>
66 --- gcc-13.2.0/gcc/ada/cstreams.c
67 +++ gcc-13.2.0.musl/gcc/ada/cstreams.c
68 @@ -58,14 +58,14 @@
69 #include "vxWorks.h"
70 #endif
72 +#include "adaint.h"
74 #ifdef IN_RTS
75 #include <string.h>
76 #else
77 #include "config.h"
78 #include "system.h"
79 #endif
81 -#include "adaint.h"
83 #ifdef __cplusplus
84 extern "C" {
85 --- gcc-13.2.0/gcc/ada/init.c
86 +++ gcc-13.2.0.musl/gcc/ada/init.c
87 @@ -53,6 +53,8 @@
88 #undef __linux__
89 #endif
91 +#include "adaint.h"
93 #ifdef IN_RTS
95 #ifdef STANDALONE
96 @@ -71,7 +73,6 @@
97 #include "system.h"
98 #endif
100 -#include "adaint.h"
101 #include "raise.h"
103 #ifdef __cplusplus
104 --- gcc-13.2.0/gcc/ada/raise.c
105 +++ gcc-13.2.0.musl/gcc/ada/raise.c
106 @@ -32,6 +32,8 @@
107 /* Shared routines to support exception handling. __gnat_unhandled_terminate
108 is shared between all exception handling mechanisms. */
110 +#include "adaint.h"
112 #ifdef IN_RTS
113 #include "runtime.h"
114 #else
115 @@ -39,7 +41,6 @@
116 #include "system.h"
117 #endif
119 -#include "adaint.h"
120 #include "raise.h"
122 #ifdef __cplusplus