diff options
Diffstat (limited to 'source/d/llvm')
-rw-r--r-- | source/d/llvm/clang.toolchains.i586.triple.diff | 16 | ||||
-rw-r--r-- | source/d/llvm/lldb.32-bit.link.libatomic.diff | 14 | ||||
-rwxr-xr-x | source/d/llvm/llvm.SlackBuild | 58 | ||||
-rw-r--r-- | source/d/llvm/llvm.url | 48 |
4 files changed, 83 insertions, 53 deletions
diff --git a/source/d/llvm/clang.toolchains.i586.triple.diff b/source/d/llvm/clang.toolchains.i586.triple.diff index 90e66c55e..e51f3cd52 100644 --- a/source/d/llvm/clang.toolchains.i586.triple.diff +++ b/source/d/llvm/clang.toolchains.i586.triple.diff @@ -1,10 +1,10 @@ ---- ./tools/clang/lib/Driver/ToolChains/Gnu.cpp.orig 2021-09-24 11:18:10.000000000 -0500 -+++ ./tools/clang/lib/Driver/ToolChains/Gnu.cpp 2021-10-05 14:17:02.597518687 -0500 -@@ -2114,6 +2114,7 @@ - "i586-linux-gnu", "i686-linux-gnu", - "i686-pc-linux-gnu", "i386-redhat-linux6E", - "i686-redhat-linux", "i386-redhat-linux", +--- ./tools/clang/lib/Driver/ToolChains/Gnu.cpp.orig 2022-04-25 22:44:44.000000000 -0500 ++++ ./tools/clang/lib/Driver/ToolChains/Gnu.cpp 2022-04-28 13:34:46.834049926 -0500 +@@ -2107,6 +2107,7 @@ + static const char *const X86Triples[] = { + "i586-linux-gnu", "i686-linux-gnu", "i686-pc-linux-gnu", + "i386-redhat-linux6E", "i686-redhat-linux", "i386-redhat-linux", + "i586-slackware-linux", "i686-slackware-linux", - "i586-suse-linux", "i686-montavista-linux", - "i686-linux-android", "i686-gnu", + "i586-suse-linux", "i686-montavista-linux", "i686-gnu", }; + diff --git a/source/d/llvm/lldb.32-bit.link.libatomic.diff b/source/d/llvm/lldb.32-bit.link.libatomic.diff new file mode 100644 index 000000000..234bcdc72 --- /dev/null +++ b/source/d/llvm/lldb.32-bit.link.libatomic.diff @@ -0,0 +1,14 @@ +--- ./tools/lldb/source/Utility/CMakeLists.txt.orig 2022-06-22 11:46:24.000000000 -0500 ++++ ./tools/lldb/source/Utility/CMakeLists.txt 2022-06-27 22:33:56.715179825 -0500 +@@ -19,9 +19,9 @@ + list(APPEND LLDB_SYSTEM_LIBS ws2_32 rpcrt4) + endif () + +-if (NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB ) ++#if (NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB ) + list(APPEND LLDB_SYSTEM_LIBS atomic) +-endif() ++#endif() + + add_lldb_library(lldbUtility + ArchSpec.cpp diff --git a/source/d/llvm/llvm.SlackBuild b/source/d/llvm/llvm.SlackBuild index f2f1ab094..02df9eb49 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, 2019, 2020, 2021 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2012, 2013, 2014, 2015, 2016, 2018, 2019, 2020, 2021, 2022 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -52,16 +52,6 @@ if [ "$BUILD_CLANGD" = "NO" ]; then CLANGD="-DCLANG_ENABLE_CLANGD=OFF" fi -# Building lld will be determined automatically unless BUILD_LLD is -# preset to YES or NO: -if [ -z $BUILD_LLD ]; then - if [ "$ARCH" = "i586" -o "$ARCH" = "i686" ]; then - BUILD_LLD=NO - else - BUILD_LLD=YES - fi -fi - # If the variable PRINT_PACKAGE_NAME is set, then this script will report what # the name of the created package would be, and then exit. This information # could be useful to other scripts. @@ -72,6 +62,7 @@ fi TMP=${TMP:-/tmp} PKG=$TMP/package-$PKGNAM +BUILDDIR=${TMP}/llvm-build-${VERSION} if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" @@ -99,23 +90,28 @@ PY3=$(python3 -c 'from distutils.sysconfig import get_python_lib; print(get_pyth # 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 +rm -rf $PKG $BUILDDIR +mkdir -p $TMP $PKG $BUILDDIR +cd $BUILDDIR + +# Add a fake configure script so the cleanup script used here at Slackware +# knows to delete this stuff later. Other folks can just ignore this... it +# doesn't have any other purpose. +touch configure +chmod 755 configure + rm -rf $PKGNAM-${VERSION}.src $PKGNAM-${VERSION} tar xvf $CWD/$PKGNAM-$VERSION.src.tar.xz || exit 1 -cd $PKGNAM-${VERSION}/tools || cd $PKGNAM-${VERSION}.src/tools || exit 1 +cd $PKGNAM-${VERSION}.src/tools || cd $PKGNAM-${VERSION}/tools || exit 1 tar xvf $CWD/clang-$VERSION.src.tar.xz || exit 1 mv clang-${VERSION} clang 2>/dev/null || mv clang-${VERSION}.src clang || exit 1 #tar xvf $CWD/flang-$VERSION.src.tar.xz || exit 1 #mv flang-${VERSION} flang 2>/dev/null || mv flang-${VERSION}.src flang || exit 1 tar xvf $CWD/lldb-$VERSION.src.tar.xz || exit 1 mv lldb-${VERSION} lldb 2>/dev/null || mv lldb-${VERSION}.src lldb || exit 1 - if [ "$BUILD_LLD" = "YES" ]; then - tar xvf $CWD/lld-$VERSION.src.tar.xz || exit 1 - mv lld-${VERSION} lld 2>/dev/null || mv lld-${VERSION}.src lld || exit 1 - fi + tar xvf $CWD/lld-$VERSION.src.tar.xz || exit 1 + mv lld-${VERSION} lld 2>/dev/null || mv lld-${VERSION}.src lld || exit 1 cd ../ cd tools/clang/tools || exit 1 @@ -140,7 +136,7 @@ cd projects || exit 1 mv polly-${VERSION} polly 2>/dev/null || mv polly-${VERSION}.src polly || exit 1 # We just need a header file from this... tar xvf $CWD/libunwind-${VERSION}.src.tar.xz || exit 1 - mv libunwind-${VERSION} libunwind || mv libunwind-${VERSION}.src libunwind || exit 1 + mv libunwind-${VERSION}.src libunwind || mv libunwind-${VERSION} libunwind || exit 1 cd ../ # Support GCC built for i586-slackware-linux: @@ -149,6 +145,22 @@ zcat $CWD/clang.toolchains.i586.triple.diff.gz | patch -p1 --verbose || exit 1 # Hack to fix build with polly. Maybe we should just not use polly... ? zcat $CWD/llvm.polly.hack.diff.gz | patch -p1 --verbose || exit 1 +# We require libatomic on 32-bit platforms: +if [ "$ARCH" = "i586" -o "$ARCH" = "i686" ]; then + zcat $CWD/lldb.32-bit.link.libatomic.diff.gz | patch -p1 --verbose || exit 1 +fi + +# Won't build without this. See https://github.com/llvm/llvm-project/issues/54941 +#zcat $CWD/llvm.bypass.broken.benchmarks.diff.gz | patch -p1 --verbose || exit 1 + +# These hackish links seem to be required... +cd .. +ln -sf */utils/gn/secondary/third-party . +ln -sf */runtimes . +ln -sf */projects/libcxx . +ln -sf */projects/libcxxabi . +cd - + chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -171,7 +183,9 @@ cd build -DCMAKE_INSTALL_PREFIX=/usr \ -DLLVM_LIBDIR_SUFFIX=${LIBDIRSUFFIX} \ -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=ON \ + -DLLVM_BUILD_LLVM_DYLIB=ON \ + -DLLVM_LINK_LLVM_DYLIB=ON \ + -DCLANG_LINK_CLANG_DYLIB=ON \ -DLLVM_USE_LINKER=gold \ -DLLVM_ENABLE_RTTI=ON \ -DLLVM_ENABLE_FFI=ON \ @@ -181,6 +195,8 @@ cd build -DCLANG_RESOURCE_DIR="../lib${LIBDIRSUFFIX}/clang/${VERSION}" \ -DLLVM_TARGETS_TO_BUILD="host;AMDGPU;BPF" \ -DLLDB_USE_SYSTEM_SIX=1 \ + -DLLVM_INCLUDE_BENCHMARKS=OFF \ + -DCOMPILER_RT_BUILD_LIBFUZZER=OFF \ $CLANGD \ .. || exit 1 diff --git a/source/d/llvm/llvm.url b/source/d/llvm/llvm.url index 4760a784d..6defe5750 100644 --- a/source/d/llvm/llvm.url +++ b/source/d/llvm/llvm.url @@ -1,25 +1,25 @@ -https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.1/llvm-13.0.1.src.tar.xz -https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.1/clang-13.0.1.src.tar.xz -https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.1/clang-tools-extra-13.0.1.src.tar.xz -https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.1/compiler-rt-13.0.1.src.tar.xz -https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.1/flang-13.0.1.src.tar.xz -https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.1/lldb-13.0.1.src.tar.xz -https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.1/openmp-13.0.1.src.tar.xz -https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.1/polly-13.0.1.src.tar.xz -https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.1/libcxx-13.0.1.src.tar.xz -https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.1/libcxxabi-13.0.1.src.tar.xz -https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.1/lld-13.0.1.src.tar.xz -https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.1/libunwind-13.0.1.src.tar.xz +https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.6/llvm-14.0.6.src.tar.xz +https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.6/clang-14.0.6.src.tar.xz +https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.6/clang-tools-extra-14.0.6.src.tar.xz +https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.6/compiler-rt-14.0.6.src.tar.xz +https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.6/flang-14.0.6.src.tar.xz +https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.6/lldb-14.0.6.src.tar.xz +https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.6/openmp-14.0.6.src.tar.xz +https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.6/polly-14.0.6.src.tar.xz +https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.6/libcxx-14.0.6.src.tar.xz +https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.6/libcxxabi-14.0.6.src.tar.xz +https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.6/lld-14.0.6.src.tar.xz +https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.6/libunwind-14.0.6.src.tar.xz -#http://llvm.org/releases/13.0.1/llvm-13.0.1.src.tar.xz -#http://llvm.org/releases/13.0.1/clang-13.0.1.src.tar.xz -#http://llvm.org/releases/13.0.1/clang-tools-extra-13.0.1.src.tar.xz -#http://llvm.org/releases/13.0.1/compiler-rt-13.0.1.src.tar.xz -#http://llvm.org/releases/13.0.1/flang-13.0.1.src.tar.xz -#http://llvm.org/releases/13.0.1/lldb-13.0.1.src.tar.xz -#http://llvm.org/releases/13.0.1/openmp-13.0.1.src.tar.xz -#http://llvm.org/releases/13.0.1/polly-13.0.1.src.tar.xz -#http://llvm.org/releases/13.0.1/libcxx-13.0.1.src.tar.xz -#http://llvm.org/releases/13.0.1/libcxxabi-13.0.1.src.tar.xz -#http://llvm.org/releases/13.0.1/lld-13.0.1.src.tar.xz -#http://llvm.org/releases/13.0.1/libunwind-13.0.1.src.tar.xz +#http://llvm.org/releases/14.0.6/llvm-14.0.6.src.tar.xz +#http://llvm.org/releases/14.0.6/clang-14.0.6.src.tar.xz +#http://llvm.org/releases/14.0.6/clang-tools-extra-14.0.6.src.tar.xz +#http://llvm.org/releases/14.0.6/compiler-rt-14.0.6.src.tar.xz +#http://llvm.org/releases/14.0.6/flang-14.0.6.src.tar.xz +#http://llvm.org/releases/14.0.6/lldb-14.0.6.src.tar.xz +#http://llvm.org/releases/14.0.6/openmp-14.0.6.src.tar.xz +#http://llvm.org/releases/14.0.6/polly-14.0.6.src.tar.xz +#http://llvm.org/releases/14.0.6/libcxx-14.0.6.src.tar.xz +#http://llvm.org/releases/14.0.6/libcxxabi-14.0.6.src.tar.xz +#http://llvm.org/releases/14.0.6/lld-14.0.6.src.tar.xz +#http://llvm.org/releases/14.0.6/libunwind-14.0.6.src.tar.xz |