File: 0003-expand-endian-detection.patch

package info (click to toggle)
rocr-runtime 6.4.3%2Bdfsg-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 12,176 kB
  • sloc: cpp: 127,122; ansic: 41,837; lisp: 1,225; asm: 975; sh: 452; python: 117; makefile: 57
file content (24 lines) | stat: -rw-r--r-- 748 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: Cordell Bloor <cgmb@slerp.xyz>
Date: Fri, 15 Mar 2024 00:45:35 -0600
Subject: expand endian detection

The endianness detection logic in hsa/hsa.h fails on arm64 and ppc64el, which
leads to build failures in rccl on those platforms.

Forwarded: no
Bug-Debian: https://bugs.debian.org/1065695
---
 runtime/hsa-runtime/inc/hsa.h | 2 ++
 1 file changed, 2 insertions(+)

--- a/runtime/hsa-runtime/inc/hsa.h
+++ b/runtime/hsa-runtime/inc/hsa.h
@@ -86,6 +86,8 @@
 #elif defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || \
       defined(_M_X64) || defined(__loongarch64) || defined(__riscv)
 #define LITTLEENDIAN_CPU
+#elif (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+#define BIGENDIAN_CPU
 #endif
 #endif