aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-framework/tensorflow/files/0001-Fix-build-with-gcc-12.patch
blob: 7c0385dcbbbb1abcedd68264e399fd245ca9622a (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
From 150a64dc59ec3a6240fa71fc018f20f1ac0f451d Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Fri, 28 Jun 2024 11:27:15 +0800
Subject: [PATCH] Fix build with gcc-12

```
external/net_zstd/compress/zstd_lazy.c:603:30: error: inlining failed in call to 'always_inline' 'ZSTD_HcFindBestMatch_extDict_selectMLS': function not considered for inlining
  603 | FORCE_INLINE_TEMPLATE size_t ZSTD_HcFindBestMatch_extDict_selectMLS (
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

Upstream-Status: Pending

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 third_party/net_zstd.BUILD | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/third_party/net_zstd.BUILD b/third_party/net_zstd.BUILD
index 4bd4c2960e1..45e73ec3831 100644
--- a/third_party/net_zstd.BUILD
+++ b/third_party/net_zstd.BUILD
@@ -16,4 +16,9 @@ cc_library(
         "decompress/*.h",
     ]),
     hdrs = ["zstd.h"],
+    copts = select({
+        "//conditions:default": [
+            "-DZSTD_NO_INLINE",
+        ],
+    }),
 )
-- 
2.27.0