summarylogtreecommitdiffstats
path: root/gcc13.patch
blob: 0d5c25441e8c85565636de254c57176be50104a8 (plain)
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
From 3e9ca53755d14417ec0f426193f63593a4ee988f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Markus=20H=C3=A4rer?= <markus.haerer@gmx.net>
Date: Sat, 6 May 2023 00:24:06 +0200
Subject: [PATCH 1/8] IDecoder: Add missing cstdint include for gcc>=13

---
 tools/depends/native/TexturePacker/src/decoder/IDecoder.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/depends/native/TexturePacker/src/decoder/IDecoder.h b/tools/depends/native/TexturePacker/src/decoder/IDecoder.h
index 3279c55a1c13f..5bc06f2f96b43 100644
--- a/tools/depends/native/TexturePacker/src/decoder/IDecoder.h
+++ b/tools/depends/native/TexturePacker/src/decoder/IDecoder.h
@@ -20,6 +20,7 @@
 
 #pragma once
 
+#include <cstdint>
 #include <string>
 #include <vector>
 

From d72b5b8c5e1e1f3976996930d664a4149f80c87b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Markus=20H=C3=A4rer?= <markus.haerer@gmx.net>
Date: Sat, 6 May 2023 00:26:44 +0200
Subject: [PATCH 2/8] [depends][crossguid] Patch for compatibility with gcc>=13

---
 cmake/modules/FindCrossGUID.cmake                      |  3 ++-
 .../target/crossguid/003-add-cstdint-include.patch     | 10 ++++++++++
 tools/depends/target/crossguid/Makefile                |  1 +
 3 files changed, 13 insertions(+), 1 deletion(-)
 create mode 100644 tools/depends/target/crossguid/003-add-cstdint-include.patch

diff --git a/cmake/modules/FindCrossGUID.cmake b/cmake/modules/FindCrossGUID.cmake
index d68948a9e0650..4aceb84dfcd49 100644
--- a/cmake/modules/FindCrossGUID.cmake
+++ b/cmake/modules/FindCrossGUID.cmake
@@ -29,7 +29,8 @@ if(ENABLE_INTERNAL_CROSSGUID)
   endif()
 
   set(patches "${CMAKE_SOURCE_DIR}/tools/depends/target/crossguid/001-fix-unused-function.patch"
-              "${CMAKE_SOURCE_DIR}/tools/depends/target/crossguid/002-disable-Wall-error.patch")
+              "${CMAKE_SOURCE_DIR}/tools/depends/target/crossguid/002-disable-Wall-error.patch"
+              "${CMAKE_SOURCE_DIR}/tools/depends/target/crossguid/003-add-cstdint-include.patch")
 
   generate_patchcommand("${patches}")
 
diff --git a/tools/depends/target/crossguid/003-add-cstdint-include.patch b/tools/depends/target/crossguid/003-add-cstdint-include.patch
new file mode 100644
index 0000000000000..9a710d835a99c
--- /dev/null
+++ b/tools/depends/target/crossguid/003-add-cstdint-include.patch
@@ -0,0 +1,10 @@
+--- a/include/crossguid/guid.hpp
++++ b/include/crossguid/guid.hpp
+@@ -36,6 +36,7 @@ THE SOFTWARE.
+ #include <string_view>
+ #include <utility>
+ #include <iomanip>
++#include <cstdint>
+ 
+ #define BEGIN_XG_NAMESPACE namespace xg {
+ #define END_XG_NAMESPACE }
diff --git a/tools/depends/target/crossguid/Makefile b/tools/depends/target/crossguid/Makefile
index 2138ede9d3049..da01c39e25d45 100644
--- a/tools/depends/target/crossguid/Makefile
+++ b/tools/depends/target/crossguid/Makefile
@@ -47,6 +47,7 @@ endif
 	cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
 	cd $(PLATFORM); patch -p1 -i ../001-fix-unused-function.patch
 	cd $(PLATFORM); patch -p1 -i ../002-disable-Wall-error.patch
+	cd $(PLATFORM); patch -p1 -i ../003-add-cstdint-include.patch
 	cd $(PLATFORM)/build; $(CMAKE) $(CMAKE_OPTIONS) ..
 
 .installed-$(PLATFORM): $(PLATFORM)

