summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/clang/clang/0003-llvm-Do-not-assume-linux-glibc.patch
blob: 6a84485fa91f8b0be4ae712014dcace0bb208aeb (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
From 877eeefccde262eda3bd022fff2ad6d147a6ad54 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 15 Mar 2016 05:26:47 +0000
Subject: [PATCH 3/4] llvm: Do not assume linux == glibc

musl's implementation of std functions is different

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 lib/Support/DynamicLibrary.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Support/DynamicLibrary.cpp b/lib/Support/DynamicLibrary.cpp
index 9a7aeb5..e3b7fe2 100644
--- a/lib/Support/DynamicLibrary.cpp
+++ b/lib/Support/DynamicLibrary.cpp
@@ -143,7 +143,7 @@ void* DynamicLibrary::SearchForAddressOfSymbol(const char *symbolName) {
 // On linux we have a weird situation. The stderr/out/in symbols are both
 // macros and global variables because of standards requirements. So, we
 // boldly use the EXPLICIT_SYMBOL macro without checking for a #define first.
-#if defined(__linux__) and !defined(__ANDROID__)
+#if defined(__linux__) and defined(__GLIBC__)
   {
     EXPLICIT_SYMBOL(stderr);
     EXPLICIT_SYMBOL(stdout);
-- 
2.8.2