
Turns out the ppc64-musl ELFv2 patch was not being applied at all, and there were two patches that no longer apply and are no longer relevant (the second one reports it's already applied, the first one patches files that don't exist). Remove those patches, and make sure the ppc64 elfv2 patch is applied, because otherwise llvm will emit elfv1 binaries for ppc64-musl and we don't want that. In regards to that, there is also a patch missing in the clang frontend, as otherwise clang will forcibly pass `-mabi=elfv1` internally out of box and it will not work either way, so make sure the correct ABI is passed by clang by default on musl triplets. Also revbump in order to make sure cross-compiling works as expected. [ci skip]
59 lines
1.9 KiB
Diff
59 lines
1.9 KiB
Diff
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/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/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
|
|
|
|
--- llvm-5.0.0.src/lib/Support/Unix/DynamicLibrary.inc.orig
|
|
+++ llvm-5.0.0.src/lib/Support/Unix/DynamicLibrary.inc
|
|
@@ -103,7 +103,7 @@
|
|
|
|
// 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
|
|
|
|
// Under glibc we have a weird situation. The stderr/out/in symbols are both
|
|
// macros and global variables because of standards requirements. So, we
|