lld-vl.spec 11 KB

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