summaryrefslogtreecommitdiffstats
path: root/source/d/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'source/d/llvm')
-rw-r--r--source/d/llvm/clang-tools-extra.no.clangd.diff20
-rw-r--r--source/d/llvm/clang.toolchains.i586.triple.diff13
-rwxr-xr-xsource/d/llvm/llvm.SlackBuild50
-rw-r--r--source/d/llvm/llvm.url16
4 files changed, 75 insertions, 24 deletions
diff --git a/source/d/llvm/clang-tools-extra.no.clangd.diff b/source/d/llvm/clang-tools-extra.no.clangd.diff
new file mode 100644
index 000000000..cae833069
--- /dev/null
+++ b/source/d/llvm/clang-tools-extra.no.clangd.diff
@@ -0,0 +1,20 @@
+--- ./tools/clang/tools/extra/CMakeLists.txt.orig 2018-03-22 18:34:46.000000000 -0500
++++ ./tools/clang/tools/extra/CMakeLists.txt 2018-09-20 18:03:37.034041551 -0500
+@@ -10,17 +10,10 @@
+ add_subdirectory(clang-doc)
+ add_subdirectory(clang-query)
+ add_subdirectory(clang-move)
+-add_subdirectory(clangd)
+ add_subdirectory(include-fixer)
+ add_subdirectory(pp-trace)
+ add_subdirectory(tool-template)
+
+-# Add the common testsuite after all the tools.
+-if(CLANG_INCLUDE_TESTS)
+-add_subdirectory(test)
+-add_subdirectory(unittests)
+-endif()
+-
+ option(CLANG_TOOLS_EXTRA_INCLUDE_DOCS "Generate build targets for the Clang Extra Tools docs."
+ ${LLVM_INCLUDE_DOCS})
+ if( CLANG_TOOLS_EXTRA_INCLUDE_DOCS )
diff --git a/source/d/llvm/clang.toolchains.i586.triple.diff b/source/d/llvm/clang.toolchains.i586.triple.diff
index 01b87c68a..55e0adc99 100644
--- a/source/d/llvm/clang.toolchains.i586.triple.diff
+++ b/source/d/llvm/clang.toolchains.i586.triple.diff
@@ -1,13 +1,12 @@
---- ./tools/clang/lib/Driver/ToolChains/Gnu.cpp.orig 2017-08-10 20:47:32.000000000 -0500
-+++ ./tools/clang/lib/Driver/ToolChains/Gnu.cpp 2017-09-07 14:41:16.170110145 -0500
-@@ -1834,8 +1834,8 @@
+--- ./tools/clang/lib/Driver/ToolChains/Gnu.cpp.orig 2018-07-31 09:21:46.000000000 -0500
++++ ./tools/clang/lib/Driver/ToolChains/Gnu.cpp 2018-09-19 15:29:29.077917414 -0500
+@@ -1842,7 +1842,8 @@
"i686-linux-gnu", "i686-pc-linux-gnu", "i486-linux-gnu",
"i386-linux-gnu", "i386-redhat-linux6E", "i686-redhat-linux",
"i586-redhat-linux", "i386-redhat-linux", "i586-suse-linux",
-- "i486-slackware-linux", "i686-montavista-linux", "i686-linux-android",
-- "i586-linux-gnu"};
-+ "i486-slackware-linux", "i586-slackware-linux", "i686-montavista-linux",
-+ "i686-linux-android", "i586-linux-gnu"};
+- "i486-slackware-linux", "i686-montavista-linux", "i586-linux-gnu"};
++ "i486-slackware-linux", "i586-slackware-linux", "i686-slackware-linux",
++ "i686-montavista-linux", "i586-linux-gnu"};
static const char *const MIPSLibDirs[] = {"/lib"};
static const char *const MIPSTriples[] = {"mips-linux-gnu", "mips-mti-linux",
diff --git a/source/d/llvm/llvm.SlackBuild b/source/d/llvm/llvm.SlackBuild
index 591ed74db..84533d48a 100755
--- a/source/d/llvm/llvm.SlackBuild
+++ b/source/d/llvm/llvm.SlackBuild
@@ -27,9 +27,9 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=llvm
VERSION=${VERSION:-$(echo llvm-*.tar.xz | rev | cut -f 4- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
-NUMJOBS=${NUMJOBS:-" -j7 "}
+NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -101,11 +101,15 @@ cd ../
# Support GCC built for i586-slackware-linux:
zcat $CWD/clang.toolchains.i586.triple.diff.gz | patch -p1 --verbose || exit 1
-## This seems obsolete, so commenting it out:
-#
-## Use i586 $ARCH on 32-bit x86:
-#sed -r "/ifeq.*CompilerTargetArch/s#i386#i586#g" \
-# -i projects/compiler-rt/make/platform/clang_linux.mk
+# As of clang-tools-extra-7.0.0 we get the following error on i586 or i686:
+# CMakeFiles/clangDaemon.dir/Trace.cpp.o:Trace.cpp:function std::unique_ptr<clang::clangd::trace::(anonymous namespace)::JSONTracer::JSONSpan, std::default_delete<clang::clangd::trace::(anonymous namespace)::JSONTracer::JSONSpan> >::~unique_ptr(): error: undefined reference to '__atomic_load_8'
+# Attempts to try to fix this have failed here, so for now we will not build
+# clangd to avoid the failure. Any help with a proper fix is appreciated.
+# I have not reported this upstream since I suspect that it's an artifact
+# of our convoluted build method.
+if [ $ARCH = i586 ] || [ $ARCH = i686 ]; then
+ zcat $CWD/clang-tools-extra.no.clangd.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+fi
chown -R root:root .
find . \
@@ -134,6 +138,7 @@ cd build
-DCLANG_BUILD_SHARED_LIBS=ON \
-DLLVM_BUILD_LLVM_DYLIB=ON \
-DLLVM_LINK_LLVM_DYLIB=ON \
+ -DLLVM_USE_LINKER=gold \
-DLLVM_ENABLE_RTTI=ON \
-DLLVM_ENABLE_FFI=ON \
-DLLVM_ENABLE_ASSERTIONS=OFF \
@@ -142,10 +147,37 @@ cd build
-DCLANG_RESOURCE_DIR="../lib${LIBDIRSUFFIX}/clang/${VERSION}" \
.. || exit 1
- # breaks with one of the patches above. Maybe revisit later
+ # Breaks with one of the patches above. Maybe revisit later?
# -DBUILD_SHARED_LIBS=ON \
- make $NUMJOBS VERBOSE=1 || make || exit 1
+ # This seems to not like a parallel build, at least as of 7.0.0. I don't have
+ # days to wait for the compile though, so let's just smack it with a hammer
+ # fifty times before dropping back to a single-threaded build:
+ for index in $(seq 1 50) ; do
+ #make $NUMJOBS VERBOSE=1
+ make $NUMJOBS
+ ERR_RESULT=$?
+ if [ $ERR_RESULT = 0 ]; then
+ break
+ fi
+ echo "*** PARALLEL MAKE RESTART NUMBER $index"
+ done
+ if [ ! $ERR_RESULT = 0 ]; then
+ # Fifty more for the single thread:
+ for index in $(seq 1 50) ; do
+ #make VERBOSE=1
+ make
+ ERR_RESULT=$?
+ if [ $ERR_RESULT = 0 ]; then
+ break
+ fi
+ echo "*** NON-PARALLEL MAKE RESTART NUMBER $index"
+ done
+ fi
+ if [ ! $ERR_RESULT = 0 ]; then
+ exit 1
+ fi
+
make install DESTDIR=$PKG || exit 1
cd ..
diff --git a/source/d/llvm/llvm.url b/source/d/llvm/llvm.url
index ee6a1240a..4bc32c8f5 100644
--- a/source/d/llvm/llvm.url
+++ b/source/d/llvm/llvm.url
@@ -1,8 +1,8 @@
-http://llvm.org/releases/6.0.1/llvm-6.0.1.src.tar.xz
-http://llvm.org/releases/6.0.1/cfe-6.0.1.src.tar.xz
-http://llvm.org/releases/6.0.1/clang-tools-extra-6.0.1.src.tar.xz
-http://llvm.org/releases/6.0.1/compiler-rt-6.0.1.src.tar.xz
-http://llvm.org/releases/6.0.1/lldb-6.0.1.src.tar.xz
-http://llvm.org/releases/6.0.1/openmp-6.0.1.src.tar.xz
-http://llvm.org/releases/6.0.1/libcxx-6.0.1.src.tar.xz
-http://llvm.org/releases/6.0.1/libcxxabi-6.0.1.src.tar.xz
+http://llvm.org/releases/7.0.0/llvm-7.0.0.src.tar.xz
+http://llvm.org/releases/7.0.0/cfe-7.0.0.src.tar.xz
+http://llvm.org/releases/7.0.0/clang-tools-extra-7.0.0.src.tar.xz
+http://llvm.org/releases/7.0.0/compiler-rt-7.0.0.src.tar.xz
+http://llvm.org/releases/7.0.0/lldb-7.0.0.src.tar.xz
+http://llvm.org/releases/7.0.0/openmp-7.0.0.src.tar.xz
+http://llvm.org/releases/7.0.0/libcxx-7.0.0.src.tar.xz
+http://llvm.org/releases/7.0.0/libcxxabi-7.0.0.src.tar.xz