overlay sys-fs/overlaybd: Another patch fixing build with gcc 15

This time in overlaybd itself. Also regenerate the offline build
patch, so it can be easily applied using `git am`.

Signed-off-by: Krzesimir Nowak <knowak@microsoft.com>
This commit is contained in:
Krzesimir Nowak 2026-02-19 12:53:16 +01:00
parent 4cb33d02c7
commit 0e130f4ac8
5 changed files with 67 additions and 8 deletions

View File

@ -1,7 +1,7 @@
From 72d823c414a1416dffc2276e5a0a17f03c5e4549 Mon Sep 17 00:00:00 2001
From 765644b34e61a8455114067465537d9f0a31dd7d Mon Sep 17 00:00:00 2001
From: James Le Cuirot <jlecuirot@microsoft.com>
Date: Mon, 28 Jul 2025 12:16:50 +0100
Subject: [PATCH 1/2] Patch Photon after fetching to fix cross issues
Subject: [PATCH 1/3] Patch Photon after fetching to fix cross issues
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
---
@ -21,5 +21,5 @@ index c905bd9..5507f66 100644
if(BUILD_TESTING)
--
2.51.0
2.52.0

View File

@ -1,3 +1,30 @@
From 8df6807f569ebca98678d6ca5370d3575f469181 Mon Sep 17 00:00:00 2001
From: James Le Cuirot <jlecuirot@microsoft.com>
Date: Thu, 19 Feb 2026 12:45:13 +0100
Subject: [PATCH 2/3] overlaybd-offline-build
---
CMake/{Findcurl.cmake => FindCURL.cmake} | 6 ++---
.../{Findopenssl.cmake => FindOpenSSL.cmake} | 4 +---
CMake/FindRapidJSON.cmake | 19 ++++++++++++++++
CMake/Finde2fs.cmake | 4 +---
CMake/Findphoton.cmake | 4 ++--
CMake/Findrapidjson.cmake | 12 ----------
CMakeLists.txt | 22 +++++++++++--------
src/CMakeLists.txt | 10 ++++-----
src/overlaybd/CMakeLists.txt | 5 ++++-
.../cache/ocf_cache/test/CMakeLists.txt | 2 +-
src/overlaybd/registryfs/CMakeLists.txt | 4 ++--
src/overlaybd/stream_convertor/CMakeLists.txt | 2 +-
src/overlaybd/tar/erofs/test/CMakeLists.txt | 4 ++--
src/test/CMakeLists.txt | 6 ++---
src/tools/CMakeLists.txt | 4 ++--
15 files changed, 58 insertions(+), 50 deletions(-)
rename CMake/{Findcurl.cmake => FindCURL.cmake} (95%)
rename CMake/{Findopenssl.cmake => FindOpenSSL.cmake} (96%)
create mode 100644 CMake/FindRapidJSON.cmake
delete mode 100644 CMake/Findrapidjson.cmake
diff --git a/CMake/Findcurl.cmake b/CMake/FindCURL.cmake
similarity index 95%
rename from CMake/Findcurl.cmake
@ -77,10 +104,10 @@ index 15c58fd..e5615a2 100644
add_custom_command(
diff --git a/CMake/Findphoton.cmake b/CMake/Findphoton.cmake
index c905bd9..cdc72d2 100644
index 5507f66..e00b939 100644
--- a/CMake/Findphoton.cmake
+++ b/CMake/Findphoton.cmake
@@ -17,8 +17,8 @@ else()
@@ -18,8 +18,8 @@ else()
endif()
if (BUILD_CURL_FROM_SOURCE)
@ -181,10 +208,10 @@ index 4d0e696..69652f3 100644
)
target_link_libraries(overlaybd-tcmu
diff --git a/src/overlaybd/CMakeLists.txt b/src/overlaybd/CMakeLists.txt
index 1c5a912..af095b7 100644
index fd57ee2..3328b43 100644
--- a/src/overlaybd/CMakeLists.txt
+++ b/src/overlaybd/CMakeLists.txt
@@ -6,7 +6,10 @@ add_subdirectory(cache)
@@ -5,7 +5,10 @@ add_subdirectory(cache)
add_subdirectory(tar)
add_subdirectory(gzip)
add_subdirectory(gzindex)
@ -310,3 +337,6 @@ index b551b84..ecf5c32 100644
target_link_libraries(turboOCI-apply photon_static overlaybd_lib overlaybd_image_lib)
set_target_properties(turboOCI-apply PROPERTIES INSTALL_RPATH "/opt/overlaybd/lib")
--
2.52.0

View File

@ -0,0 +1,28 @@
From 2d718a67568588d6f98cb536142fa5c8be1c0475 Mon Sep 17 00:00:00 2001
From: Krzesimir Nowak <knowak@microsoft.com>
Date: Thu, 19 Feb 2026 12:46:14 +0100
Subject: [PATCH 3/3] Fix build with gcc15
uint32_t stopped being brought in indirectly through some other header
files in gcc 15.
Signed-off-by: Krzesimir Nowak <knowak@microsoft.com>
---
src/prefetch.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/prefetch.h b/src/prefetch.h
index da778d5..3e91564 100644
--- a/src/prefetch.h
+++ b/src/prefetch.h
@@ -16,6 +16,7 @@ limitations under the License.
#pragma once
#include <cctype>
+#include <cstdint>
#include <string>
#include <photon/fs/filesystem.h>
--
2.52.0

View File

@ -60,7 +60,8 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/0001-Patch-Photon-after-fetching-to-fix-cross-issues.patch
"${FILESDIR}"/${PN}-offline-build.patch
"${FILESDIR}"/0002-overlaybd-offline-build.patch
"${FILESDIR}"/0003-Fix-build-with-gcc15.patch
)
src_prepare() {