python3Packages.executorch: fix build with GCC 15

Tracking: https://github.com/NixOS/nixpkgs/issues/475479
This commit is contained in:
Gaetan Lepage
2026-01-21 14:35:02 +00:00
parent 530a975b50
commit c46e5e5e5f
@@ -85,6 +85,15 @@ buildPythonPackage (finalAttrs: {
--replace-fail \
"CMAKE_MINIMUM_REQUIRED(VERSION 3.5 FATAL_ERROR)" \
"CMAKE_MINIMUM_REQUIRED(VERSION 3.10 FATAL_ERROR)"
''
# Fix build with GCC>=15
+ ''
substituteInPlace third-party/flatcc/include/flatcc/portable/grisu3_print.h \
--replace-fail \
'static char hexdigits[16] = "0123456789ABCDEF";' \
'static char hexdigits[17] = "0123456789ABCDEF";'
sed -i "1i #include <cstdint>" backends/apple/coreml/runtime/inmemoryfs/memory_buffer.hpp
'';
env = {