From 08fdc9700ce1b4e47bebc9c9d08959f5e50bc0c1 Mon Sep 17 00:00:00 2001 From: Travis Tilley Date: Wed, 27 May 2015 12:39:40 -0400 Subject: main/llvm: update to 3.6.1 clean up and update patchset switch to cmake perform a two-stage build with a minimal bootstrap compile of clang add clang extras update package list to split out clang documentation enable pulling from the svn release tags fix making use of abuild CFLAGS/CXXFLAGS during build don't run check-llvm, as the tests fail when running under PaX --- main/llvm/llvm-0003-musl-hacks.patch | 82 ++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 main/llvm/llvm-0003-musl-hacks.patch (limited to 'main/llvm/llvm-0003-musl-hacks.patch') diff --git a/main/llvm/llvm-0003-musl-hacks.patch b/main/llvm/llvm-0003-musl-hacks.patch new file mode 100644 index 000000000..7d3e0a618 --- /dev/null +++ b/main/llvm/llvm-0003-musl-hacks.patch @@ -0,0 +1,82 @@ +diff --git a/include/llvm/Target/TargetLibraryInfo.h b/include/llvm/Target/TargetLibraryInfo.h +index 46f87b9..41ac5fd 100644 +--- a/include/llvm/Target/TargetLibraryInfo.h ++++ b/include/llvm/Target/TargetLibraryInfo.h +@@ -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 --git a/lib/Support/DynamicLibrary.cpp b/lib/Support/DynamicLibrary.cpp +index d2b551e..4634a13 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 e8f4643..8a320ef 100644 +--- a/lib/Support/Unix/Signals.inc ++++ b/lib/Support/Unix/Signals.inc +@@ -416,7 +416,7 @@ static bool printSymbolizedStackTrace(void **StackTrace, int Depth, FILE *FD) { + // On glibc systems we have the 'backtrace' function, which works nicely, but + // doesn't demangle symbols. + void llvm::sys::PrintStackTrace(FILE *FD) { +-#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/lib/Target/TargetLibraryInfo.cpp b/lib/Target/TargetLibraryInfo.cpp +index c0abdbd..ed908f8 100644 +--- a/lib/Target/TargetLibraryInfo.cpp ++++ b/lib/Target/TargetLibraryInfo.cpp +@@ -664,14 +664,15 @@ static void initialize(TargetLibraryInfo &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/utils/unittest/googletest/src/gtest.cc b/utils/unittest/googletest/src/gtest.cc +index bf850c6..9e9088c 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 // NOLINT ++# include // NOLINT + # include // NOLINT + #endif + +-- +2.1.4 -- cgit v1.2.3