mb/google/brya/var/uldrenite: Generate RAM ID and SPD file
[coreboot2.git] / util / crossgcc / patches / gcc-14.2.0_musl_poisoned_calloc.patch
blobb66380dad2bbd371b6115f505119d7ca430bf5ec
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-14-20240211/gcc/ada/argv.c
27 +++ gcc-14-20240211.musl/gcc/ada/argv.c
28 @@ -51,10 +51,6 @@
29 #include "system.h"
30 #endif
32 -#ifndef LIGHT_RUNTIME
33 -#include "adaint.h"
34 -#endif
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 --- gcc-13.2.0/gcc/ada/cio.c
40 +++ gcc-13.2.0.musl/gcc/ada/cio.c
41 @@ -29,6 +29,8 @@
42 * *
43 ****************************************************************************/
45 +#include "adaint.h"
47 #ifdef IN_RTS
48 #include "runtime.h"
49 #include <sys/stat.h>
50 @@ -36,8 +38,6 @@
51 #include "config.h"
52 #include "system.h"
53 #endif
55 -#include "adaint.h"
57 /* We need L_tmpnam definition */
58 #include <stdio.h>
59 --- gcc-13.2.0/gcc/ada/cstreams.c
60 +++ gcc-13.2.0.musl/gcc/ada/cstreams.c
61 @@ -58,14 +58,14 @@
62 #include "vxWorks.h"
63 #endif
65 +#include "adaint.h"
67 #ifdef IN_RTS
68 #include <string.h>
69 #else
70 #include "config.h"
71 #include "system.h"
72 #endif
74 -#include "adaint.h"
76 #ifdef __cplusplus
77 extern "C" {
78 --- gcc-13.2.0/gcc/ada/init.c
79 +++ gcc-13.2.0.musl/gcc/ada/init.c
80 @@ -53,6 +53,8 @@
81 #undef __linux__
82 #endif
84 +#include "adaint.h"
86 #ifdef IN_RTS
88 #ifdef STANDALONE
89 @@ -71,7 +73,6 @@
90 #include "system.h"
91 #endif
93 -#include "adaint.h"
94 #include "raise.h"
96 #ifdef __cplusplus
97 --- gcc-13.2.0/gcc/ada/raise.c
98 +++ gcc-13.2.0.musl/gcc/ada/raise.c
99 @@ -32,6 +32,8 @@
100 /* Shared routines to support exception handling. __gnat_unhandled_terminate
101 is shared between all exception handling mechanisms. */
103 +#include "adaint.h"
105 #ifdef IN_RTS
106 #include "runtime.h"
107 #else
108 @@ -39,7 +41,6 @@
109 #include "system.h"
110 #endif
112 -#include "adaint.h"
113 #include "raise.h"
115 #ifdef __cplusplus