diff options
author | Anuj Mittal <anuj.mittal@intel.com> | 2022-09-19 10:41:24 +0800 |
---|---|---|
committer | Anuj Mittal <anuj.mittal@intel.com> | 2022-09-19 12:28:51 +0800 |
commit | 203e26c918fbd52b5a3b22520e81a48a059cbfba (patch) | |
tree | 77255cb592fe6d298892568c818bcac7e27618ee /dynamic-layers/clang-layer/recipes-opencl/igc | |
parent | ed616c50ea329ba6fe68642cfc8bf8c6b8b61beb (diff) | |
download | meta-intel-203e26c918fbd52b5a3b22520e81a48a059cbfba.tar.gz |
intel-graphics-compiler: fix warnings
Fixes errors when building on debian-11 or Ubuntu 22.04:
10:59:41 | /build/tmp/work/x86_64-linux/intel-graphics-compiler-native/1.0.3771-r0/git/visa/iga/IGALibrary/IR/SWSBSetter.cpp:713:39: error: ânumeric_limitsâ is not a member of âstdâ
10:59:41 | 713 | const InstIDs math_id = {std::numeric_limits<uint32_t>::max(), 0};
10:59:41 | | ^~~~~~~~~~~~~~
22:06:45 | /build/tmp/work/x86_64-linux/intel-graphics-compiler-native/1.0.3771-r0/git/visa/iga/IGAExe/../IGALibrary/api/igax.hpp:501:30: error: argument to âallocaâ may be too large [-Werror=alloca-larger-than=]
22:06:45 | 501 | strPtr = (char *)alloca(strCap); \
22:06:45 | | ^~~~~~
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'dynamic-layers/clang-layer/recipes-opencl/igc')
3 files changed, 74 insertions, 0 deletions
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-IGA-Add-missing-header.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-IGA-Add-missing-header.patch new file mode 100644 index 00000000..0a4a0fd9 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-IGA-Add-missing-header.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | From a36a4788a52128e5ccbec4cd29eb167153dcc8b8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Diana Chen <po-yu.chen@intel.com> | ||
3 | Date: Mon, 11 Jan 2021 19:06:36 +0000 | ||
4 | Subject: [PATCH] IGA: Add missing header | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
8 | --- | ||
9 | visa/iga/IGALibrary/IR/SWSBSetter.cpp | 1 + | ||
10 | 1 file changed, 1 insertion(+) | ||
11 | |||
12 | diff --git a/visa/iga/IGALibrary/IR/SWSBSetter.cpp b/visa/iga/IGALibrary/IR/SWSBSetter.cpp | ||
13 | index 87f119f3b..6956edf0d 100644 | ||
14 | --- a/visa/iga/IGALibrary/IR/SWSBSetter.cpp | ||
15 | +++ b/visa/iga/IGALibrary/IR/SWSBSetter.cpp | ||
16 | @@ -27,6 +27,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
17 | #include "Traversals.hpp" | ||
18 | #include "BitSet.hpp" | ||
19 | #include <iterator> | ||
20 | +#include <limits> | ||
21 | using namespace iga; | ||
22 | |||
23 | /** | ||
24 | -- | ||
25 | 2.37.3 | ||
26 | |||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/a58dd6de4c29595a0f93cff167b487d777e4559e.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/a58dd6de4c29595a0f93cff167b487d777e4559e.patch new file mode 100644 index 00000000..b88e9678 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/a58dd6de4c29595a0f93cff167b487d777e4559e.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From a58dd6de4c29595a0f93cff167b487d777e4559e Mon Sep 17 00:00:00 2001 | ||
2 | From: "Szymichowski, Pawel" <pawel.szymichowski@intel.com> | ||
3 | Date: Wed, 8 Apr 2020 08:24:05 -0700 | ||
4 | Subject: [PATCH] Changes in code. | ||
5 | |||
6 | Change-Id: Ica75407e834f6b3439912bd0b47a6b30a6521fc7 | ||
7 | |||
8 | Upstream-Status: Backport | ||
9 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
10 | --- | ||
11 | visa/iga/IGALibrary/api/igax.hpp | 21 ++++++++++++--------- | ||
12 | 1 file changed, 12 insertions(+), 9 deletions(-) | ||
13 | |||
14 | diff --git a/visa/iga/IGALibrary/api/igax.hpp b/visa/iga/IGALibrary/api/igax.hpp | ||
15 | index 4f1c680c6a9..6d17cd99b6a 100644 | ||
16 | --- a/visa/iga/IGALibrary/api/igax.hpp | ||
17 | +++ b/visa/iga/IGALibrary/api/igax.hpp | ||
18 | @@ -492,16 +492,19 @@ inline iga::Op OpSpec::op() const | ||
19 | } | ||
20 | |||
21 | |||
22 | -#define IGA_OPSPEC_STRING_GETTER(API, INITSIZE) { \ | ||
23 | - char _staticBuf[INITSIZE]; \ | ||
24 | - char *strPtr = &_staticBuf[0]; \ | ||
25 | - size_t strCap = sizeof(_staticBuf); \ | ||
26 | - IGA_CHECKED_CALL(API, m_op, strPtr, &strCap); \ | ||
27 | - if (strCap > sizeof(_staticBuf)) { \ | ||
28 | - strPtr = (char *)alloca(strCap); \ | ||
29 | +#define IGA_OPSPEC_STRING_GETTER(API, INITSIZE) { \ | ||
30 | + char _staticBuf[INITSIZE]; \ | ||
31 | + char *strPtr = &_staticBuf[0]; \ | ||
32 | + size_t strCap = sizeof(_staticBuf); \ | ||
33 | + IGA_CHECKED_CALL(API, m_op, strPtr, &strCap); \ | ||
34 | + if (strCap > sizeof(_staticBuf)) { \ | ||
35 | + strPtr = (char *)malloc(strCap); \ | ||
36 | IGA_CHECKED_CALL(API, m_op, strPtr, &strCap); \ | ||
37 | - } \ | ||
38 | - return std::string(strPtr); \ | ||
39 | + std::string res(strPtr); \ | ||
40 | + free(strPtr); \ | ||
41 | + return res; \ | ||
42 | + } \ | ||
43 | + return std::string(strPtr); \ | ||
44 | } | ||
45 | inline std::string OpSpec::menmonic() const | ||
46 | IGA_OPSPEC_STRING_GETTER(iga_opspec_mnemonic, 16); | ||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.3771.bb b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.3771.bb index 6cfa0b6d..19d74b0e 100644 --- a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.3771.bb +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.3771.bb | |||
@@ -9,6 +9,8 @@ LIC_FILES_CHKSUM = "file://IGC/BiFModule/Implementation/ExternalLibraries/libclc | |||
9 | 9 | ||
10 | SRC_URI = "git://github.com/intel/intel-graphics-compiler.git;protocol=https; \ | 10 | SRC_URI = "git://github.com/intel/intel-graphics-compiler.git;protocol=https; \ |
11 | file://0001-skip-execution-of-ElfPackager.patch \ | 11 | file://0001-skip-execution-of-ElfPackager.patch \ |
12 | file://a58dd6de4c29595a0f93cff167b487d777e4559e.patch \ | ||
13 | file://0001-IGA-Add-missing-header.patch \ | ||
12 | " | 14 | " |
13 | 15 | ||
14 | SRCREV = "577887bf74c51a6084058836720fe58f8c35ca58" | 16 | SRCREV = "577887bf74c51a6084058836720fe58f8c35ca58" |