lld-vl.spec 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410
  1. %bcond_without lld_libs
  2. %bcond_with test
  3. %ifarch %ix86
  4. %bcond_with lto_build
  5. %else
  6. %bcond_without lto_build
  7. %endif
  8. %if %{without lto_build}
  9. %global _lto_cflags %{nil}
  10. %endif
  11. %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
  12. %define ver_suffix %(echo "%{version}" | cut -d . -f 1)
  13. %define _unpackaged_files_terminate_build 1
  14. Summary: The LLVM Linker
  15. Summary(ja): LLVMリンカー
  16. Name: lld
  17. Version: 20.1.4
  18. Release: 1%{?_dist_release}
  19. Group: programming
  20. Vendor: Project Vine
  21. Distribution: Vine Linux
  22. License: NCSA
  23. URL: https://llvm.org/
  24. Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/lld-%{version}.src.tar.xz
  25. Source100: https://raw.githubusercontent.com/llvm/llvm-project/refs/heads/main/libunwind/include/mach-o/compact_unwind_encoding.h#/compact_unwind_encoding.h-%{version}
  26. # patches
  27. Patch1: 0001-19-Always-build-shared-libs-for-LLD.patch
  28. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  29. BuildRequires: cmake
  30. BuildRequires: ninja
  31. BuildRequires: llvm-devel
  32. BuildRequires: llvm-static
  33. BuildRequires: ncurses-devel
  34. BuildRequires: pkgconfig(zlib)
  35. BuildRequires: libzstd-devel
  36. Requires: lld-libs = %{version}-%{release}
  37. Requires(post): alternatives
  38. Requires(preun): alternatives
  39. %description
  40. The LLVM project linker.
  41. %if %{with lld_libs}
  42. %package -n lld-libs
  43. Summary: LLD shared libraries
  44. Summary(ja): LLD 共有ライブラリ
  45. License: NCSA
  46. Group: programming
  47. %description -n lld-libs
  48. Shared libraries for LLD.
  49. %package -n lld-devel
  50. Summary: Libraries and header files for LLD
  51. Summary(ja): LLD 用ライブラリとヘッダファイル
  52. License: NCSA
  53. Group: programming
  54. Requires: lld-libs = %{version}-%{release}
  55. %description -n lld-devel
  56. This package contains library and header files needed to develop new native
  57. programs that use the LLD infrastructure.
  58. %endif
  59. %debug_package
  60. %prep
  61. %autosetup -p2 -n lld-%{version}.src
  62. install -Dpm644 %{SOURCE100} ./include/mach-o/compact_unwind_encoding.h
  63. %build
  64. %cmake \
  65. -GNinja \
  66. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  67. -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
  68. %if %{with lld_libs}
  69. -DLLVM_DYLIB_COMPONENTS="all" \
  70. -DLLVM_COMMON_CMAKE_UTILS=%{_datadir}/llvm/cmake \
  71. %endif
  72. -DCMAKE_SKIP_RPATH:BOOL=ON \
  73. -DPYTHON_EXECUTABLE:STRING=%{__python3} \
  74. -DLLVM_CMAKE_DIR=%{_libdir}/cmake/llvm \
  75. -DLLVM_INCLUDE_TESTS:BOOL=OFF \
  76. -DLLVM_LIT_ARGS="-sv \
  77. --path %{_libdir}/llvm" \
  78. %if 0%{?__isa_bits} == 64
  79. -DLLVM_LIBDIR_SUFFIX=64 \
  80. %else
  81. -DLLVM_LIBDIR_SUFFIX= \
  82. %endif
  83. -DLLVM_MAIN_SRC_DIR=%{_datadir}/llvm/src \
  84. %{nil}
  85. %cmake_build
  86. %if %{with test}
  87. # Build the unittests so we can install them.
  88. %cmake_build --target lld-test-depends
  89. %endif
  90. %install
  91. rm -rf %{buildroot}
  92. %cmake_install
  93. # This is generated by Patch1 during build and (probably) must be removed afterward
  94. rm %{buildroot}%{_includedir}/mach-o/compact_unwind_encoding.h
  95. # Required when using update-alternatives:
  96. # https://docs.fedoraproject.org/en-US/packaging-guidelines/Alternatives/
  97. touch %{buildroot}%{_bindir}/ld
  98. %if !%{with lld_libs}
  99. rm -rf %{buildroot}%{_includedir}/lld
  100. %endif
  101. %if %{with test}
  102. %check
  103. %cmake_build --target check-lld
  104. %endif
  105. %post
  106. /sbin/alternatives --install /usr/bin/ld ld \
  107. /usr/bin/ld.lld 20
  108. %postun
  109. if [ $1 = 0 ]; then
  110. /sbin/alternatives --remove ld /usr/bin/ld.lld
  111. fi
  112. %files
  113. %{_bindir}/lld*
  114. %{_bindir}/ld.lld
  115. %{_bindir}/ld64.lld
  116. %{_bindir}/wasm-ld
  117. %ghost %{_bindir}/ld
  118. %if %{with lld_libs}
  119. %files libs
  120. %{_libdir}/liblld*.so.*
  121. %files devel
  122. %{_includedir}/lld
  123. %{_libdir}/liblld*.so
  124. %{_libdir}/cmake/lld/
  125. %endif
  126. %changelog
  127. * Wed May 7 2025 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 20.1.4-1
  128. - new upstream release.
  129. * Sun Apr 6 2025 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 20.1.2-1
  130. - new upstream release.
  131. * Fri Nov 15 2024 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 19.1.3-1
  132. - new upstream release.
  133. * Sat May 04 2024 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 18.1.5-1
  134. - new upstream release.
  135. * Sat Oct 07 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 17.0.2-1
  136. - new upstream release.
  137. * Sun Oct 01 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 17.0.1-1
  138. - new upstream release.
  139. * Sun May 28 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 16.0.4-1
  140. - new upstream release.
  141. * Fri Dec 16 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 15.0.6-1
  142. - new upstream release.
  143. * Thu Oct 06 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 15.0.2-1
  144. - new upstream release.
  145. * Wed Sep 07 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 15.0.0-1
  146. - new upstream release.
  147. * Thu Jun 16 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 14.0.5-1
  148. - new upstream release.
  149. * Thu Feb 03 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 13.0.1-1
  150. - new upstream release.
  151. * Fri Oct 22 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 13.0.0-1
  152. - new upstream release.
  153. * Wed Aug 11 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 12.0.1-1
  154. - new upstream release.
  155. * Sat Apr 17 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 12.0.0-1
  156. - devided lld from llvm.
  157. - new upstream release.
  158. * Fri Oct 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 11.0.0-2
  159. - enabled to build utils.
  160. * Thu Oct 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 11.0.0-1
  161. - new upstream release.
  162. * Mon Aug 17 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.0.1-1
  163. - new upstream release.
  164. * Thu Apr 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.0.0-2
  165. - rebuilt with libffi-3.3.
  166. * Fri Mar 27 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.0.0-1
  167. - new upstream release.
  168. * Sun Dec 22 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.0.1-1
  169. - new upstream release.
  170. * Sun Sep 22 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.0.0-2
  171. - dropped all patches.
  172. - switched build-system to ninja.
  173. - switched python to python3.
  174. * Fri Sep 20 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.0.0-1
  175. - new upstream release.
  176. - added OpenMP.
  177. * Sun Dec 16 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.0.1-1
  178. - fixed %%files.
  179. * Wed Dec 05 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.0.0-1
  180. - new upstream release.
  181. - dropped Patch0, 4, 5, 100 and 200.
  182. - imported Patch3, 7, 12, 15, 100, 101, 102 and 400 from rawhide.
  183. - renamed a subpackage "llvm-libs".
  184. - added a subpackage "lld".
  185. * Tue Jan 02 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.0.1-2
  186. - added subpackages "llvm-static", "python-lldb" and "python-clang".
  187. * Mon Jan 01 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.0.1-1
  188. - new upstream release.
  189. - dropped Patch1 and 2: fixed in upstream.
  190. - imported Patch0, 3-5, 100 and 200 from rawhide.
  191. - disabled Patch1002: no longer needed?
  192. * Fri Aug 5 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.8.1-1
  193. - new upstream release.
  194. - switched to cmake.
  195. - disable ocaml binding as default.
  196. - updated Patch1000 and 1002.
  197. - disabled Patch1000 as default.
  198. - cleanup patches.
  199. * Thu Jun 30 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.2-2
  200. - rebuild with gcc-5.4.0
  201. * Sat Sep 5 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.6.2-1
  202. - new upstream release
  203. - added BR: ocaml-ctypes
  204. * Thu Jun 4 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.6.1-1
  205. - new upstream release
  206. - dropt Patch 1, 201 and 1001
  207. - updated Patch 1000
  208. * Tue Mar 24 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.5.1-1
  209. - updated to 3.5.1
  210. - added Patch1, 2, 100, 101, 200, 201 and 202 from Fedora
  211. - added clang-libs, lldb, lldb-devel and compat32-llvm-libs subpackage
  212. - obsoleted clang-doc
  213. - built with ocaml 4.02.1
  214. * Sat Nov 29 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.5.0-2
  215. - fix <BTS:2832>
  216. - fix configure option "--with-c-include-dirs"
  217. - update Patch1000: clang-3.5.0-driver-ld.gold.patch
  218. - update Patch1001: clang-3.5.0-driver-lib64.patch
  219. - update Patch1002: clang-3.5.0-driver-vine.patch
  220. * Tue Oct 28 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.5.0-1
  221. - update to 3.5.0
  222. - remove Patch11 (clang-hardfloat-hack.patch)
  223. * Sun Jul 06 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3-2
  224. - rebuild with libffi-3.0.13
  225. * Mon Oct 28 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 3.3-1
  226. - update to 3.3
  227. * Mon Dec 03 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1-2
  228. - ld.gold (patch1000,1001)
  229. - add /%{_lib} to ld search path
  230. - add support *-vine-linux gcc (patch1002)
  231. * Fri Nov 30 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1-1
  232. - update to 3.1
  233. * Tue Jan 24 2012 NAKAMURA Kenta <kenta@vinelinux.org> - 3.0-1
  234. - updated to 3.0 release
  235. * Sun Jan 15 2012 NAKAMURA Kenta <kenta@vinelinux.org> - 2.9-3
  236. - added patch 2-4 to support -O4 link-time optimization
  237. * Fri Sep 9 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.9-2
  238. - disable -fno-var-tracking-assignments on ppc
  239. (seems like gcc-4.4.5 still doesn't support this)
  240. * Thu Aug 25 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 2.9-1
  241. - new upstream release
  242. - add BR: libffi-devel
  243. - add R: libffi-devel to -devel
  244. * Sun May 23 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 2.7-1
  245. - initial build for Vine Linux
  246. * Sun May 2 2010 Michel Salim <salimma@fedoraproject.org> - 2.7-1
  247. - Update to final 2.7 release
  248. * Sun Mar 28 2010 Michel Salim <salimma@fedoraproject.org> - 2.7-0.1.pre1
  249. - Update to first 2.7 pre-release
  250. * Fri Sep 18 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.6.pre2
  251. - Update to 2.6 pre-release2
  252. - -devel subpackage now virtually provides -static
  253. * Wed Sep 9 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.5.pre1
  254. - Disable var tracking assignments on PPC
  255. * Wed Sep 9 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.4.pre1
  256. - Don't adjust clang include dir; files there are noarch (bz#521893)
  257. - Enable clang unit tests
  258. - clang and clang-analyzer renamed; no longer depend on llvm at runtime
  259. * Mon Sep 7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.3.pre1
  260. - Package Clang's static analyzer tools
  261. * Mon Sep 7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.2.pre1
  262. - PIC is now enabled by default; explicitly disable on %%{ix86}
  263. * Mon Sep 7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.1.pre1
  264. - First 2.6 prerelease
  265. - Enable Clang front-end
  266. - Enable debuginfo generation
  267. * Sat Sep 5 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-6
  268. - Disable assertions (needed by OpenGTL, bz#521261)
  269. - Align spec file with upstream build instructions
  270. - Enable unit tests
  271. * Sat Aug 22 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-5
  272. - Only disable PIC on %%ix86; ppc actually needs it
  273. * Sat Aug 22 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-4
  274. - Disable use of position-independent code on 32-bit platforms
  275. (buggy in LLVM <= 2.5)
  276. * Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-3
  277. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  278. * Wed Mar 4 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-2
  279. - Remove build scripts; they require the build directory to work
  280. * Wed Mar 4 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-1
  281. - Update to 2.5
  282. - Package build scripts (bug #457881)
  283. * Tue Dec 2 2008 Michel Salim <salimma@fedoraproject.org> - 2.4-2
  284. - Patched build process for the OCaml binding
  285. * Tue Dec 2 2008 Michel Salim <salimma@fedoraproject.org> - 2.4-1
  286. - Update to 2.4
  287. - Package Ocaml binding
  288. * Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.3-2
  289. - Add dependency on groff
  290. * Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.3-1
  291. - LLVM 2.3
  292. * Thu May 29 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2.2-4
  293. - fix license tags
  294. * Wed Mar 5 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.2-3
  295. - Fix compilation problems with gcc 4.3
  296. * Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.2-2
  297. - Autorebuild for GCC 4.3
  298. * Sun Jan 20 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.1-2
  299. - Fix review comments
  300. * Sun Jan 20 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.1-1
  301. - Initial version