blob: 76d5e2f23d5f58c239051e135bb802bf2be4b030 (
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
|
From 80ff19bdafd336108779bf110dea4ee2d115242c Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Tue, 8 Dec 2020 17:06:52 +0800
Subject: [PATCH] support musl
Build fails looking for `execinfo.h` when building against musl
|In file included from ./tensorflow/core/platform/stacktrace.h:26,
| from tensorflow/core/platform/stacktrace_handler.cc:34:
|./tensorflow/core/platform/default/stacktrace.h:27:10: fatal error:
execinfo.h: No such file or directory
Upstream-Status: Pending
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
tensorflow/core/platform/default/stacktrace.h | 3 ++-
tensorflow/core/platform/default/stacktrace_handler.cc | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tensorflow/core/platform/default/stacktrace.h b/tensorflow/core/platform/default/stacktrace.h
index 0a8c124ff51..db7945611d3 100644
--- a/tensorflow/core/platform/default/stacktrace.h
+++ b/tensorflow/core/platform/default/stacktrace.h
@@ -20,7 +20,8 @@ limitations under the License.
#include "tensorflow/core/platform/platform.h"
// clang-format on
-#if !defined(IS_MOBILE_PLATFORM) && (defined(__clang__) || defined(__GNUC__))
+#if !defined(IS_MOBILE_PLATFORM) && (defined(__clang__) || defined(__GNUC__)) && \
+ defined(__GLIBC__)
#define TF_HAS_STACKTRACE
#endif
diff --git a/tensorflow/core/platform/default/stacktrace_handler.cc b/tensorflow/core/platform/default/stacktrace_handler.cc
index 70fcdc27042..f38fe71c917 100644
--- a/tensorflow/core/platform/default/stacktrace_handler.cc
+++ b/tensorflow/core/platform/default/stacktrace_handler.cc
@@ -16,7 +16,8 @@ limitations under the License.
#include "tensorflow/core/platform/platform.h"
#if !defined(IS_MOBILE_PLATFORM) && defined(PLATFORM_POSIX) && \
- (defined(__clang__) || defined(__GNUC__))
+ (defined(__clang__) || defined(__GNUC__)) && \
+ defined(__GLIBC__)
#define TF_GENERATE_STACKTRACE
#endif
|