[PATCH 2/2] fix i386 distro build
authorAndreas Beckmann <anbe@debian.org>
Mon, 8 Jan 2024 09:16:32 +0000 (10:16 +0100)
committerRaspbian forward porter <root@raspbian.org>
Thu, 8 Feb 2024 14:09:13 +0000 (14:09 +0000)
Gbp-Pq: Name 0002-fix-i386-distro-build.patch

lib/CL/pocl_llvm_utils.cc

index 6dce9b5964e43ee4425529fbc8a815240583a489..5afeb1bbb2d4b19205d28187de93ce1a48495dc0 100644 (file)
@@ -254,7 +254,7 @@ const struct kernellib_features {
 const char *pocl_get_distro_kernellib_variant() {
   StringMap<bool> Features;
 
-#if defined(__x86_64__)
+#if defined(__i386__) || defined(__x86_64__)
   if (!llvm::sys::getHostCPUFeatures(Features)) {
     POCL_MSG_WARN("LLVM can't get host CPU flags!\n");
     return NULL;
@@ -292,7 +292,7 @@ const char *pocl_get_distro_kernellib_variant() {
 const char *pocl_get_distro_cpu_name(const char *kernellib_variant) {
   StringMap<bool> Features;
 
-#if defined(__x86_64__)
+#if defined(__i386__) || defined(__x86_64__)
   if (!llvm::sys::getHostCPUFeatures(Features)) {
     POCL_MSG_WARN("LLVM can't get host CPU flags!\n");
     return NULL;