aboutsummaryrefslogtreecommitdiffstats
path: root/main/llvm/llvm-musl.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-11-13 13:40:34 +0000
committerTimo Teräs <timo.teras@iki.fi>2014-11-13 13:52:05 +0000
commitf95a56c2ad66395f66fb9b3de3c0ce93745c7389 (patch)
treea83fbf41765a23493793301f64f079ab69d24a56 /main/llvm/llvm-musl.patch
parent6459fcd753a1485e5bde53b26d80a0faefed61fb (diff)
downloadaports-f95a56c2ad66395f66fb9b3de3c0ce93745c7389.tar.bz2
aports-f95a56c2ad66395f66fb9b3de3c0ce93745c7389.tar.xz
main/llvm: upgrade to 3.5.0
Diffstat (limited to 'main/llvm/llvm-musl.patch')
-rw-r--r--main/llvm/llvm-musl.patch194
1 files changed, 56 insertions, 138 deletions
diff --git a/main/llvm/llvm-musl.patch b/main/llvm/llvm-musl.patch
index 581128c00e..b6a3e216f0 100644
--- a/main/llvm/llvm-musl.patch
+++ b/main/llvm/llvm-musl.patch
@@ -1,6 +1,26 @@
---- a/lib/Support/DynamicLibrary.cpp (revision 170294)
-+++ b/lib/Support/DynamicLibrary.cpp (working copy)
-@@ -155,7 +155,7 @@
+diff -ru llvm-3.5.0.src.orig/include/llvm/Target/TargetLibraryInfo.h llvm-3.5.0.src/include/llvm/Target/TargetLibraryInfo.h
+--- llvm-3.5.0.src.orig/include/llvm/Target/TargetLibraryInfo.h 2014-11-13 12:51:53.341455401 +0000
++++ llvm-3.5.0.src/include/llvm/Target/TargetLibraryInfo.h 2014-11-13 12:52:35.078889077 +0000
+@@ -13,6 +13,15 @@
+ #include "llvm/ADT/DenseMap.h"
+ #include "llvm/Pass.h"
+
++#undef fopen64
++#undef fseeko64
++#undef fstat64
++#undef fstatvfs64
++#undef ftello64
++#undef lstat64
++#undef stat64
++#undef tmpfile64
++
+ namespace llvm {
+ class Triple;
+
+diff -ru llvm-3.5.0.src.orig/lib/Support/DynamicLibrary.cpp llvm-3.5.0.src/lib/Support/DynamicLibrary.cpp
+--- llvm-3.5.0.src.orig/lib/Support/DynamicLibrary.cpp 2014-11-13 12:51:53.341455401 +0000
++++ llvm-3.5.0.src/lib/Support/DynamicLibrary.cpp 2014-11-13 12:52:07.781720766 +0000
+@@ -138,7 +138,7 @@
// This macro returns the address of a well-known, explicit symbol
#define EXPLICIT_SYMBOL(SYM) \
@@ -9,58 +29,10 @@
// On linux we have a weird situation. The stderr/out/in symbols are both
// macros and global variables because of standards requirements. So, we
---- a/utils/unittest/googletest/src/gtest.cc
-+++ b/utils/unittest/googletest/src/gtest.cc
-@@ -120,6 +120,7 @@
-
- #if GTEST_CAN_STREAM_RESULTS_
- # include <arpa/inet.h> // NOLINT
-+# include <sys/socket.h> // NOLINT
- # include <netdb.h> // NOLINT
- #endif
-
---- a/include/llvm/Target/TargetLibraryInfo.h
-+++ b/include/llvm/Target/TargetLibraryInfo.h
-@@ -243,8 +243,6 @@ namespace llvm {
- fmodl,
- /// FILE *fopen(const char *filename, const char *mode);
- fopen,
-- /// FILE *fopen64(const char *filename, const char *opentype)
-- fopen64,
- /// int fprintf(FILE *stream, const char *format, ...);
- fprintf,
- /// int fputc(int c, FILE *stream);
-@@ -267,8 +265,6 @@ namespace llvm {
- fseek,
- /// int fseeko(FILE *stream, off_t offset, int whence);
- fseeko,
-- /// int fseeko64(FILE *stream, off64_t offset, int whence)
-- fseeko64,
- /// int fsetpos(FILE *stream, const fpos_t *pos);
- fsetpos,
- /// int fstat(int fildes, struct stat *buf);
-@@ -283,8 +279,6 @@ namespace llvm {
- ftell,
- /// off_t ftello(FILE *stream);
- ftello,
-- /// off64_t ftello64(FILE *stream)
-- ftello64,
- /// int ftrylockfile(FILE *file);
- ftrylockfile,
- /// void funlockfile(FILE *file);
-@@ -588,8 +582,6 @@ namespace llvm {
- times,
- /// FILE *tmpfile(void);
- tmpfile,
-- /// FILE *tmpfile64(void)
-- tmpfile64,
- /// int toascii(int c);
- toascii,
- /// double trunc(double x);
-
---- a/lib/Support/Unix/Signals.inc
-+++ b/lib/Support/Unix/Signals.inc
-@@ -268,7 +268,7 @@ void llvm::sys::AddSignalHandler(void (*FnPtr)(void *), void *Cookie) {
+diff -ru llvm-3.5.0.src.orig/lib/Support/Unix/Signals.inc llvm-3.5.0.src/lib/Support/Unix/Signals.inc
+--- llvm-3.5.0.src.orig/lib/Support/Unix/Signals.inc 2014-11-13 12:51:53.341455401 +0000
++++ llvm-3.5.0.src/lib/Support/Unix/Signals.inc 2014-11-13 12:52:07.781720766 +0000
+@@ -266,7 +266,7 @@
// On glibc systems we have the 'backtrace' function, which works nicely, but
// doesn't demangle symbols.
void llvm::sys::PrintStackTrace(FILE *FD) {
@@ -69,89 +41,35 @@
static void* StackTrace[256];
// Use backtrace() to output a backtrace on Linux systems with glibc.
int depth = backtrace(StackTrace,
---- a/lib/Target/TargetLibraryInfo.cpp
-+++ b/lib/Target/TargetLibraryInfo.cpp
-@@ -136,7 +136,6 @@ const char* TargetLibraryInfo::StandardNames[LibFunc::NumLibFuncs] =
- "fmodf",
- "fmodl",
- "fopen",
-- "fopen64",
- "fprintf",
- "fputc",
- "fputs",
-@@ -148,7 +147,6 @@ const char* TargetLibraryInfo::StandardNames[LibFunc::NumLibFuncs] =
- "fscanf",
- "fseek",
- "fseeko",
-- "fseeko64",
- "fsetpos",
- "fstat",
- "fstat64",
-@@ -156,7 +154,6 @@ const char* TargetLibraryInfo::StandardNames[LibFunc::NumLibFuncs] =
- "fstatvfs64",
- "ftell",
- "ftello",
-- "ftello64",
- "ftrylockfile",
- "funlockfile",
- "fwrite",
-@@ -306,7 +303,6 @@ const char* TargetLibraryInfo::StandardNames[LibFunc::NumLibFuncs] =
- "tanl",
- "times",
- "tmpfile",
-- "tmpfile64",
- "toascii",
- "trunc",
- "truncf",
-@@ -566,16 +562,12 @@ static void initialize(TargetLibraryInfo &TLI, const Triple &T,
+diff -ru llvm-3.5.0.src.orig/lib/Target/TargetLibraryInfo.cpp llvm-3.5.0.src/lib/Target/TargetLibraryInfo.cpp
+--- llvm-3.5.0.src.orig/lib/Target/TargetLibraryInfo.cpp 2014-11-13 12:51:53.341455401 +0000
++++ llvm-3.5.0.src/lib/Target/TargetLibraryInfo.cpp 2014-11-13 12:52:07.785054160 +0000
+@@ -653,14 +653,15 @@
+ }
+
+ // The following functions are available on at least Linux:
+- if (!T.isOSLinux()) {
++ if (!T.isOSLinux())
++ TLI.setUnavailable(LibFunc::memalign);
++ if (1 /*!T.isGlibc()*/) {
+ TLI.setUnavailable(LibFunc::dunder_strdup);
+ TLI.setUnavailable(LibFunc::dunder_strtok_r);
+ TLI.setUnavailable(LibFunc::dunder_isoc99_scanf);
+ TLI.setUnavailable(LibFunc::dunder_isoc99_sscanf);
TLI.setUnavailable(LibFunc::under_IO_getc);
TLI.setUnavailable(LibFunc::under_IO_putc);
- TLI.setUnavailable(LibFunc::memalign);
-- TLI.setUnavailable(LibFunc::fopen64);
-- TLI.setUnavailable(LibFunc::fseeko64);
+- TLI.setUnavailable(LibFunc::memalign);
+ TLI.setUnavailable(LibFunc::fopen64);
+ TLI.setUnavailable(LibFunc::fseeko64);
TLI.setUnavailable(LibFunc::fstat64);
- TLI.setUnavailable(LibFunc::fstatvfs64);
-- TLI.setUnavailable(LibFunc::ftello64);
- TLI.setUnavailable(LibFunc::lstat64);
- TLI.setUnavailable(LibFunc::open64);
- TLI.setUnavailable(LibFunc::stat64);
- TLI.setUnavailable(LibFunc::statvfs64);
-- TLI.setUnavailable(LibFunc::tmpfile64);
- }
- }
-
---- a/lib/Transforms/IPO/FunctionAttrs.cpp
-+++ b/lib/Transforms/IPO/FunctionAttrs.cpp
-@@ -1599,32 +1599,6 @@ bool FunctionAttrs::inferPrototypeAttributes(Function &F) {
- setOnlyReadsMemory(F, 1);
- setOnlyReadsMemory(F, 2);
- break;
-- case LibFunc::fopen64:
-- if (FTy->getNumParams() != 2 ||
-- !FTy->getReturnType()->isPointerTy() ||
-- !FTy->getParamType(0)->isPointerTy() ||
-- !FTy->getParamType(1)->isPointerTy())
-- return false;
-- setDoesNotThrow(F);
-- setDoesNotAlias(F, 0);
-- setDoesNotCapture(F, 1);
-- setDoesNotCapture(F, 2);
-- setOnlyReadsMemory(F, 1);
-- setOnlyReadsMemory(F, 2);
-- break;
-- case LibFunc::fseeko64:
-- case LibFunc::ftello64:
-- if (FTy->getNumParams() == 0 || !FTy->getParamType(0)->isPointerTy())
-- return false;
-- setDoesNotThrow(F);
-- setDoesNotCapture(F, 1);
-- break;
-- case LibFunc::tmpfile64:
-- if (!FTy->getReturnType()->isPointerTy())
-- return false;
-- setDoesNotThrow(F);
-- setDoesNotAlias(F, 0);
-- break;
- case LibFunc::fstat64:
- case LibFunc::fstatvfs64:
- if (FTy->getNumParams() != 2 || !FTy->getParamType(1)->isPointerTy())
+diff -ru llvm-3.5.0.src.orig/utils/unittest/googletest/src/gtest.cc llvm-3.5.0.src/utils/unittest/googletest/src/gtest.cc
+--- llvm-3.5.0.src.orig/utils/unittest/googletest/src/gtest.cc 2014-11-13 12:51:53.341455401 +0000
++++ llvm-3.5.0.src/utils/unittest/googletest/src/gtest.cc 2014-11-13 12:52:07.785054160 +0000
+@@ -120,6 +120,7 @@
+
+ #if GTEST_CAN_STREAM_RESULTS_
+ # include <arpa/inet.h> // NOLINT
++# include <sys/socket.h> // NOLINT
+ # include <netdb.h> // NOLINT
+ #endif
+