From 9a1b8e1a92d6269ab383d0845b92d0d001873194 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Markus=20H=C3=A4rer?= <markus.haerer@gmx.net>
Date: Sat, 6 May 2023 01:16:17 +0200
Subject: [PATCH 3/8] [depends][flatbuffers] Update to 23.3.3

---
 tools/depends/native/flatbuffers/Makefile            | 4 ++--
 tools/depends/target/flatbuffers/FLATBUFFERS-VERSION | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/depends/native/flatbuffers/Makefile b/tools/depends/native/flatbuffers/Makefile
index 6911d4c78641a..2d55d7e5830cd 100644
--- a/tools/depends/native/flatbuffers/Makefile
+++ b/tools/depends/native/flatbuffers/Makefile
@@ -5,10 +5,10 @@ DEPS =../../Makefile.include Makefile ../../download-files.include
 
 # lib name, version
 LIBNAME=flatbuffers
-VERSION=2.0.0
+VERSION=23.3.3
 SOURCE=$(LIBNAME)-$(VERSION)
 ARCHIVE=$(SOURCE).tar.gz
-SHA512=26a06b572c0e4c9685743bd2d2162ac7dcd74b9324624cc3f3ef5b154c0cee7c52a04b77cdc184245d2d6ae38dfdcc4fd66001c318aa8ca001d2bf1d85d66a89
+SHA512=4066c94f2473c7ea16917d29a613e16f840a329089c88e0bdbdb999aef3442ba00abfd2aa92266fa9c067e399dc88e6f0ccac40dc151378857e665638e78bbf0
 include ../../download-files.include
 
 APP=$(PLATFORM)/build-cmake/flatc
diff --git a/tools/depends/target/flatbuffers/FLATBUFFERS-VERSION b/tools/depends/target/flatbuffers/FLATBUFFERS-VERSION
index 4d05761cfa4b5..5ccaa80c2d668 100644
--- a/tools/depends/target/flatbuffers/FLATBUFFERS-VERSION
+++ b/tools/depends/target/flatbuffers/FLATBUFFERS-VERSION
@@ -1,4 +1,4 @@
 LIBNAME=flatbuffers
-VERSION=2.0.0
+VERSION=23.3.3
 ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz
-SHA512=26a06b572c0e4c9685743bd2d2162ac7dcd74b9324624cc3f3ef5b154c0cee7c52a04b77cdc184245d2d6ae38dfdcc4fd66001c318aa8ca001d2bf1d85d66a89
+SHA512=4066c94f2473c7ea16917d29a613e16f840a329089c88e0bdbdb999aef3442ba00abfd2aa92266fa9c067e399dc88e6f0ccac40dc151378857e665638e78bbf0

From c98cd6995b03b99ddedc266dfebd040324aed08b Mon Sep 17 00:00:00 2001
From: Lukas Rusak <lorusak@gmail.com>
Date: Fri, 5 May 2023 16:14:16 -0700
Subject: [PATCH 4/8] Observable: remove virtual keyword as it's never
 overriden
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

/home/lukas/Documents/git/xbmc/xbmc/utils/Observer.h:51:23: warning: ‘virtual Observable& Observable::operator=(const Observable&)’ was hidden [-Woverloaded-virtual=]
   51 |   virtual Observable &operator=(const Observable &observable);
      |                       ^~~~~~~~

Signed-off-by: Lukas Rusak <lorusak@gmail.com>
---
 xbmc/utils/Observer.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xbmc/utils/Observer.h b/xbmc/utils/Observer.h
index 71adddd5b3651..49c9b3c2ab092 100644
--- a/xbmc/utils/Observer.h
+++ b/xbmc/utils/Observer.h
@@ -48,7 +48,7 @@ class Observable
 public:
   Observable() = default;
   virtual ~Observable() = default;
