llvm-vl.spec 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526
  1. %bcond_with test
  2. %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
  3. %define ver_suffix %(echo "%{version}" | cut -d . -f 1)
  4. %define _unpackaged_files_terminate_build 1
  5. # Build options:
  6. # Components skipped by default:
  7. %bcond_with doxygen
  8. # Documentation install path
  9. %global llvmdocdir() %{_docdir}/%1-%{version}
  10. %define _unpackaged_files_terminate_build 1
  11. # build order of LLVM family.
  12. # llvm
  13. # clang
  14. # lld
  15. # compiler-rt
  16. # lldb
  17. # libomp
  18. Summary: The Low Level Virtual Machine
  19. Summary(ja): LLVM - 低レベルバーチャルマシン
  20. Name: llvm
  21. Version: 15.0.2
  22. Release: 1%{?_dist_release}
  23. Group: programming
  24. Vendor: Project Vine
  25. Distribution: Vine Linux
  26. License: NCSA
  27. URL: https://llvm.org/
  28. Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/llvm-%{version}.src.tar.xz
  29. Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/cmake-%{version}.src.tar.xz
  30. # multilib fixes
  31. Source10: llvm-config.h
  32. # patches
  33. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  34. BuildRequires: binutils-devel
  35. BuildRequires: cmake
  36. BuildRequires: libedit-devel
  37. BuildRequires: libffi-devel
  38. BuildRequires: ncurses-devel
  39. BuildRequires: ninja
  40. BuildRequires: python3-devel
  41. BuildRequires: python3-rpm-macros
  42. BuildRequires: valgrind-devel
  43. BuildRequires: zlib-devel
  44. Requires: llvm%{ver_suffix}-libs = %{version}-%{release}
  45. %description
  46. LLVM is a compiler infrastructure designed for compile-time,
  47. link-time, runtime, and idle-time optimization of programs from
  48. arbitrary programming languages. The compiler infrastructure includes
  49. mirror sets of programming tools as well as libraries with equivalent
  50. functionality.
  51. %package devel
  52. Summary: Libraries and header files for LLVM
  53. Summary(ja): LLVM のライブラリおよびヘッダファイル
  54. Group: programming
  55. Requires: %{name} = %{version}-%{release}
  56. Requires: llvm%{ver_suffix}-libs = %{version}-%{release}
  57. Requires: libedit-devel
  58. %description devel
  59. This package contains library and header files needed to develop new
  60. native programs that use the LLVM infrastructure.
  61. %package doc
  62. Summary: Documentation for LLVM
  63. Summary(ja): LLVM のドキュメント
  64. Group: documentation
  65. BuildArch: noarch
  66. Requires: %{name} = %{version}-%{release}
  67. # might seem redundant, but needed to kill off the old arch-ed -doc subpackage
  68. Obsoletes: %{name}-doc < %{version}-%{release}
  69. %description doc
  70. Documentation for the LLVM compiler infrastructure.
  71. %package -n llvm%{ver_suffix}-libs
  72. Summary: LLVM shared libraries
  73. Summary(ja): LLVM 共有ライブラリ
  74. Group: system
  75. Provides: llvm-libs = %{version}-%{release}
  76. Obsoletes: llvm-libs <= 7.0.0
  77. %description -n llvm%{ver_suffix}-libs
  78. Shared libraries for the LLVM compiler infrastructure.
  79. %description -n llvm%{ver_suffix}-libs -l ja
  80. LLVM コンパイラ基盤の共有ライブラリです.
  81. %package static
  82. Summary: LLVM static libraries
  83. Summary(ja): LLVM 静的ライブラリ
  84. Group: programming
  85. Requires: llvm-devel = %{version}-%{release}
  86. %description static
  87. Static libraries for the LLVM compiler infrastructure.
  88. %description static -l ja
  89. LLVM コンパイラ基盤の静的ライブラリです.
  90. # compat32'
  91. %package -n compat32-%{name}%{ver_suffix}-libs
  92. Summary: LLVM shared libraries
  93. Summary(ja): LLVM 共有ライブラリ
  94. Group: system
  95. Provides: compat32-llvm-libs = %{version}-%{release}
  96. Requires: %{name}%{ver_suffix}-libs = %{version}-%{release}
  97. %description -n compat32-%{name}%{ver_suffix}-libs
  98. Shared libraries for the LLVM compiler infrastructure.
  99. %debug_package
  100. %prep
  101. %setup -q -n llvm-%{version}.src -a 1
  102. %autopatch -p2
  103. mv -f cmake-%{version}.src/Modules/* cmake/modules/
  104. pathfix%{python3_version}.py -i %{__python3} -pn \
  105. test/BugPoint/compile-custom.ll.py \
  106. tools/opt-viewer/*.py \
  107. utils/update_cc_test_checks.py
  108. %build
  109. %global _lto_cflags %{nil}
  110. %ifarch s390 s390x %{arm} %ix86
  111. # Decrease debuginfo verbosity to reduce memory consumption during final library linking
  112. %global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
  113. %endif
  114. %cmake \
  115. -GNinja \
  116. -DBUILD_SHARED_LIBS:BOOL=OFF \
  117. -DLLVM_PARALLEL_LINK_JOBS=1 \
  118. -DCMAKE_BUILD_TYPE=Release \
  119. -DCMAKE_SKIP_RPATH:BOOL=ON \
  120. %if 0%{?__isa_bits} == 64
  121. -DLLVM_LIBDIR_SUFFIX=64 \
  122. %else
  123. -DLLVM_LIBDIR_SUFFIX= \
  124. %endif
  125. \
  126. -DLLVM_TARGETS_TO_BUILD=all \
  127. -DLLVM_ENABLE_LIBCXX:BOOL=OFF \
  128. -DLLVM_ENABLE_ZLIB:BOOL=ON \
  129. -DLLVM_ENABLE_FFI:BOOL=ON \
  130. -DLLVM_ENABLE_RTTI:BOOL=ON \
  131. -DLLVM_USE_PERF:BOOL=ON \
  132. -DLLVM_BINUTILS_INCDIR=%{_includedir} \
  133. \
  134. -DLLVM_BUILD_RUNTIME:BOOL=ON \
  135. \
  136. -DLLVM_INCLUDE_TOOLS:BOOL=ON \
  137. -DLLVM_BUILD_TOOLS:BOOL=ON \
  138. \
  139. -DLLVM_INCLUDE_TESTS:BOOL=ON \
  140. -DLLVM_BUILD_TESTS:BOOL=ON \
  141. \
  142. -DLLVM_INCLUDE_EXAMPLES:BOOL=ON \
  143. -DLLVM_BUILD_EXAMPLES:BOOL=OFF \
  144. \
  145. -DLLVM_INCLUDE_BENCHMARKS=OFF \
  146. \
  147. -DLLVM_INCLUDE_UTILS:BOOL=ON \
  148. -DLLVM_INSTALL_UTILS:BOOL=ON \
  149. -DLLVM_UTILS_INSTALL_DIR:PATH=%{_bindir} \
  150. -DLLVM_TOOLS_INSTALL_DIR:PATH=bin \
  151. \
  152. -DLLVM_INCLUDE_DOCS:BOOL=ON \
  153. -DLLVM_ENABLE_SPHINX:BOOL=OFF \
  154. %if %{with doxygen}
  155. -DLLVM_ENABLE_DOXYGEN:BOOL=ON \
  156. %else
  157. -DLLVM_ENABLE_DOXYGEN:BOOL=OFF \
  158. %endif
  159. -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \
  160. -DLLVM_DYLIB_EXPORT_ALL:BOOL=ON \
  161. -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
  162. -DLLVM_BUILD_EXTERNAL_COMPILER_RT:BOOL=ON \
  163. -DLLVM_INSTALL_TOOLCHAIN_ONLY:BOOL=OFF \
  164. \
  165. -DLLVM_OPTIMIZED_TABLEGEN:BOOL=ON \
  166. # Build libLLVM.so first. This ensures that when libLLVM.so is linking, there
  167. # are no other compile jobs running. This will help reduce OOM errors on the
  168. # builders without having to artificially limit the number of concurrent jobs.
  169. %cmake_build --target LLVM
  170. %cmake_build
  171. %install
  172. rm -rf %{buildroot}
  173. %cmake_install
  174. pushd %{_vpath_builddir}
  175. #install -m755 ./bin/lli-child-target %{buildroot}%{_bindir}/lli-child-target
  176. # fix multi-lib
  177. mv -v %{buildroot}%{_bindir}/llvm-config{,-%{__isa_bits}}
  178. ln -sf llvm-config-%{__isa_bits} %{buildroot}%{_bindir}/llvm-config
  179. mv -v %{buildroot}%{_includedir}/llvm/Config/llvm-config{,-%{__isa_bits}}.h
  180. install -m 0644 %{SOURCE10} %{buildroot}%{_includedir}/llvm/Config/llvm-config.h
  181. # Add symlink to lto plugin in the binutils plugin directory.
  182. %{__mkdir_p} %{buildroot}%{_libdir}/bfd-plugins/
  183. ln -s ../LLVMgold.so %{buildroot}%{_libdir}/bfd-plugins/LLVMgold.so
  184. popd
  185. %if %{with test}
  186. %check
  187. ninja -C build check
  188. %endif
  189. %clean
  190. rm -rf %{buildroot}
  191. %posttrans devel
  192. # link llvm-config to the platform-specific file;
  193. # use ISA bits as priority so that 64-bit is preferred
  194. # over 32-bit if both are installed
  195. alternatives \
  196. --install \
  197. %{_bindir}/llvm-config \
  198. llvm-config \
  199. %{_bindir}/llvm-config-%{__isa_bits} \
  200. %{__isa_bits}
  201. %postun devel
  202. if [ $1 -eq 0 ]; then
  203. alternatives --remove llvm-config \
  204. %{_bindir}/llvm-config-%{__isa_bits}
  205. fi
  206. exit 0
  207. %files
  208. %defattr(-,root,root,-)
  209. %doc CREDITS.TXT README.txt
  210. %{_bindir}/*
  211. %exclude %{_bindir}/llvm-config
  212. %exclude %{_bindir}/llvm-config-%{__isa_bits}
  213. %doc %{_mandir}/man1/*
  214. %{_datadir}/opt-viewer
  215. %files -n llvm%{ver_suffix}-libs
  216. %defattr(-,root,root,-)
  217. %license LICENSE.TXT
  218. %{_libdir}/libLLVM-*.so
  219. %{_libdir}/libLTO.so.*
  220. %{_libdir}/libRemarks.so.*
  221. %files devel
  222. %defattr(-,root,root,-)
  223. %{_bindir}/llvm-config
  224. %{_bindir}/llvm-config-%{__isa_bits}
  225. %{_includedir}/%{name}
  226. %{_includedir}/%{name}-c
  227. %{_libdir}/libLLVM.so
  228. %{_libdir}/libLTO.so
  229. %{_libdir}/libRemarks.so
  230. %{_libdir}/LLVMgold.so
  231. %{_libdir}/bfd-plugins/LLVMgold.so
  232. %{_libdir}/cmake/llvm
  233. %files static
  234. %{_libdir}/*.a
  235. %files doc
  236. %defattr(-,root,root,-)
  237. %doc docs/*
  238. %if %{build_compat32}
  239. %files -n compat32-%{name}%{ver_suffix}-libs
  240. %defattr(-,root,root)
  241. %license LICENSE.TXT
  242. %{_libdir}/libLLVM-*.so
  243. %{_libdir}/libRemarks.so.*
  244. %endif
  245. %changelog
  246. * Wed Oct 05 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 15.0.2-1
  247. - new upstream release.
  248. * Wed Sep 07 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 15.0.0-1
  249. - new upstream release.
  250. * Wed Jun 15 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 14.0.5-1
  251. - new upstream release.
  252. * Thu Feb 03 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 13.0.1-1
  253. - new upstream release.
  254. * Fri Oct 22 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 13.0.0-1
  255. - new upstream release.
  256. - dropped Patch0.
  257. * Wed Aug 11 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 12.0.1-1
  258. - new upstream release.
  259. * Sat Apr 17 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 12.0.0-1
  260. - new upstream release.
  261. - separated into some packages.
  262. * Fri Oct 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 11.0.0-2
  263. - enabled to build utils.
  264. * Thu Oct 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 11.0.0-1
  265. - new upstream release.
  266. * Mon Aug 17 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.0.1-1
  267. - new upstream release.
  268. * Thu Apr 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.0.0-2
  269. - rebuilt with libffi-3.3.
  270. * Fri Mar 27 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.0.0-1
  271. - new upstream release.
  272. * Sun Dec 22 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.0.1-1
  273. - new upstream release.
  274. * Sun Sep 22 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.0.0-2
  275. - dropped all patches.
  276. - switched build-system to ninja.
  277. - switched python to python3.
  278. * Fri Sep 20 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.0.0-1
  279. - new upstream release.
  280. - added OpenMP.
  281. * Sun Dec 16 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.0.1-1
  282. - fixed %%files.
  283. * Wed Dec 05 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.0.0-1
  284. - new upstream release.
  285. - dropped Patch0, 4, 5, 100 and 200.
  286. - imported Patch3, 7, 12, 15, 100, 101, 102 and 400 from rawhide.
  287. - renamed a subpackage "llvm-libs".
  288. - added a subpackage "lld".
  289. * Tue Jan 02 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.0.1-2
  290. - added subpackages "llvm-static", "python-lldb" and "python-clang".
  291. * Mon Jan 01 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.0.1-1
  292. - new upstream release.
  293. - dropped Patch1 and 2: fixed in upstream.
  294. - imported Patch0, 3-5, 100 and 200 from rawhide.
  295. - disabled Patch1002: no longer needed?
  296. * Fri Aug 5 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.8.1-1
  297. - new upstream release.
  298. - switched to cmake.
  299. - disable ocaml binding as default.
  300. - updated Patch1000 and 1002.
  301. - disabled Patch1000 as default.
  302. - cleanup patches.
  303. * Thu Jun 30 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.2-2
  304. - rebuild with gcc-5.4.0
  305. * Sat Sep 5 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.6.2-1
  306. - new upstream release
  307. - added BR: ocaml-ctypes
  308. * Thu Jun 4 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.6.1-1
  309. - new upstream release
  310. - dropt Patch 1, 201 and 1001
  311. - updated Patch 1000
  312. * Tue Mar 24 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.5.1-1
  313. - updated to 3.5.1
  314. - added Patch1, 2, 100, 101, 200, 201 and 202 from Fedora
  315. - added clang-libs, lldb, lldb-devel and compat32-llvm-libs subpackage
  316. - obsoleted clang-doc
  317. - built with ocaml 4.02.1
  318. * Sat Nov 29 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.5.0-2
  319. - fix <BTS:2832>
  320. - fix configure option "--with-c-include-dirs"
  321. - update Patch1000: clang-3.5.0-driver-ld.gold.patch
  322. - update Patch1001: clang-3.5.0-driver-lib64.patch
  323. - update Patch1002: clang-3.5.0-driver-vine.patch
  324. * Tue Oct 28 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.5.0-1
  325. - update to 3.5.0
  326. - remove Patch11 (clang-hardfloat-hack.patch)
  327. * Sun Jul 06 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3-2
  328. - rebuild with libffi-3.0.13
  329. * Mon Oct 28 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 3.3-1
  330. - update to 3.3
  331. * Mon Dec 03 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1-2
  332. - ld.gold (patch1000,1001)
  333. - add /%{_lib} to ld search path
  334. - add support *-vine-linux gcc (patch1002)
  335. * Fri Nov 30 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1-1
  336. - update to 3.1
  337. * Tue Jan 24 2012 NAKAMURA Kenta <kenta@vinelinux.org> - 3.0-1
  338. - updated to 3.0 release
  339. * Sun Jan 15 2012 NAKAMURA Kenta <kenta@vinelinux.org> - 2.9-3
  340. - added patch 2-4 to support -O4 link-time optimization
  341. * Fri Sep 9 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.9-2
  342. - disable -fno-var-tracking-assignments on ppc
  343. (seems like gcc-4.4.5 still doesn't support this)
  344. * Thu Aug 25 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 2.9-1
  345. - new upstream release
  346. - add BR: libffi-devel
  347. - add R: libffi-devel to -devel
  348. * Sun May 23 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 2.7-1
  349. - initial build for Vine Linux
  350. * Sun May 2 2010 Michel Salim <salimma@fedoraproject.org> - 2.7-1
  351. - Update to final 2.7 release
  352. * Sun Mar 28 2010 Michel Salim <salimma@fedoraproject.org> - 2.7-0.1.pre1
  353. - Update to first 2.7 pre-release
  354. * Fri Sep 18 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.6.pre2
  355. - Update to 2.6 pre-release2
  356. - -devel subpackage now virtually provides -static
  357. * Wed Sep 9 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.5.pre1
  358. - Disable var tracking assignments on PPC
  359. * Wed Sep 9 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.4.pre1
  360. - Don't adjust clang include dir; files there are noarch (bz#521893)
  361. - Enable clang unit tests
  362. - clang and clang-analyzer renamed; no longer depend on llvm at runtime
  363. * Mon Sep 7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.3.pre1
  364. - Package Clang's static analyzer tools
  365. * Mon Sep 7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.2.pre1
  366. - PIC is now enabled by default; explicitly disable on %%{ix86}
  367. * Mon Sep 7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.1.pre1
  368. - First 2.6 prerelease
  369. - Enable Clang front-end
  370. - Enable debuginfo generation
  371. * Sat Sep 5 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-6
  372. - Disable assertions (needed by OpenGTL, bz#521261)
  373. - Align spec file with upstream build instructions
  374. - Enable unit tests
  375. * Sat Aug 22 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-5
  376. - Only disable PIC on %%ix86; ppc actually needs it
  377. * Sat Aug 22 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-4
  378. - Disable use of position-independent code on 32-bit platforms
  379. (buggy in LLVM <= 2.5)
  380. * Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-3
  381. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  382. * Wed Mar 4 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-2
  383. - Remove build scripts; they require the build directory to work
  384. * Wed Mar 4 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-1
  385. - Update to 2.5
  386. - Package build scripts (bug #457881)
  387. * Tue Dec 2 2008 Michel Salim <salimma@fedoraproject.org> - 2.4-2
  388. - Patched build process for the OCaml binding
  389. * Tue Dec 2 2008 Michel Salim <salimma@fedoraproject.org> - 2.4-1
  390. - Update to 2.4
  391. - Package Ocaml binding
  392. * Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.3-2
  393. - Add dependency on groff
  394. * Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.3-1
  395. - LLVM 2.3
  396. * Thu May 29 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2.2-4
  397. - fix license tags
  398. * Wed Mar 5 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.2-3
  399. - Fix compilation problems with gcc 4.3
  400. * Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.2-2
  401. - Autorebuild for GCC 4.3
  402. * Sun Jan 20 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.1-2
  403. - Fix review comments
  404. * Sun Jan 20 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.1-1
  405. - Initial version