Merge pull request #287867 from trofi/gcc-13-fix

p4c: fix `gcc-13` build failure
This commit is contained in:
maxine 2024-02-11 12:09:58 +01:00 committed by GitHub
commit dc5fbb8838
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, boehmgc
, bison
@ -37,6 +38,16 @@ stdenv.mkDerivation (finalAttrs: {
fetchSubmodules = true;
};
patches = [
# Fix gcc-13 build:
# https://github.com/p4lang/p4c/pull/4084
(fetchpatch {
name = "gcc-13.patch";
url = "https://github.com/p4lang/p4c/commit/6756816100b7c51e3bf717ec55114a8e8575ba1d.patch";
hash = "sha256-wWM1qjgQCNMPdrhQF38jzFgODUsAcaHTajdbV7L3y8o=";
})
];
postFetch = ''
rm -rf backends/ebpf/runtime/contrib/libbpf
rm -rf control-plane/p4runtime