-  virtual Observable &operator=(const Observable &observable);
+  Observable& operator=(const Observable& observable);
 
   /*!
    * @brief Register an observer.

From fce0bcf4e203cc6cac0d91974c669b7459250eb0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Markus=20H=C3=A4rer?= <markus.haerer@gmx.net>
Date: Sat, 6 May 2023 15:25:25 +0200
Subject: [PATCH 5/8] [CMake][FlatBuffers][FlatC] Make it build with our old
 build servers

Suppresses errors like these:

.../binary_annotator.cpp:196:28: error: 'value' is unavailable: introduced in macOS 10.14
  return root_table_offset.value();
                           ^
.../include/c++/v1/optional:944:33: note: 'value' has been explicitly marked unavailable here
    constexpr value_type const& value() const&
                                ^
---
 cmake/modules/FindFlatBuffers.cmake      | 6 ++++++
 cmake/modules/buildtools/FindFlatC.cmake | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/cmake/modules/FindFlatBuffers.cmake b/cmake/modules/FindFlatBuffers.cmake
index fffac4fae7390..e4d8b0c65188d 100644
--- a/cmake/modules/FindFlatBuffers.cmake
+++ b/cmake/modules/FindFlatBuffers.cmake
@@ -31,6 +31,12 @@ if(ENABLE_INTERNAL_FLATBUFFERS)
                  "${EXTRA_ARGS}")
   set(BUILD_BYPRODUCTS ${DEPENDS_PATH}/include/flatbuffers/flatbuffers.h)
 
+  # Make it build with older XCode, remove once new build servers are in place
+  # Fixes "error: 'value' is unavailable: introduced in macOS 10.14"
+  if(APPLE)
+    list(APPEND CMAKE_ARGS -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -D_LIBCPP_DISABLE_AVAILABILITY")
+  endif()
+
   BUILD_DEP_TARGET()
 else()
   find_path(FLATBUFFERS_INCLUDE_DIR NAMES flatbuffers/flatbuffers.h)
diff --git a/cmake/modules/buildtools/FindFlatC.cmake b/cmake/modules/buildtools/FindFlatC.cmake
index e42c81463542f..b6feae664c3ce 100644
--- a/cmake/modules/buildtools/FindFlatC.cmake
+++ b/cmake/modules/buildtools/FindFlatC.cmake
@@ -65,6 +65,12 @@ if(NOT TARGET flatbuffers::flatc)
       set(WIN_DISABLE_PROJECT_FLAGS 1)
     endif()
 
+    # Make it build with older XCode, remove once new build servers are in place
+    # Fixes "error: 'value' is unavailable: introduced in macOS 10.14"
+    if(APPLE)
+      list(APPEND CMAKE_ARGS -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -D_LIBCPP_DISABLE_AVAILABILITY")
+    endif()
+
     set(FLATBUFFERS_FLATC_EXECUTABLE ${INSTALL_DIR}/flatc CACHE INTERNAL "FlatBuffer compiler")
 
     set(BUILD_NAME flatc)

From c3f457170a2b34c0d3b7d96e1fe6c796b7a8f08d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Markus=20H=C3=A4rer?= <markus.haerer@gmx.net>
Date: Sat, 6 May 2023 18:11:36 +0200
Subject: [PATCH 6/8] [CMake][FlatC] Don't look for local flatc if
 ENABLE_INTERNAL_FLATBUFFERS in enabled

The internal headers and external flatc may not be compatible.
---
 cmake/modules/buildtools/FindFlatC.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmake/modules/buildtools/FindFlatC.cmake b/cmake/modules/buildtools/FindFlatC.cmake
index b6feae664c3ce..b0849d59137c2 100644
--- a/cmake/modules/buildtools/FindFlatC.cmake
+++ b/cmake/modules/buildtools/FindFlatC.cmake
@@ -19,7 +19,7 @@ if(NOT TARGET flatbuffers::flatc)
   find_program(FLATBUFFERS_FLATC_EXECUTABLE NAMES flatc
                                             HINTS ${NATIVEPREFIX}/bin)
 
-  if(FLATBUFFERS_FLATC_EXECUTABLE)
+  if(FLATBUFFERS_FLATC_EXECUTABLE AND NOT ENABLE_INTERNAL_FLATBUFFERS)
     execute_process(COMMAND "${FLATBUFFERS_FLATC_EXECUTABLE}" --version
                     OUTPUT_VARIABLE FLATBUFFERS_FLATC_VERSION
                     OUTPUT_STRIP_TRAILING_WHITESPACE)

From 56973329e871569f1b50e80a48ce2bcc3d8baaff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Markus=20H=C3=A4rer?= <markus.haerer@gmx.net>
Date: Sat, 6 May 2023 21:27:01 +0200
Subject: [PATCH 7/8] !!!TEMP!!! I'm becoming desperate...

---
 cmake/modules/FindFlatBuffers.cmake      | 6 ++++++
 cmake/modules/buildtools/FindFlatC.cmake | 8 +++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/cmake/modules/FindFlatBuffers.cmake b/cmake/modules/FindFlatBuffers.cmake
index e4d8b0c65188d..5a95fdcc10f85 100644
--- a/cmake/modules/FindFlatBuffers.cmake
+++ b/cmake/modules/FindFlatBuffers.cmake
@@ -34,7 +34,13 @@ if(ENABLE_INTERNAL_FLATBUFFERS)
   # Make it build with older XCode, remove once new build servers are in place
   # Fixes "error: 'value' is unavailable: introduced in macOS 10.14"
   if(APPLE)
+    message(STATUS "I'm in the correct branch")
+    message(STATUS "CMAKE_ARGS before: ${CMAKE_ARGS}")
     list(APPEND CMAKE_ARGS -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -D_LIBCPP_DISABLE_AVAILABILITY")
+    message(STATUS "CMAKE_ARGS after: ${CMAKE_ARGS}")
+  else()
+    message(STATUS "I'm in the wrong branch")
+    message(STATUS "I'm in the wrong branch. CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME} CMAKE_HOST_SYSTEM_NAME: ${CMAKE_HOST_SYSTEM_NAME}")
   endif()
 
   BUILD_DEP_TARGET()
diff --git a/cmake/modules/buildtools/FindFlatC.cmake b/cmake/modules/buildtools/FindFlatC.cmake
index b0849d59137c2..6bebc755d56a9 100644
--- a/cmake/modules/buildtools/FindFlatC.cmake
+++ b/cmake/modules/buildtools/FindFlatC.cmake
@@ -67,8 +67,14 @@ if(NOT TARGET flatbuffers::flatc)
 
     # Make it build with older XCode, remove once new build servers are in place
     # Fixes "error: 'value' is unavailable: introduced in macOS 10.14"
-    if(APPLE)
+    if(LINUX)
+      message(STATUS "I'm in the correct branch")
+      message(STATUS "CMAKE_ARGS before: ${CMAKE_ARGS}")
       list(APPEND CMAKE_ARGS -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -D_LIBCPP_DISABLE_AVAILABILITY")
+      message(STATUS "CMAKE_ARGS after: ${CMAKE_ARGS}")
+    else()
+      message(STATUS "I'm in the wrong branch")
+      message(STATUS "I'm in the wrong branch. CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME} CMAKE_HOST_SYSTEM_NAME: ${CMAKE_HOST_SYSTEM_NAME}")
     endif()
 
     set(FLATBUFFERS_FLATC_EXECUTABLE ${INSTALL_DIR}/flatc CACHE INTERNAL "FlatBuffer compiler")

From cb6c8bbb20096afca2b456221fa5e036b01f272a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Markus=20H=C3=A4rer?= <markus.haerer@gmx.net>
Date: Sat, 6 May 2023 22:10:26 +0200
Subject: [PATCH 8/8] fixup! !!!TEMP!!! I'm becoming desperate...

---
 cmake/modules/buildtools/FindFlatC.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmake/modules/buildtools/FindFlatC.cmake b/cmake/modules/buildtools/FindFlatC.cmake
index 6bebc755d56a9..0ccbc04dc9924 100644
--- a/cmake/modules/buildtools/FindFlatC.cmake
+++ b/cmake/modules/buildtools/FindFlatC.cmake
@@ -67,7 +67,7 @@ if(NOT TARGET flatbuffers::flatc)
 
     # Make it build with older XCode, remove once new build servers are in place
     # Fixes "error: 'value' is unavailable: introduced in macOS 10.14"
-    if(LINUX)
+    if(APPLE)
       message(STATUS "I'm in the correct branch")
       message(STATUS "CMAKE_ARGS before: ${CMAKE_ARGS}")
       list(APPEND CMAKE_ARGS -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -D_LIBCPP_DISABLE_AVAILABILITY")