From eb12e209dfbe5f628695879f9d4947e8f951f789 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sun, 6 Oct 2024 21:09:41 +0200 Subject: [PATCH] legacy package [release 18.1.8-2mamba;Fri Oct 04 2024] --- README.md | 3 + llvm-3.1-llvm-config.patch | 30 ++ llvm-3.8.0-ocamldoc-install.patch | 22 ++ llvm-6.0.0-llvm-config.patch | 9 + llvm18.spec | 455 ++++++++++++++++++++++++++++++ 5 files changed, 519 insertions(+) create mode 100644 llvm-3.1-llvm-config.patch create mode 100644 llvm-3.8.0-ocamldoc-install.patch create mode 100644 llvm-6.0.0-llvm-config.patch create mode 100644 llvm18.spec diff --git a/README.md b/README.md index 6211ddf..2d9c3fc 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ # llvm18 +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. + diff --git a/llvm-3.1-llvm-config.patch b/llvm-3.1-llvm-config.patch new file mode 100644 index 0000000..1d191de --- /dev/null +++ b/llvm-3.1-llvm-config.patch @@ -0,0 +1,30 @@ +--- llvm-3.1.src/tools/llvm-config/llvm-config.cpp.orig 2012-07-20 20:40:27.421755571 +0200 ++++ llvm-3.1.src/tools/llvm-config/llvm-config.cpp 2012-07-20 20:39:59.212062264 +0200 +@@ -230,15 +230,15 @@ + switch (DevelopmentTreeLayout) { + case MakefileStyle: + ActiveBinDir = ActiveObjRoot + "/" + LLVM_BUILDMODE + "/bin"; +- ActiveLibDir = ActiveObjRoot + "/" + LLVM_BUILDMODE + "/lib"; ++ ActiveLibDir = ActiveObjRoot + "/" + LLVM_BUILDMODE + "/lib/llvm"; + break; + case CMakeStyle: + ActiveBinDir = ActiveObjRoot + "/bin"; +- ActiveLibDir = ActiveObjRoot + "/lib"; ++ ActiveLibDir = ActiveObjRoot + "/lib/llvm"; + break; + case CMakeBuildModeStyle: + ActiveBinDir = ActiveObjRoot + "/bin/" + LLVM_BUILDMODE; +- ActiveLibDir = ActiveObjRoot + "/lib/" + LLVM_BUILDMODE; ++ ActiveLibDir = ActiveObjRoot + "/lib/llvm" + LLVM_BUILDMODE; + break; + } + +@@ -249,7 +249,7 @@ + ActivePrefix = CurrentExecPrefix; + ActiveIncludeDir = ActivePrefix + "/include"; + ActiveBinDir = ActivePrefix + "/bin"; +- ActiveLibDir = ActivePrefix + "/lib"; ++ ActiveLibDir = ActivePrefix + "/lib/llvm"; + ActiveIncludeOption = "-I" + ActiveIncludeDir; + } + diff --git a/llvm-3.8.0-ocamldoc-install.patch b/llvm-3.8.0-ocamldoc-install.patch new file mode 100644 index 0000000..579f075 --- /dev/null +++ b/llvm-3.8.0-ocamldoc-install.patch @@ -0,0 +1,22 @@ +diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt +index eaa175062b61..f862f2561bfd 100644 +--- a/docs/CMakeLists.txt ++++ b/docs/CMakeLists.txt +@@ -143,13 +143,15 @@ if( NOT uses_ocaml LESS 0 ) + list(APPEND odoc_files -load ${odoc_file}) + endforeach() + +- add_custom_target(ocaml_doc ++ add_custom_command(OUTPUT BUILD_OCAML_DOCS + COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_CURRENT_BINARY_DIR}/ocamldoc/html + COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/ocamldoc/html + COMMAND ${OCAMLFIND} ocamldoc -d ${CMAKE_CURRENT_BINARY_DIR}/ocamldoc/html + -sort -colorize-code -html ${odoc_files} + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/_ocamldoc/style.css +- ${CMAKE_CURRENT_BINARY_DIR}/ocamldoc/html) ++ ${CMAKE_CURRENT_BINARY_DIR}/ocamldoc/html ++ COMMENT "Creating documentation for OCaml bindings...") ++ add_custom_target(ocaml_doc ALL DEPENDS BUILD_OCAML_DOCS) + + add_dependencies(ocaml_doc ${doc_targets}) + diff --git a/llvm-6.0.0-llvm-config.patch b/llvm-6.0.0-llvm-config.patch new file mode 100644 index 0000000..2fa08c9 --- /dev/null +++ b/llvm-6.0.0-llvm-config.patch @@ -0,0 +1,9 @@ +#include + +#if __WORDSIZE == 32 +#include "llvm-config-32.h" +#elif __WORDSIZE == 64 +#include "llvm-config-64.h" +#else +#error "Unknown word size" +#endif diff --git a/llvm18.spec b/llvm18.spec new file mode 100644 index 0000000..f868aec --- /dev/null +++ b/llvm18.spec @@ -0,0 +1,455 @@ +%define gccver %(gcc -dumpversion) +%define majver %(echo %version | cut -d. -f1-2) +Name: llvm18 +Version: 18.1.8 +Release: 2mamba +Summary: The Low Level Virtual Machine +Group: Development/Languages +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: https://llvm.org/ +Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/llvm-%{version}.src.tar.xz +Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/cmake-%{version}.src.tar.xz +Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/third-party-%{version}.src.tar.xz +Source6: llvm-6.0.0-llvm-config.patch +Patch0: llvm-3.1-llvm-config.patch +Patch6: llvm-3.8.0-ocamldoc-install.patch +License: NCSA +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libedit-devel +BuildRequires: libffi-devel +BuildRequires: libgcc +BuildRequires: libncurses-devel +BuildRequires: libstdc++6-devel +BuildRequires: libxml2-devel +BuildRequires: libz-devel +BuildRequires: libzstd-devel +## AUTOBUILDREQ-END +BuildRequires: glibc-devel +BuildRequires: ocaml >= 4.14.1 +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-findlib +BuildRequires: ocaml-bigarray-compat-devel >= 1.1.0-2mamba +BuildRequires: ocaml-ctypes-devel >= 0.20.2 +BuildRequires: ocaml-integers >= 0.7.0-2mamba +%ifnarch aarch64 +BuildRequires: ocaml-ounit +%endif +BuildRequires: ocaml-stdlib-shims-devel +BuildRequires: z3 +BuildRequires: libz3-devel +BuildRequires: python-sphinx-py3 +Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description +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. + +%package -n lib%{name} +Group: System/Libraries +Summary: Shared libraries for %{name} + +%description -n lib%{name} +This package contains shared libraries for %{name}. + +%package -n lib%{name}-devel +Summary: Libraries and header files for LLVM +Group: Development/Languages + +%description -n lib%{name}-devel +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. +This package contains library and header files needed to develop new native programs that use the LLVM infrastructure. + +%package -n lib%{name}-apidocs +Group: Documentation +Summary: lib%{name} API documentation +Requires: lib%{name}-devel = %{?epoch:%epoch:}%{version}-%{release} +Requires: gtk-doc + +%description -n lib%{name}-apidocs +This package includes the lib%{name} API documentation. + +%debug_package + +# Don't clean build at the end +%global __spec_rmbuild_cmd /bin/true + +%prep +%setup -q -c -a0 -a1 -a2 +#% setup -q -D -T +#:<< _EOF +mv cmake-%{version}.src cmake +mv third-party-%{version}.src third-party + +mv llvm-%{version}.src llvm +cd llvm +%patch 6 -p1 +# https://bugs.llvm.org/show_bug.cgi?id=34123 +#sed -i '/LLVMSupport/d' tools/clang/tools/extra/clangd/tool/CMakeLists.txt + +sed -i "/REMOVE_DUPLICATES/d" tools/llvm-shlib/CMakeLists.txt +cd .. + +%build +#:<< __EOF +mkdir -p build +cd build + +#%ifarch x86_64 +# -DCMAKE_C_COMPILER=clang \ +# -DCMAKE_CXX_COMPILER=clang++ \ +# -DLLVM_ENABLE_LLD=ON \ +#%else +# -DCMAKE_C_COMPILER=gcc \ +# -DCMAKE_CXX_COMPILER=g++ \ +#%endif + + +cmake \ + -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DLLVM_HOST_TRIPLE="%{_target_platform}" \ + -DLLVM_DEFAULT_TARGET_TRIPLE="%{_target_platform}" \ + -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 \ + -DFFI_INCLUDE_DIR=$(pkg-config --variable=includedir libffi) \ + -DLLVM_BINUTILS_INCDIR=%{_includedir} \ + -DLLVM_ENABLE_SPHINX=ON \ + -DSPHINX_WARNINGS_AS_ERRORS=OFF \ + -DLLVM_BUILD_EXTERNAL_COMPILER_RT=OFF \ + -DLLVM_INCLUDE_BENCHMARKS=OFF \ +%ifarch x86_64 aarch64 + -DLLVM_LIBDIR_SUFFIX="64" \ +%endif + -Wno-dev ../llvm + +# -DLLVM_ENABLE_LTO=Thin \ + +ninja all + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +#% makeinstall -C build +cd build +export DESTDIR=%{buildroot} +ninja install + +%ifarch x86_64 aarch64 +# Needed for multilib (https://bugs.archlinux.org/task/29951) +# Header stub is taken from Fedora +mv %{buildroot}%{_includedir}/llvm/Config/llvm-config{,-64}.h +cp %{SOURCE6} %{buildroot}%{_includedir}/llvm/Config/llvm-config.h +%endif + +rm -f %{buildroot}%{_datadir}/doc/clang/html/.buildinfo +rm -f %{buildroot}%{_datadir}/doc/llvm/html/.buildinfo +rm -rf %{buildroot}%{_docdir}/LLVM +rm -rf %{buildroot}%{_libdir}/ocaml + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%{_bindir}/bugpoint +%{_bindir}/count +%{_bindir}/dsymutil +%{_bindir}/FileCheck +%{_bindir}/llc +%{_bindir}/lli +%{_bindir}/lli-child-target +%{_bindir}/llvm* +%{_bindir}/not +%{_bindir}/obj2yaml +%{_bindir}/sancov +%{_bindir}/sanstats +%{_bindir}/split-file +%{_bindir}/UnicodeNameMappingGenerator +%{_bindir}/verify-uselistorder +%{_bindir}/yaml2obj +%{_bindir}/yaml-bench +%{_bindir}/opt +%dir %{_datadir}/opt-viewer +%{_datadir}/opt-viewer/* +%doc llvm/CREDITS.TXT llvm/LICENSE.TXT + +%files -n lib%{name} +%defattr(-,root,root) +%{_libdir}/libLLVM-*.so +%{_libdir}/libLLVM.so.* +%{_libdir}/libLTO.so.* +%{_libdir}/libRemarks.so.* + +%files -n lib%{name}-devel +%defattr(-,root,root) +%{_includedir}/llvm +%{_includedir}/llvm-c +%{_libdir}/*.a +%{_libdir}/libLLVM.so +%{_libdir}/libLTO.so +%{_libdir}/libRemarks.so +%{_libdir}/LLVM*.so +%dir %{_libdir}/cmake/llvm +%{_libdir}/cmake/llvm/*.cmake +%{_libdir}/cmake/llvm/llvm-driver-template.cpp.in +#%doc README.txt + +%changelog +* Fri Oct 04 2024 Silvan Calarco 18.1.8-2mamba +- legacy package + +* Sat Jun 22 2024 Automatic Build System 18.1.8-1mamba +- automatic version update by autodist + +* Fri Jun 07 2024 Automatic Build System 18.1.7-1mamba +- automatic version update by autodist + +* Sun May 19 2024 Automatic Build System 18.1.6-1mamba +- automatic version update by autodist + +* Sat May 04 2024 Automatic Build System 18.1.5-1mamba +- automatic version update by autodist + +* Thu Apr 18 2024 Automatic Build System 18.1.4-1mamba +- automatic version update by autodist + +* Sat Apr 06 2024 Automatic Build System 18.1.3-1mamba +- automatic version update by autodist + +* Wed Mar 20 2024 Automatic Build System 18.1.2-1mamba +- automatic version update by autodist + +* Sat Mar 09 2024 Automatic Build System 18.1.1-1mamba +- automatic version update by autodist + +* Wed Mar 06 2024 Automatic Build System 18.1.0-1mamba +- automatic version update by autodist + +* Wed Nov 29 2023 Automatic Build System 17.0.6-1mamba +- automatic version update by autodist + +* Wed Nov 15 2023 Automatic Build System 17.0.5-1mamba +- automatic version update by autodist + +* Tue Oct 31 2023 Automatic Build System 17.0.4-1mamba +- automatic version update by autodist + +* Tue Oct 17 2023 Automatic Build System 17.0.3-1mamba +- automatic version update by autodist + +* Tue Oct 03 2023 Automatic Build System 17.0.2-1mamba +- automatic version update by autodist + +* Tue Sep 19 2023 Automatic Build System 17.0.1-1mamba +- automatic version update by autodist + +* Thu Jul 06 2023 Silvan Calarco 16.0.6-2mamba +- rebuilt with ocaml 4.14.1 + +* Wed Jun 14 2023 Automatic Build System 16.0.6-1mamba +- automatic version update by autodist + +* Sat Jun 03 2023 Automatic Build System 16.0.5-1mamba +- automatic version update by autodist + +* Thu May 18 2023 Automatic Build System 16.0.4-1mamba +- automatic version update by autodist + +* Fri May 05 2023 Automatic Build System 16.0.3-1mamba +- automatic version update by autodist + +* Thu Jan 12 2023 Automatic Build System 15.0.7-1mamba +- automatic version update by autodist + +* Tue Nov 29 2022 Automatic Build System 15.0.6-1mamba +- automatic version update by autodist + +* Thu Nov 17 2022 Automatic Build System 15.0.5-1mamba +- automatic version update by autodist + +* Thu Nov 03 2022 Automatic Build System 15.0.4-1mamba +- automatic version update by autodist + +* Wed Oct 19 2022 Automatic Build System 15.0.3-1mamba +- automatic version update by autodist + +* Sat Oct 15 2022 Automatic Build System 15.0.2-1mamba +- automatic version update by autodist + +* Sat Jun 25 2022 Automatic Build System 14.0.6-1mamba +- automatic version update by autodist + +* Sat Jun 11 2022 Automatic Build System 14.0.5-1mamba +- automatic version update by autodist + +* Thu May 26 2022 Automatic Build System 14.0.4-1mamba +- automatic version update by autodist + +* Fri May 20 2022 Silvan Calarco 14.0.3-3mamba +- re-add LLVM_ENABLE_RTTI=ON + +* Wed May 18 2022 Silvan Calarco 14.0.3-2mamba +- rebuilt with ocaml-ctypes 0.20.1 + +* Fri Apr 29 2022 Automatic Build System 14.0.3-1mamba +- automatic version update by autodist + +* Thu Apr 28 2022 Automatic Build System 14.0.2-1mamba +- automatic version update by autodist + +* Wed Feb 09 2022 Silvan Calarco 13.0.1-2mamba +- rebuilt with ocaml-ctypes 0.20.0-2mamba and ocaml-integers 0.6.0 + +* Thu Feb 03 2022 Automatic Build System 13.0.1-1mamba +- automatic version update by autodist + +* Fri Oct 15 2021 Automatic Build System 13.0.0-1mamba +- automatic version update by autodist + +* Fri May 21 2021 Silvan Calarco 12.0.0-1mamba +- update to 12.0.0 + +* Fri Feb 26 2021 Automatic Build System 11.1.0-1mamba +- automatic version update by autodist + +* Thu Jan 21 2021 Silvan Calarco 11.0.1-2mamba +- rebuilt with ocaml 4.11.1 + +* Mon Jan 11 2021 Automatic Build System 11.0.1-1mamba +- automatic version update by autodist + +* Mon Oct 12 2020 Automatic Build System 11.0.0-1mamba +- automatic version update by autodist + +* Mon Jul 27 2020 Silvan Calarco 10.0.1-2mamba +- added debug package + +* Sat Jul 25 2020 Automatic Build System 10.0.1-1mamba +- automatic version update by autodist + +* Mon Mar 30 2020 Automatic Build System 10.0.0-1mamba +- automatic version update by autodist + +* Sat Feb 08 2020 Silvan Calarco 9.0.1-4mamba +- rework build flags + +* Sat Feb 08 2020 Silvan Calarco 9.0.1-3mamba +- split build of llvm clang etc. in separate sources + +* Tue Jan 07 2020 Silvan Calarco 9.0.1-2mamba +- rebuild with -DLLVM_ENABLE_LTO=Thin + +* Mon Dec 30 2019 Silvan Calarco 9.0.1-1mamba +- update to 9.0.1 + +* Thu Mar 28 2019 Automatic Build System 8.0.0-1mamba +- automatic version update by autodist + +* Sat Jan 26 2019 Silvan Calarco 7.0.1-4mamba +- bump release + +* Sat Jan 26 2019 Silvan Calarco 7.0.1-3mamba +- move *.so from libllvm-devel to libllvm + +* Mon Jan 21 2019 Silvan Calarco 7.0.1-2mamba +- rebuilt with binutils plugin LLVMgold.so + +* Sat Dec 22 2018 Automatic Build System 7.0.1-1mamba +- automatic version update by autodist + +* Sun Oct 14 2018 Automatic Build System 7.0.0-1mamba +- automatic version update by autodist + +* Sun Sep 02 2018 Silvan Calarco 6.0.1-4mamba +- remove building with libc++ to fix e.g. Mesa build + +* Sat Jul 14 2018 Silvan Calarco 6.0.1-3mamba +- rebuilt wth LLVM_ENABLE_LIBCXX=ON + +* Sat Jul 14 2018 Silvan Calarco 6.0.1-2mamba +- rebuilt with libc++ + +* Sat Jul 07 2018 Automatic Build System 6.0.1-1mamba +- automatic version update by autodist + +* Mon Jun 25 2018 Silvan Calarco 6.0.0-4mamba +- rebuilt with gcc 8.1.0 + +* Sun Jun 24 2018 Silvan Calarco 6.0.0-3mamba +- apply patches from Arch to possibly fix lld segfault + +* Sat Jun 23 2018 Silvan Calarco 6.0.0-2mamba +- rebuilt with standard target libdir and other changes to try fixing lld crash with at least chromium build + +* Tue Jun 19 2018 Automatic Build System 6.0.0-1mamba +- automatic version update by autodist + +* Mon Dec 25 2017 Automatic Build System 5.0.1-1mamba +- automatic version update by autodist + +* Tue Nov 28 2017 Silvan Calarco 5.0.0-2mamba +- fix link against libllvm by changing and extending build arguments and external llvm subpackages + +* Tue Nov 28 2017 Silvan Calarco 5.0.0-1mamba +- update to 5.0.0 + +* Wed Jul 13 2016 Automatic Build System 3.8.1-1mamba +- automatic version update by autodist + +* Sat Jun 11 2016 Silvan Calarco 3.8.0-3mamba +- rebuilt using cmake + +* Sat May 28 2016 Silvan Calarco 3.8.0-2mamba +- rebuilt + +* Thu May 26 2016 Automatic Build System 3.8.0-1mamba +- automatic version update by autodist + +* Sun Jan 18 2015 Automatic Build System 3.5.1-1mamba +- automatic version update by autodist + +* Fri Sep 19 2014 Silvan Calarco 3.5.0-2mamba +- patch llvm-config for x86_64 support and %{_libdir}/llvm + +* Wed Sep 10 2014 Silvan Calarco 3.5.0-1mamba +- update to 3.5.0 + +* Thu Jul 10 2014 Silvan Calarco 3.4.2-1mamba +- update to 3.4.2 + +* Sun Feb 16 2014 Silvan Calarco 3.4-2mamba +- fix configure settings and add --with-extra-ld-options to correctly link and + pass --with-arch=%{_target_cpu} to fix penmamba bug #000163 + +* Sun Jan 12 2014 Silvan Calarco 3.4-1mamba +- update to 3.4 + +* Thu Jun 20 2013 Automatic Build System 3.3-1mamba +- update to 3.3 + +* Sat Dec 22 2012 Automatic Build System 3.2-1mamba +- automatic version update by autodist + +* Fri Jul 20 2012 Silvan Calarco 3.1-1mamba +- update to 3.1 + +* Thu Feb 23 2012 Ercole 'ercolinux' Carpanetto 3.0.-1mamba +- update to 3.0 + +* Sun Jul 10 2011 Silvan Calarco 2.9-1mamba +- update to 2.9 + +* Sat Jan 01 2011 Davide Madrisan 2.8-1mamba +- package created by autospec