From 8c430428c7716acb09a88870654d59a320b70f3d Mon Sep 17 00:00:00 2001 From: Marcin Bojara Date: Sat, 4 Jan 2020 17:43:53 +0100 Subject: [PATCH] update llvm --- programming/build/llvm/actions.py | 101 +++++++++++++----------------- programming/build/llvm/pspec.xml | 20 +++--- 2 files changed, 56 insertions(+), 65 deletions(-) mode change 100755 => 100644 programming/build/llvm/actions.py mode change 100755 => 100644 programming/build/llvm/pspec.xml diff --git a/programming/build/llvm/actions.py b/programming/build/llvm/actions.py old mode 100755 new mode 100644 index 38c58cd592..de46aac56e --- a/programming/build/llvm/actions.py +++ b/programming/build/llvm/actions.py @@ -3,85 +3,70 @@ # Licensed under the GNU General Public License, version 3. # See the file http://www.gnu.org/licenses/gpl.txt +from pisi.actionsapi import get from pisi.actionsapi import autotools from pisi.actionsapi import pisitools -from pisi.actionsapi import shelltools -from pisi.actionsapi import get from pisi.actionsapi import cmaketools +from pisi.actionsapi import shelltools -libdir = "/usr/lib32/llvm" if get.buildTYPE() == "emul32" else "/usr/lib/llvm" lib = "lib32" if get.buildTYPE() == "emul32" else "lib" +libdir = "/usr/%s/llvm" % lib def setup(): + options = "-DCMAKE_BUILD_TYPE=Release \ + -DLLVM_BUILD_LLVM_DYLIB=ON \ + -DLLVM_LINK_LLVM_DYLIB=ON \ + -DLLVM_INSTALL_UTILS=ON \ + -DLLVM_ENABLE_RTTI=ON \ + -DLLVM_ENABLE_FFI=ON \ + -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=AVR \ + -DLLVM_BUILD_TESTS=ON \ + -DLLVM_BUILD_DOCS=OFF \ + -DLLVM_ENABLE_SPHINX=ON \ + -DLLVM_ENABLE_DOXYGEN=OFF \ + -DSPHINX_WARNINGS_AS_ERRORS=OFF \ + -DFFI_INCLUDE_DIR=$(pkg-config --variable=includedir libffi) \ + -DLLVM_BINUTILS_INCDIR=/usr/include \ + " if get.buildTYPE() != "emul32": - if not shelltools.can_access_directory("tools/clang"): - shelltools.system("tar xf ../cfe-%s.src.tar.xz -C tools" % get.srcVERSION()) - shelltools.move("tools/cfe-%s.src" % get.srcVERSION(), "tools/clang") - - shelltools.system("tar xf ../clang-tools-extra-%s.src.tar.xz -C tools" % get.srcVERSION()) - shelltools.move("tools/clang-tools-extra-*", "tools/clang/extra") + if not shelltools.can_access_directory("tools/clang"): + shelltools.move("../clang-%s.src" % get.srcVERSION(), "tools/clang") + shelltools.move("../clang-tools-extra-%s.src" % get.srcVERSION(), "tools/clang/tools/extra") + shelltools.move("../lld-%s.src" % get.srcVERSION(), "tools/lld") + shelltools.move("../lldb-%s.src" % get.srcVERSION(), "tools/lldb") + shelltools.move("../compiler-rt-%s.src" % get.srcVERSION(), "projects/compiler-rt") - shelltools.system("tar xf ../lldb-%s.src.tar.xz -C tools" % get.srcVERSION()) - shelltools.move("tools/lldb-*", "tools/lldb") - - if not shelltools.can_access_directory("projects/compiler-rt"): - shelltools.system("tar xf ../compiler-rt-%s.src.tar.xz -C projects" % get.srcVERSION()) - shelltools.move("projects/compiler-rt-%s.src" % get.srcVERSION(), "projects/compiler-rt") - - - shelltools.export("CC", "gcc") - shelltools.export("CXX", "g++") - - - if get.buildTYPE() == "emul32": - shelltools.export("CC", "gcc -m32") - shelltools.export("CXX", "g++ -m32") + else: shelltools.export("PKG_CONFIG_PATH","/usr/lib32/pkgconfig") - shelltools.makedirs("build") - + shelltools.makedirs("build") shelltools.cd("build") if get.buildTYPE() != "emul32": - options = "-DCMAKE_C_FLAGS:STRING=-m64 \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_CXX_FLAGS:STRING=-m64 \ - -DLLVM_TARGET_ARCH:STRING=x86_64 \ - -DLLVM_DEFAULT_TARGET_TRIPLE=%s " % get.HOST() - - - if get.buildTYPE() == "emul32": - options = " -DCMAKE_C_FLAGS:STRING=-m32 \ - -DCMAKE_INSTALL_PREFIX=/emul32 \ - -DLLVM_TARGET_ARCH:STRING=i686 \ - -DLLVM_LIBDIR_SUFFIX=32 \ - -DLLVM_DEFAULT_TARGET_TRIPLE='i686-pc-linux-gnu' \ - -DCMAKE_CXX_FLAGS:STRING=-m32" - - - cmaketools.configure("-DCMAKE_BUILD_TYPE=Release \ - %s \ - -DLLVM_ENABLE_FFI=ON \ - -DLLVM_BUILD_DOCS=OFF \ - -DLLVM_BUILD_LLVM_DYLIB=ON \ - -DLLVM_LINK_LLVM_DYLIB=ON \ - -DLLVM_ENABLE_RTTI=ON \ - -DLLVM_INCLUDEDIR=/usr/include \ - -DLLVM_ENABLE_ASSERTIONS=OFF \ - -DFFI_INCLUDE_DIR=/usr/lib/libffi-3.2.1/include \ - -DENABLE_SHARED=ON" % options, sourceDir=".." ) + options = "-DCMAKE_INSTALL_PREFIX=/usr \ + -DLLVM_TARGET_ARCH:STRING=x86_64 \ + -DLLVM_DEFAULT_TARGET_TRIPLE=%s \ + " % get.HOST() + else: + pisitools.flags.replace("-march=\S+", "-march=i686 -m32") + options = "-DCMAKE_INSTALL_PREFIX=/emul32 \ + -DLLVM_TARGET_ARCH:STRING=i686 \ + -DLLVM_LIBDIR_SUFFIX=32 \ + -DLLVM_DEFAULT_TARGET_TRIPLE='i686-pc-linux-gnu' \ + " + options += "-DCMAKE_C_FLAGS_RELEASE=%s \ + -DCMAKE_CXX_FLAGS_RELEASE=%s \ + " % (get.CFLAGS(), get.CXXFLAGS()) + + cmaketools.configure(options, sourceDir=".." ) def build(): - shelltools.makedirs("build") shelltools.cd("build") - cmaketools.make() def install(): - shelltools.makedirs("build") - shelltools.cd("build") - + shelltools.cd("build") cmaketools.rawInstall("DESTDIR=%s" % get.installDIR()) if get.buildTYPE() == "emul32": diff --git a/programming/build/llvm/pspec.xml b/programming/build/llvm/pspec.xml old mode 100755 new mode 100644 index 92f297277c..7f86badc3b --- a/programming/build/llvm/pspec.xml +++ b/programming/build/llvm/pspec.xml @@ -11,11 +11,12 @@ NCSA The Low Level Virtual Machine The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. Despite its name, LLVM has little to do with traditional virtual machines, though it does provide helpful libraries that can be used to build them. - http://llvm.org/releases/7.1.0/llvm-7.1.0.src.tar.xz - http://llvm.org/releases/7.1.0/cfe-7.1.0.src.tar.xz - http://releases.llvm.org/7.1.0/clang-tools-extra-7.1.0.src.tar.xz - http://releases.llvm.org/7.1.0/lldb-7.1.0.src.tar.xz - http://llvm.org/releases/7.1.0/compiler-rt-7.1.0.src.tar.xz + https://github.com/llvm/llvm-project/releases/download/llvmorg-9.0.1/llvm-9.0.1.src.tar.xz + https://github.com/llvm/llvm-project/releases/download/llvmorg-9.0.1/lldb-9.0.1.src.tar.xz + https://github.com/llvm/llvm-project/releases/download/llvmorg-9.0.1/lld-9.0.1.src.tar.xz + https://github.com/llvm/llvm-project/releases/download/llvmorg-9.0.1/clang-9.0.1.src.tar.xz + https://github.com/llvm/llvm-project/releases/download/llvmorg-9.0.1/clang-tools-extra-9.0.1.src.tar.xz + https://github.com/llvm/llvm-project/releases/download/llvmorg-9.0.1/compiler-rt-9.0.1.src.tar.xz zlib-devel libxml2-devel @@ -155,8 +156,6 @@ /usr/bin/tblgen /usr/lib/clang /usr/lib/libclang* - - /usr/share/man/man1/clang.1 /usr/lib/cmake/clang/Clang* /usr/share/clang @@ -212,6 +211,13 @@ + + 2020-01-03 + 9.0.1 + Version bump. + Marcin Bojara + marcin.bojara@gmail.com + 2019-05-23 7.1.0