diff --git a/programming/build/llvm/actions.py b/programming/build/llvm/actions.py index b8a7dc901f..d0be576bc7 100644 --- a/programming/build/llvm/actions.py +++ b/programming/build/llvm/actions.py @@ -28,7 +28,10 @@ def setup(): #pisitools.cxxflags.remove("-D_FORTIFY_SOURCE=2") #shelltools.export("CC", "clang") #shelltools.export("CXX", "clang++") - + #shelltools.export("AR", "llvm-ar") + #shelltools.export("NM", "llvm-nm") + #shelltools.export("RANLIB", "llvm-ranlib") + if get.buildTYPE() == "emul32": shelltools.export("CC", "gcc -m32") @@ -36,7 +39,7 @@ def setup(): #shelltools.export("CC", "clang -m32") #shelltools.export("CXX", "clang++ -m32") shelltools.export("PKG_CONFIG_PATH","/usr/lib32/pkgconfig") - + #clang patch #shelltools.cd("tools") #shelltools.system("patch -p1 < enable-SSP-and-PIE-by-default.patch") @@ -48,31 +51,34 @@ def setup(): #shelltools.export("CXX", "clang++") shelltools.makedirs("build") - + shelltools.cd("build") - + if get.buildTYPE() != "emul32": pisitools.cflags.add("-m64 ") pisitools.cxxflags.add("-m64") options = "-DLLVM_TARGET_ARCH:STRING=x86_64 \ -DLLDB_ENABLE_LUA=OFF \ -DLLVM_DEFAULT_TARGET_TRIPLE=%s " % get.HOST() - - + + if get.buildTYPE() == "emul32": shelltools.export("CC", "gcc -m32") shelltools.export("CXX", "g++ -m32") - #pisitools.cflags.add("-m32 ") - #pisitools.cxxflags.add("-m32") + pisitools.cflags.add("-m32 ") + pisitools.cxxflags.add("-m32") shelltools.export("PKG_CONFIG_PATH","/usr/lib32/pkgconfig") options = " -DCMAKE_INSTALL_PREFIX=/emul32 \ -DLLVM_TARGET_ARCH:STRING=i686 \ -DLLVM_DEFAULT_TARGET_TRIPLE='i686-pc-linux-gnu'" - - + + cmaketools.configure("-DCMAKE_BUILD_TYPE=Release \ -G 'Unix Makefiles' \ %s \ + -DCMAKE_AR=/usr/bin/llvm-ar \ + -DCMAKE_NM=/usr/bin/llvm-nm \ + -DCMAKE_RANLIB=/usr/bin/llvm-ranlib \ -DLLVM_ENABLE_PROJECTS='%s' \ -DLLVM_LIBDIR_SUFFIX=%s \ -DLLVM_ENABLE_FFI=ON \ @@ -81,13 +87,11 @@ def setup(): -DLLVM_ENABLE_EH=ON \ -DLLVM_BUILD_LLVM_DYLIB=ON \ -DLLVM_LINK_LLVM_DYLIB=ON \ - -DLLVM_ENABLE_SPHINX=ON \ -DLLDB_USE_SYSTEM_SIX=1 \ -DLLVM_INCLUDEDIR=/usr/include \ -DLLVM_ENABLE_ASSERTIONS=OFF \ -DFFI_INCLUDE_DIR=/usr/include \ - -DLLVM_BINUTILS_INCDIR=/usr/include \ - -DCOMPILER_RT_USE_LIBCXX=OFF" % (options, projects, libsuffix), sourceDir=".." ) + -DCOMPILER_RT_USE_LIBCXX=OFF" % (options, projects, libsuffix), sourceDir=".." ) def build(): shelltools.cd("build") @@ -98,16 +102,14 @@ def install(): shelltools.cd("build") #shelltools.system("DESTDIR=%s ninja install" % get.installDIR()) cmaketools.rawInstall("DESTDIR=%s" % get.installDIR()) - - if get.buildTYPE() == "emul32": + + if get.buildTYPE() == "emul32": pisitools.domove("/emul32/lib32/", "/usr/") pisitools.insinto("/usr/include/llvm/Config/","%s/emul32/include/llvm/Config/llvm-config.h" % get.installDIR(),"llvm-config-32.h") pisitools.insinto("/usr/bin/","%s/emul32/bin/llvm-config" % get.installDIR(),"llvm-config-32") - pisitools.dosym("/usr/lib/LLVMgold.so", "/usr/lib/bfd-plugins/LLVMgold.so") - pisitools.dosym("/usr/lib32/LLVMgold.so", "/usr/lib32/bfd-plugins/LLVMgold.so") pisitools.removeDir("/emul32") #pisitools.remove("/usr/lib/python3.8/site-packages/six.py") - + shelltools.cd ("..") - + pisitools.dodoc("LICENSE.TXT", "README.txt") diff --git a/programming/build/llvm/files/no-strict-aliasing-DwarfCompileUnit.patch b/programming/build/llvm/files/no-strict-aliasing-DwarfCompileUnit.patch new file mode 100644 index 0000000000..c71688699e --- /dev/null +++ b/programming/build/llvm/files/no-strict-aliasing-DwarfCompileUnit.patch @@ -0,0 +1,13 @@ +diff --git a/llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt b/llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt +index eb924282a75e..85929b54d6ce 100644 +--- a/llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt ++++ b/llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt +@@ -44,3 +44,8 @@ add_llvm_component_library(LLVMAsmPrinter + Support + Target + ) ++ ++# https://bugs.llvm.org/show_bug.cgi?id=50611#c3 ++if (CMAKE_COMPILER_IS_GNUCXX) ++ set_source_files_properties(DwarfCompileUnit.cpp PROPERTIES COMPILE_FLAGS -fno-strict-aliasing) ++endif() diff --git a/programming/build/llvm/pspec.xml b/programming/build/llvm/pspec.xml index 6c89e3d3d9..2c48038d9d 100755 --- a/programming/build/llvm/pspec.xml +++ b/programming/build/llvm/pspec.xml @@ -11,7 +11,7 @@ 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. - https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.0/llvm-project-12.0.0.src.tar.xz + https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.1/llvm-project-12.0.1.src.tar.xz ninja zlib-devel @@ -24,26 +24,26 @@ libedit-devel cmake python3-devel - python3-sphinx - binutils - gcc - + llvm llvm-clang-devel - lld - llvm-polly --> + lld + llvm-polly - add-fno-semantic-interposition.patch - force-visibility-of-llvm-Any-to-external.patch + + llvm-link-with-Bsymbolic-functions.patch + no-strict-aliasing-DwarfCompileUnit.patch - + llvm app:console library @@ -52,6 +52,7 @@ zlib libgcc ncurses + llvm-polly /usr/bin @@ -81,6 +82,7 @@ libgcc ncurses libxml2 + llvm-polly /usr/lib/libLLVM*.so @@ -92,7 +94,7 @@ /usr/share/licenses/llvm-libs/LICENSE - + lldb Next generation, high-performance debugger @@ -103,7 +105,8 @@ libedit libxml2 ncurses - python3 + python3 + llvm-polly /usr/bin/argdumper @@ -136,13 +139,14 @@ llvm-libs libgcc + llvm-polly /usr/bin/ld.lld /usr/bin/ld64.lld /usr/bin/lld /usr/bin/lld-link - /usr/bin/wasm-ld + /usr/bin/wasm-ld /usr/lib/liblldMachO2.so* /usr/lib/liblldCOFF.* /usr/lib/liblldCommon.* @@ -190,7 +194,7 @@ /usr/share/man/man1/scan-build.1 - + compiler-rt Various runtime libraries used by Clang @@ -198,15 +202,7 @@ libgcc - /usr/lib/clang/12.0.0/bin - /usr/lib/clang/12.0.0/include/xray - /usr/lib/clang/12.0.0/include/fuzzer - /usr/lib/clang/12.0.0/include/sanitizer - /usr/lib/clang/12.0.0/share - /usr/lib/clang/12.0.0/lib/linux/*.a - /usr/lib/clang/12.0.0/lib/linux/*.a.* - /usr/lib/clang/12.0.0/lib/linux/*.o - /usr/lib/clang/12.0.0/lib/linux/*.so + /usr/lib/clang/12.0.1/lib/linux/*.so @@ -218,6 +214,7 @@ llvm-libs libxml2 libgcc + llvm-polly /usr/bin/diagtool @@ -237,18 +234,6 @@ - - llvm-clang-32bit - A C language family front-end for LLVM - The goal of the Clang project is to create a new C, C++, Objective C and Objective C++ front-end for the LLVM compiler. - - /usr/lib32/libclang* - /usr/lib32/clang/ - /usr/lib32/libfindAllSymbols.so* - /usr/lib32/cmake/clang/Clang* - - - llvm-clang-devel Development headers for llvm-clang @@ -257,12 +242,12 @@ /usr/include/clang - /usr/lib/clang/12.0.0/include + /usr/lib/clang/11.0.0/include /usr/include/clang-c /usr/include/clang-tidy - + llvm-mlir MLIR is intended to be a hybrid IR which can support multiple different requirements in a unified infrastructure @@ -270,6 +255,7 @@ llvm-libs libgcc ncurses + llvm-polly /usr/bin/mlir* @@ -279,7 +265,7 @@ /usr/lib/cmake/mlir - + llvm-polly High-level loop and data-locality optimizer and optimization infrastructure for LLVM @@ -288,12 +274,12 @@ /usr/lib/LLVMPolly.so - /usr/lib/libPolly*.a* + /usr/lib/libPolly*.so* /usr/include/polly /usr/lib/cmake/polly - + llvm - llvm-clang-32bit libgcc libxml2-32bit ncurses-32bit zlib-32bit libffi-32bit + /usr/bin/llvm-config-32 @@ -332,6 +319,13 @@ + + 2021-07-07 + 12.0.1 + Version bump. + İdris Kalp + idriskalp@gmail.com + 2021-06-03 12.0.0