tbb/917.patch

79 lines
2.3 KiB
Diff

From d9049c052c99162e26f86cf2a4982d026bf7dc57 Mon Sep 17 00:00:00 2001
From: Mo Zhou <cdluminate@gmail.com>
Date: Fri, 20 May 2022 09:02:53 -0400
Subject: [PATCH 1/2] Fix build failure for s390x and hppa architectures.
Signed-off-by: Mo Zhou <cdluminate@gmail.com>
---
src/tbb/tools_api/ittnotify_config.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/tbb/tools_api/ittnotify_config.h b/src/tbb/tools_api/ittnotify_config.h
index 5e7c0cdf5..411de0852 100644
--- a/src/tbb/tools_api/ittnotify_config.h
+++ b/src/tbb/tools_api/ittnotify_config.h
@@ -167,6 +167,14 @@
# define ITT_ARCH_LOONGARCH64 7
#endif /* ITT_ARCH_LOONGARCH64 */
+#ifndef ITT_ARCH_S390X
+# define ITT_ARCH_S390X 8
+#endif /* ITT_ARCH_S390X */
+
+#ifndef ITT_ARCH_HPPA
+# define ITT_ARCH_HPPA 9
+#endif /* ITT_ARCH_HPPA */
+
#ifndef ITT_ARCH
# if defined _M_IX86 || defined __i386__
# define ITT_ARCH ITT_ARCH_IA32
@@ -182,6 +190,10 @@
# define ITT_ARCH ITT_ARCH_PPC64
# elif defined __loongarch__
# define ITT_ARCH ITT_ARCH_LOONGARCH64
+# elif defined __s390__ || defined __s390x__
+# define ITT_ARCH ITT_ARCH_S390X
+# elif defined __hppa__
+# define ITT_ARCH ITT_ARCH_HPPA
# endif
#endif
From b0e9f8636e49c337836392d811fda403dc7102a0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dirk=20M=C3=BCller?= <dirk@dmllr.de>
Date: Sat, 24 Sep 2022 14:27:24 +0200
Subject: [PATCH 2/2] Add riscv64 architecture detection
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Dirk Müller <dirk@dmllr.de>
---
src/tbb/tools_api/ittnotify_config.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/tbb/tools_api/ittnotify_config.h b/src/tbb/tools_api/ittnotify_config.h
index 411de0852..11422fd57 100644
--- a/src/tbb/tools_api/ittnotify_config.h
+++ b/src/tbb/tools_api/ittnotify_config.h
@@ -175,6 +175,10 @@
# define ITT_ARCH_HPPA 9
#endif /* ITT_ARCH_HPPA */
+#ifndef ITT_ARCH_RISCV64
+# define ITT_ARCH_RISCV64 10
+#endif /* ITT_ARCH_RISCV64 */
+
#ifndef ITT_ARCH
# if defined _M_IX86 || defined __i386__
# define ITT_ARCH ITT_ARCH_IA32
@@ -194,6 +198,8 @@
# define ITT_ARCH ITT_ARCH_S390X
# elif defined __hppa__
# define ITT_ARCH ITT_ARCH_HPPA
+# elif defined __riscv && __riscv_xlen == 64
+# define ITT_ARCH ITT_ARCH_RISCV64
# endif
#endif