summaryrefslogtreecommitdiff
path: root/source/d/llvm
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2019-09-30 21:08:32 +0000
committerEric Hameleers <alien@slackware.com>2019-10-01 08:59:50 +0200
commit0857ff7f632e57090e5dcb764eb1837e34181fcf (patch)
treeb5d3e1ce3f703c3dbe650f3231cdeca5ca460e74 /source/d/llvm
parent8a7ca20f48b4d8a73c13ed397895773b2c4190ff (diff)
downloadcurrent-0857ff7f632e57090e5dcb764eb1837e34181fcf.tar.gz
Mon Sep 30 21:08:32 UTC 201920190930210832
d/llvm-9.0.0-x86_64-1.txz: Upgraded. Shared library .so-version bump. Thanks to orbea for getting this working and cleaning up the build script. d/vala-0.46.2-x86_64-1.txz: Upgraded. l/imagemagick-6.9.10_67-x86_64-1.txz: Upgraded. Fixed --disable-opencl configure option. Thanks to Markus Wiesner for the bug report and to upstream for the quick fix. n/NetworkManager-1.20.4-x86_64-1.txz: Upgraded. n/gnutls-3.6.10-x86_64-1.txz: Upgraded. x/freeglut-3.2.1-x86_64-1.txz: Upgraded. x/libglvnd-1.1.1-x86_64-2.txz: Upgraded. Reverted to this version since I'm seeing some errors linking with Mesa libraries with the newer one. Thanks to nobodino for the bug report. x/mesa-19.2.0-x86_64-2.txz: Rebuilt. Recompiled against llvm-9.0.0 and libglvnd-1.1.1. x/xf86-video-vmware-13.3.0-x86_64-3.txz: Rebuilt. Recompiled against llvm-9.0.0.
Diffstat (limited to 'source/d/llvm')
-rw-r--r--source/d/llvm/clang-tools-extra.no.clangd.diff20
-rwxr-xr-xsource/d/llvm/llvm.SlackBuild76
-rw-r--r--source/d/llvm/llvm.url28
-rw-r--r--source/d/llvm/n_clang_allow_BUILD_SHARED_LIBRARY.patch19
4 files changed, 32 insertions, 111 deletions
diff --git a/source/d/llvm/clang-tools-extra.no.clangd.diff b/source/d/llvm/clang-tools-extra.no.clangd.diff
deleted file mode 100644
index cae83306..00000000
--- a/source/d/llvm/clang-tools-extra.no.clangd.diff
+++ /dev/null
@@ -1,20 +0,0 @@
---- ./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/llvm.SlackBuild b/source/d/llvm/llvm.SlackBuild
index f0626ffa..a8682e35 100755
--- a/source/d/llvm/llvm.SlackBuild
+++ b/source/d/llvm/llvm.SlackBuild
@@ -3,7 +3,7 @@
# Slackware build script for llvm
# Copyright 2008-2016 Heinz Wiesinger, Amsterdam, The Netherlands
-# Copyright 2012, 2013, 2014, 2015, 2016, 2018 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2012, 2013, 2014, 2015, 2016, 2018, 2019 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -69,6 +69,13 @@ PY2=$(python -c 'from distutils.sysconfig import get_python_lib; print(get_pytho
# Python3 short version:
PY3=$(python3 -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())' | cut -f 2 -d n | cut -f 1 -d /)
+# Sadly, glibc-2.30 exposed some sort of problem with clang and icecream.
+# The symptom is a compile failure that says none of the types in
+# <linux/types.h> are defined, even though they are. gcc/g++ seem unaffected.
+# For now, not much choice other than to disable this.
+# Don't use icecream:
+PATH=$(echo $PATH | sed "s|/usr/libexec/icecc/bin||g" | tr -s : | sed "s/^://g" | sed "s/:$//g")
+
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
@@ -114,26 +121,21 @@ zcat $CWD/clang.toolchains.i586.triple.diff.gz | patch -p1 --verbose || exit 1
# 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
+case $ARCH in
+ i?86) CLANGD="-DCLANG_ENABLE_CLANGD=OFF" ;;
+ *) unset CLANGD ;;
+esac
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
+ -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+ -exec chmod 644 {} \+
-# Work around https://llvm.org/bugs/show_bug.cgi?id=30587
-# by building clang with shared libs
-zcat $CWD/n_clang_allow_BUILD_SHARED_LIBRARY.patch.gz | patch -p0 --verbose || exit 1
-
-# need to disable assertions to make llvm thread-safe
-# clang resource dir is a relative path based on the location of the clang binary
mkdir build
cd build
- cmake \
+ cmake -GNinja \
-DCMAKE_C_COMPILER="clang" \
-DCMAKE_CXX_COMPILER="clang++" \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
@@ -141,52 +143,20 @@ cd build
-DCMAKE_INSTALL_PREFIX=/usr \
-DLLVM_LIBDIR_SUFFIX=${LIBDIRSUFFIX} \
-DCMAKE_BUILD_TYPE=Release \
- -DBUILD_SHARED_LIBS=OFF \
- -DCLANG_BUILD_SHARED_LIBS=ON \
- -DLLVM_BUILD_LLVM_DYLIB=ON \
- -DLLVM_LINK_LLVM_DYLIB=ON \
+ -DBUILD_SHARED_LIBS=ON \
-DLLVM_USE_LINKER=gold \
-DLLVM_ENABLE_RTTI=ON \
-DLLVM_ENABLE_FFI=ON \
-DLLVM_ENABLE_ASSERTIONS=OFF \
- -DLLVM_USE_OPROFILE=ON \
-DLLVM_INSTALL_UTILS=ON \
-DLLVM_BINUTILS_INCDIR=/usr/include \
-DCLANG_RESOURCE_DIR="../lib${LIBDIRSUFFIX}/clang/${VERSION}" \
- .. || exit 1
-
- # Breaks with one of the patches above. Maybe revisit later?
- # -DBUILD_SHARED_LIBS=ON \
-
- # 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
+ -DLLVM_TARGETS_TO_BUILD="host;AMDGPU;BPF" \
+ $CLANGD \
+ .. || exit 1
+
+ "${NINJA:=ninja}" $NUMJOBS || exit 1
+ DESTDIR=$PKG "$NINJA" install || exit 1
cd ..
# Add symlinks for $ARCH-slackware-linux-{clang,clang++}:
@@ -237,7 +207,7 @@ mv $PKG/usr/share/man $PKG/usr/
)
# Compress manual pages:
-find $PKG/usr/man -type f -exec gzip -9 {} \;
+find $PKG/usr/man -type f -exec gzip -9 {} \+
for i in $( find $PKG/usr/man -type l ) ; do
ln -s $( readlink $i ).gz $i.gz
rm $i
diff --git a/source/d/llvm/llvm.url b/source/d/llvm/llvm.url
index 7a7a7e00..0f5b2ca2 100644
--- a/source/d/llvm/llvm.url
+++ b/source/d/llvm/llvm.url
@@ -1,19 +1,9 @@
-https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/llvm-8.0.1.src.tar.xz
-https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/cfe-8.0.1.src.tar.xz
-https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/clang-tools-extra-8.0.1.src.tar.xz
-https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/compiler-rt-8.0.1.src.tar.xz
-https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/lldb-8.0.1.src.tar.xz
-https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/openmp-8.0.1.src.tar.xz
-https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/libcxx-8.0.1.src.tar.xz
-https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/libcxxabi-8.0.1.src.tar.xz
-https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/lld-8.0.1.src.tar.xz
-# Or, use the archives from the main site:
-#http://llvm.org/releases/8.0.1/llvm-8.0.1.src.tar.xz
-#http://llvm.org/releases/8.0.1/cfe-8.0.1.src.tar.xz
-#http://llvm.org/releases/8.0.1/clang-tools-extra-8.0.1.src.tar.xz
-#http://llvm.org/releases/8.0.1/compiler-rt-8.0.1.src.tar.xz
-#http://llvm.org/releases/8.0.1/lldb-8.0.1.src.tar.xz
-#http://llvm.org/releases/8.0.1/openmp-8.0.1.src.tar.xz
-#http://llvm.org/releases/8.0.1/libcxx-8.0.1.src.tar.xz
-#http://llvm.org/releases/8.0.1/libcxxabi-8.0.1.src.tar.xz
-#http://llvm.org/releases/8.0.1/lld-8.0.1.src.tar.xz
+http://llvm.org/releases/9.0.0/llvm-9.0.0.src.tar.xz
+http://llvm.org/releases/9.0.0/cfe-9.0.0.src.tar.xz
+http://llvm.org/releases/9.0.0/clang-tools-extra-9.0.0.src.tar.xz
+http://llvm.org/releases/9.0.0/compiler-rt-9.0.0.src.tar.xz
+http://llvm.org/releases/9.0.0/lldb-9.0.0.src.tar.xz
+http://llvm.org/releases/9.0.0/openmp-9.0.0.src.tar.xz
+http://llvm.org/releases/9.0.0/libcxx-9.0.0.src.tar.xz
+http://llvm.org/releases/9.0.0/libcxxabi-9.0.0.src.tar.xz
+http://llvm.org/releases/9.0.0/lld-9.0.0.src.tar.xz
diff --git a/source/d/llvm/n_clang_allow_BUILD_SHARED_LIBRARY.patch b/source/d/llvm/n_clang_allow_BUILD_SHARED_LIBRARY.patch
deleted file mode 100644
index 8e42aaee..00000000
--- a/source/d/llvm/n_clang_allow_BUILD_SHARED_LIBRARY.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-We use LLVM_BUILD_LLVM_DYLIB to build the llvm libraries as shared, but that
-does not work for clang. We can use BUILD_SHARED_LIBS on clang, but since we
-build them all together, we need to smuggle it in using this patch.
-
-Index: CMakeLists.txt
-===================================================================
---- tools/clang/CMakeLists.txt
-+++ tools/clang/CMakeLists.txt
-@@ -1,5 +1,10 @@
- cmake_minimum_required(VERSION 3.4.3)
-
-+if( CLANG_BUILD_SHARED_LIBS )
-+ set(BUILD_SHARED_LIBS ON)
-+ set(LLVM_BUILD_LLVM_DYLIB OFF)
-+endif()
-+
- # If we are not building as a part of LLVM, build Clang as an
- # standalone project, using LLVM as an external library:
- if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )