aboutsummaryrefslogtreecommitdiffstats
path: root/testing/emscripten-fastcomp/fix-DynamicLibrary-to-build-with-musl-libc.patch
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-03-30 00:41:20 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-03-30 01:43:06 +0200
commitf934e3b95b89264efc3528b0efee02a650cdc8d6 (patch)
tree09798438ce198299cfa56fc742cc5115842a4c2d /testing/emscripten-fastcomp/fix-DynamicLibrary-to-build-with-musl-libc.patch
parent0082ef0ebadf811f5ca8ce1837fa4442bc1b2793 (diff)
downloadaports-f934e3b95b89264efc3528b0efee02a650cdc8d6.tar.bz2
aports-f934e3b95b89264efc3528b0efee02a650cdc8d6.tar.xz
testing/emscripten-fastcomp: new aport
https://kripken.github.io/emscripten-site/ The Clang + LLVM backend for Emscripten
Diffstat (limited to 'testing/emscripten-fastcomp/fix-DynamicLibrary-to-build-with-musl-libc.patch')
-rw-r--r--testing/emscripten-fastcomp/fix-DynamicLibrary-to-build-with-musl-libc.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/testing/emscripten-fastcomp/fix-DynamicLibrary-to-build-with-musl-libc.patch b/testing/emscripten-fastcomp/fix-DynamicLibrary-to-build-with-musl-libc.patch
new file mode 100644
index 0000000000..7d9dc855b0
--- /dev/null
+++ b/testing/emscripten-fastcomp/fix-DynamicLibrary-to-build-with-musl-libc.patch
@@ -0,0 +1,24 @@
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Thu, 18 Feb 2016 15:33:21 +0100
+Subject: [PATCH] Fix DynamicLibrary to build with musl libc
+
+stdin/out/err is part of the libc and not the kernel so we check for the
+specific libc that does the unexpected instead of linux.
+
+This is needed for making it build with musl libc.
+
+--- a/lib/Support/DynamicLibrary.cpp
++++ b/lib/Support/DynamicLibrary.cpp
+@@ -140,10 +140,10 @@ void* DynamicLibrary::SearchForAddressOfSymbol(const char *symbolName) {
+ #define EXPLICIT_SYMBOL(SYM) \
+ if (!strcmp(symbolName, #SYM)) return &SYM
+
+-// On linux we have a weird situation. The stderr/out/in symbols are both
++// On GNU libc 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(__GLIBC__)
+ {
+ EXPLICIT_SYMBOL(stderr);
+ EXPLICIT_SYMBOL(stdout);