diff options
Diffstat (limited to 'testing')
-rw-r--r-- | testing/llvm3.7/llvm-0002-musl-triple.patch | 90 | ||||
-rw-r--r-- | testing/llvm3.7/llvm-0003-musl-hacks.patch | 114 |
2 files changed, 0 insertions, 204 deletions
diff --git a/testing/llvm3.7/llvm-0002-musl-triple.patch b/testing/llvm3.7/llvm-0002-musl-triple.patch deleted file mode 100644 index 2f6fd59079..0000000000 --- a/testing/llvm3.7/llvm-0002-musl-triple.patch +++ /dev/null @@ -1,90 +0,0 @@ -From 58be6f7fb164dbf42fdd28ce6474dbe4bc5ca401 Mon Sep 17 00:00:00 2001 -From: Andrea Brancaleoni <miwaxe@gmail.com> -Date: Tue, 8 Sep 2015 21:53:42 +0200 -Subject: [PATCH 2/3] musl triple - ---- - include/llvm/ADT/Triple.h | 4 ++++ - lib/Support/Triple.cpp | 6 ++++++ - lib/Target/ARM/ARMSubtarget.h | 3 +++ - lib/Target/ARM/ARMTargetMachine.cpp | 2 ++ - 4 files changed, 15 insertions(+) - -diff --git a/include/llvm/ADT/Triple.h b/include/llvm/ADT/Triple.h -index 947812d..d2a6bbe 100644 ---- a/include/llvm/ADT/Triple.h -+++ b/include/llvm/ADT/Triple.h -@@ -167,6 +167,10 @@ public: - EABIHF, - Android, - -+ Musl, -+ MuslEABI, -+ MuslEABIHF, -+ - MSVC, - Itanium, - Cygnus, -diff --git a/lib/Support/Triple.cpp b/lib/Support/Triple.cpp -index c6646fb..8d47ad9 100644 ---- a/lib/Support/Triple.cpp -+++ b/lib/Support/Triple.cpp -@@ -192,6 +192,9 @@ const char *Triple::getEnvironmentTypeName(EnvironmentType Kind) { - case CODE16: return "code16"; - case EABI: return "eabi"; - case EABIHF: return "eabihf"; -+ case Musl: return "musl"; -+ case MuslEABIHF: return "musleabihf"; -+ case MuslEABI: return "musleabi"; - case Android: return "android"; - case MSVC: return "msvc"; - case Itanium: return "itanium"; -@@ -427,6 +430,9 @@ static Triple::EnvironmentType parseEnvironment(StringRef EnvironmentName) { - .StartsWith("code16", Triple::CODE16) - .StartsWith("gnu", Triple::GNU) - .StartsWith("android", Triple::Android) -+ .StartsWith("musleabihf", Triple::MuslEABIHF) -+ .StartsWith("musleabi", Triple::MuslEABI) -+ .StartsWith("musl", Triple::Musl) - .StartsWith("msvc", Triple::MSVC) - .StartsWith("itanium", Triple::Itanium) - .StartsWith("cygnus", Triple::Cygnus) -diff --git a/lib/Target/ARM/ARMSubtarget.h b/lib/Target/ARM/ARMSubtarget.h -index dd101df..c5bdcca 100644 ---- a/lib/Target/ARM/ARMSubtarget.h -+++ b/lib/Target/ARM/ARMSubtarget.h -@@ -381,8 +381,10 @@ public: - bool isTargetEHABICompatible() const { - return (TargetTriple.getEnvironment() == Triple::EABI || - TargetTriple.getEnvironment() == Triple::GNUEABI || -+ TargetTriple.getEnvironment() == Triple::MuslEABI || - TargetTriple.getEnvironment() == Triple::EABIHF || - TargetTriple.getEnvironment() == Triple::GNUEABIHF || -+ TargetTriple.getEnvironment() == Triple::MuslEABIHF || - TargetTriple.getEnvironment() == Triple::Android) && - !isTargetDarwin() && !isTargetWindows(); - } -@@ -391,6 +393,7 @@ public: - // FIXME: this is invalid for WindowsCE - return TargetTriple.getEnvironment() == Triple::GNUEABIHF || - TargetTriple.getEnvironment() == Triple::EABIHF || -+ TargetTriple.getEnvironment() == Triple::MuslEABIHF || - isTargetWindows(); - } - bool isTargetAndroid() const { -diff --git a/lib/Target/ARM/ARMTargetMachine.cpp b/lib/Target/ARM/ARMTargetMachine.cpp -index 93495d6..56e6b7f 100644 ---- a/lib/Target/ARM/ARMTargetMachine.cpp -+++ b/lib/Target/ARM/ARMTargetMachine.cpp -@@ -97,6 +97,8 @@ computeTargetABI(const Triple &TT, StringRef CPU, - case llvm::Triple::GNUEABIHF: - case llvm::Triple::EABIHF: - case llvm::Triple::EABI: -+ case llvm::Triple::MuslEABI: -+ case llvm::Triple::MuslEABIHF: - TargetABI = ARMBaseTargetMachine::ARM_ABI_AAPCS; - break; - case llvm::Triple::GNU: --- -2.5.1 - diff --git a/testing/llvm3.7/llvm-0003-musl-hacks.patch b/testing/llvm3.7/llvm-0003-musl-hacks.patch deleted file mode 100644 index d88b5fc925..0000000000 --- a/testing/llvm3.7/llvm-0003-musl-hacks.patch +++ /dev/null @@ -1,114 +0,0 @@ -From faca3fbd15d0c3108493c3c54cd93138e049ac43 Mon Sep 17 00:00:00 2001 -From: Andrea Brancaleoni <miwaxe@gmail.com> -Date: Tue, 8 Sep 2015 22:03:02 +0200 -Subject: [PATCH 3/3] musl - ---- - include/llvm/Analysis/TargetLibraryInfo.h | 9 +++++++++ - lib/Analysis/TargetLibraryInfo.cpp | 5 +++-- - lib/Support/DynamicLibrary.cpp | 2 +- - lib/Support/Unix/Signals.inc | 6 +++--- - utils/unittest/googletest/src/gtest.cc | 1 + - 5 files changed, 17 insertions(+), 6 deletions(-) - -diff --git a/include/llvm/Analysis/TargetLibraryInfo.h b/include/llvm/Analysis/TargetLibraryInfo.h -index e0a1ee3..465b65a 100644 ---- a/include/llvm/Analysis/TargetLibraryInfo.h -+++ b/include/llvm/Analysis/TargetLibraryInfo.h -@@ -18,6 +18,15 @@ - #include "llvm/IR/Module.h" - #include "llvm/Pass.h" - -+#undef fopen64 -+#undef fseeko64 -+#undef fstat64 -+#undef fstatvfs64 -+#undef ftello64 -+#undef lstat64 -+#undef stat64 -+#undef tmpfile64 -+ - namespace llvm { - /// VecDesc - Describes a possible vectorization of a function. - /// Function 'VectorFnName' is equivalent to 'ScalarFnName' vectorized -diff --git a/lib/Analysis/TargetLibraryInfo.cpp b/lib/Analysis/TargetLibraryInfo.cpp -index 635c50c..863f4a0 100644 ---- a/lib/Analysis/TargetLibraryInfo.cpp -+++ b/lib/Analysis/TargetLibraryInfo.cpp -@@ -336,14 +336,15 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - } - - // 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::fstat64); -diff --git a/lib/Support/DynamicLibrary.cpp b/lib/Support/DynamicLibrary.cpp -index 9a7aeb5..e21750d 100644 ---- a/lib/Support/DynamicLibrary.cpp -+++ b/lib/Support/DynamicLibrary.cpp -@@ -138,7 +138,7 @@ void* DynamicLibrary::SearchForAddressOfSymbol(const char *symbolName) { - - // This macro returns the address of a well-known, explicit symbol - #define EXPLICIT_SYMBOL(SYM) \ -- if (!strcmp(symbolName, #SYM)) return &SYM -+ if (!strcmp(symbolName, #SYM)) return (void *) &SYM - - // On linux we have a weird situation. The stderr/out/in symbols are both - // macros and global variables because of standards requirements. So, we -diff --git a/lib/Support/Unix/Signals.inc b/lib/Support/Unix/Signals.inc -index bfe2a3a..e8372d9 100644 ---- a/lib/Support/Unix/Signals.inc -+++ b/lib/Support/Unix/Signals.inc -@@ -117,7 +117,7 @@ static void RegisterHandlers() { - // during handling an actual signal because you can't safely call new in a - // signal handler. - *SignalsMutex; -- -+ - // If the handlers are already registered, we're done. - if (NumRegisteredSignals != 0) return; - -@@ -164,7 +164,7 @@ static void RemoveFilesToRemove() { - // super-user permissions. - if (!S_ISREG(buf.st_mode)) - continue; -- -+ - // Otherwise, remove the file. We ignore any errors here as there is nothing - // else we can do. - unlink(path); -@@ -430,7 +430,7 @@ static bool printSymbolizedStackTrace(void **StackTrace, int Depth, - // On glibc systems we have the 'backtrace' function, which works nicely, but - // doesn't demangle symbols. - void llvm::sys::PrintStackTrace(raw_ostream &OS) { --#if defined(HAVE_BACKTRACE) && defined(ENABLE_BACKTRACES) -+#if defined(__GLIBC__) && defined(HAVE_BACKTRACE) && defined(ENABLE_BACKTRACES) - static void* StackTrace[256]; - // Use backtrace() to output a backtrace on Linux systems with glibc. - int depth = backtrace(StackTrace, -diff --git a/utils/unittest/googletest/src/gtest.cc b/utils/unittest/googletest/src/gtest.cc -index 5780764..1d548c1 100644 ---- 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 - --- -2.5.1 - |