summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0002-cmake-don-t-build-for-32-bit-targets.patch
blob: f452dc501e7d6a6c113ababfb88d35036da81ff8 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
From 16a2c22339287122d2c25d8bb33a5a51b4e6ee51 Mon Sep 17 00:00:00 2001
From: Naveen Saini <naveen.kumar.saini@intel.com>
Date: Thu, 24 Feb 2022 20:01:11 +0530
Subject: [PATCH] cmake: don't build for 32-bit targets

Error log:
| tmp/work/corei7-64-poky-linux/ispc/1.16.0-r0/recipe-sysroot/usr/include/bits/long-double.h:23:10: fatal error: 'bits/long-double-32.h' file not found
| #include <bits/long-double-32.h>
|          ^~~~~~~~~~~~~~~~~~~~~~~
| 1 error generated.

Remove SYSTEM include search path and set -isysroot dir path
for root dir for cross compilation.

Upstream-Status: Inappropriate

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
---
 cmake/GenerateBuiltins.cmake | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cmake/GenerateBuiltins.cmake b/cmake/GenerateBuiltins.cmake
index f84494ed..d90cb1ec 100644
--- a/cmake/GenerateBuiltins.cmake
+++ b/cmake/GenerateBuiltins.cmake
@@ -253,7 +253,7 @@ function(builtin_to_cpp bit os_name arch supported_archs supported_oses resultFi
             #   In this case headers will be installed in /usr/arm-linux-gnueabihf/include and will not be picked up
             #   by clang by default. So the following line adds such path explicitly. If this path doesn't exist and
             #   the headers can be found in other locations, this should not be a problem.
-            set(includePath -isystem/usr/${debian_triple}/include)
+            set(includePath -isysroot${SYSROOT_DIR})
         endif()
     endif()
 
@@ -339,7 +339,7 @@ function (generate_target_builtins resultList)
     set(regular_targets ${ARGN})
     list(FILTER regular_targets EXCLUDE REGEX wasm)
     foreach (ispc_target ${regular_targets})
-        foreach (bit 32 64)
+        foreach (bit 64)
             foreach (os_name ${TARGET_OS_LIST_FOR_LL})
                 target_ll_to_cpp(target-${ispc_target} ${bit} ${os_name} output${os_name}${bit})
                 list(APPEND tmpList ${output${os_name}${bit}})
@@ -405,7 +405,7 @@ function (generate_common_builtins resultList)
     endif()
 
     message (STATUS "ISPC will be built with support of ${supported_oses} for ${supported_archs}")
-    foreach (bit 32 64)
+    foreach (bit 64)
         foreach (os_name "windows" "linux" "freebsd" "macos" "android" "ios" "ps4" "web")
             foreach (arch "x86" "arm" "wasm")
                 builtin_to_cpp(${bit} ${os_name} ${arch} "${supported_archs}" "${supported_oses}" res${bit}${os_name}${arch})