lld-vl.spec 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  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: 17.0.2
  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-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 Oct 07 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 17.0.2-1
  126. - new upstream release.
  127. * Sun Oct 01 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 17.0.1-1
  128. - new upstream release.
  129. * Sun May 28 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 16.0.4-1
  130. - new upstream release.
  131. * Fri Dec 16 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 15.0.6-1
  132. - new upstream release.
  133. * Thu Oct 06 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 15.0.2-1
  134. - new upstream release.
  135. * Wed Sep 07 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 15.0.0-1
  136. - new upstream release.
  137. * Thu Jun 16 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 14.0.5-1
  138. - new upstream release.
  139. * Thu Feb 03 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 13.0.1-1
  140. - new upstream release.
  141. * Fri Oct 22 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 13.0.0-1
  142. - new upstream release.
  143. * Wed Aug 11 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 12.0.1-1
  144. - new upstream release.
  145. * Sat Apr 17 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 12.0.0-1
  146. - devided lld from llvm.
  147. - new upstream release.
  148. * Fri Oct 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 11.0.0-2
  149. - enabled to build utils.
  150. * Thu Oct 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 11.0.0-1
  151. - new upstream release.
  152. * Mon Aug 17 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.0.1-1
  153. - new upstream release.
  154. * Thu Apr 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.0.0-2
  155. - rebuilt with libffi-3.3.
  156. * Fri Mar 27 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.0.0-1
  157. - new upstream release.
  158. * Sun Dec 22 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.0.1-1
  159. - new upstream release.
  160. * Sun Sep 22 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.0.0-2
  161. - dropped all patches.
  162. - switched build-system to ninja.
  163. - switched python to python3.
  164. * Fri Sep 20 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.0.0-1
  165. - new upstream release.
  166. - added OpenMP.
  167. * Sun Dec 16 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.0.1-1
  168. - fixed %%files.
  169. * Wed Dec 05 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.0.0-1
  170. - new upstream release.
  171. - dropped Patch0, 4, 5, 100 and 200.
  172. - imported Patch3, 7, 12, 15, 100, 101, 102 and 400 from rawhide.
  173. - renamed a subpackage "llvm-libs".
  174. - added a subpackage "lld".
  175. * Tue Jan 02 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.0.1-2
  176. - added subpackages "llvm-static", "python-lldb" and "python-clang".
  177. * Mon Jan 01 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.0.1-1
  178. - new upstream release.
  179. - dropped Patch1 and 2: fixed in upstream.
  180. - imported Patch0, 3-5, 100 and 200 from rawhide.
  181. - disabled Patch1002: no longer needed?
  182. * Fri Aug 5 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.8.1-1
  183. - new upstream release.
  184. - switched to cmake.
  185. - disable ocaml binding as default.
  186. - updated Patch1000 and 1002.
  187. - disabled Patch1000 as default.
  188. - cleanup patches.
  189. * Thu Jun 30 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.2-2
  190. - rebuild with gcc-5.4.0
  191. * Sat Sep 5 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.6.2-1
  192. - new upstream release
  193. - added BR: ocaml-ctypes
  194. * Thu Jun 4 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.6.1-1
  195. - new upstream release
  196. - dropt Patch 1, 201 and 1001
  197. - updated Patch 1000
  198. * Tue Mar 24 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.5.1-1
  199. - updated to 3.5.1
  200. - added Patch1, 2, 100, 101, 200, 201 and 202 from Fedora
  201. - added clang-libs, lldb, lldb-devel and compat32-llvm-libs subpackage
  202. - obsoleted clang-doc
  203. - built with ocaml 4.02.1
  204. * Sat Nov 29 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.5.0-2
  205. - fix <BTS:2832>
  206. - fix configure option "--with-c-include-dirs"
  207. - update Patch1000: clang-3.5.0-driver-ld.gold.patch
  208. - update Patch1001: clang-3.5.0-driver-lib64.patch
  209. - update Patch1002: clang-3.5.0-driver-vine.patch
  210. * Tue Oct 28 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.5.0-1
  211. - update to 3.5.0
  212. - remove Patch11 (clang-hardfloat-hack.patch)
  213. * Sun Jul 06 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3-2
  214. - rebuild with libffi-3.0.13
  215. * Mon Oct 28 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 3.3-1
  216. - update to 3.3
  217. * Mon Dec 03 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1-2
  218. - ld.gold (patch1000,1001)
  219. - add /%{_lib} to ld search path
  220. - add support *-vine-linux gcc (patch1002)
  221. * Fri Nov 30 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1-1
  222. - update to 3.1
  223. * Tue Jan 24 2012 NAKAMURA Kenta <kenta@vinelinux.org> - 3.0-1
  224. - updated to 3.0 release
  225. * Sun Jan 15 2012 NAKAMURA Kenta <kenta@vinelinux.org> - 2.9-3
  226. - added patch 2-4 to support -O4 link-time optimization
  227. * Fri Sep 9 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.9-2
  228. - disable -fno-var-tracking-assignments on ppc
  229. (seems like gcc-4.4.5 still doesn't support this)
  230. * Thu Aug 25 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 2.9-1
  231. - new upstream release
  232. - add BR: libffi-devel
  233. - add R: libffi-devel to -devel
  234. * Sun May 23 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 2.7-1
  235. - initial build for Vine Linux
  236. * Sun May 2 2010 Michel Salim <salimma@fedoraproject.org> - 2.7-1
  237. - Update to final 2.7 release
  238. * Sun Mar 28 2010 Michel Salim <salimma@fedoraproject.org> - 2.7-0.1.pre1
  239. - Update to first 2.7 pre-release
  240. * Fri Sep 18 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.6.pre2
  241. - Update to 2.6 pre-release2
  242. - -devel subpackage now virtually provides -static
  243. * Wed Sep 9 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.5.pre1
  244. - Disable var tracking assignments on PPC
  245. * Wed Sep 9 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.4.pre1
  246. - Don't adjust clang include dir; files there are noarch (bz#521893)
  247. - Enable clang unit tests
  248. - clang and clang-analyzer renamed; no longer depend on llvm at runtime
  249. * Mon Sep 7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.3.pre1
  250. - Package Clang's static analyzer tools
  251. * Mon Sep 7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.2.pre1
  252. - PIC is now enabled by default; explicitly disable on %%{ix86}
  253. * Mon Sep 7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.1.pre1
  254. - First 2.6 prerelease
  255. - Enable Clang front-end
  256. - Enable debuginfo generation
  257. * Sat Sep 5 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-6
  258. - Disable assertions (needed by OpenGTL, bz#521261)
  259. - Align spec file with upstream build instructions
  260. - Enable unit tests
  261. * Sat Aug 22 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-5
  262. - Only disable PIC on %%ix86; ppc actually needs it
  263. * Sat Aug 22 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-4
  264. - Disable use of position-independent code on 32-bit platforms
  265. (buggy in LLVM <= 2.5)
  266. * Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-3
  267. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  268. * Wed Mar 4 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-2
  269. - Remove build scripts; they require the build directory to work
  270. * Wed Mar 4 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-1
  271. - Update to 2.5
  272. - Package build scripts (bug #457881)
  273. * Tue Dec 2 2008 Michel Salim <salimma@fedoraproject.org> - 2.4-2
  274. - Patched build process for the OCaml binding
  275. * Tue Dec 2 2008 Michel Salim <salimma@fedoraproject.org> - 2.4-1
  276. - Update to 2.4
  277. - Package Ocaml binding
  278. * Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.3-2
  279. - Add dependency on groff
  280. * Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.3-1
  281. - LLVM 2.3
  282. * Thu May 29 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2.2-4
  283. - fix license tags
  284. * Wed Mar 5 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.2-3
  285. - Fix compilation problems with gcc 4.3
  286. * Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.2-2
  287. - Autorebuild for GCC 4.3
  288. * Sun Jan 20 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.1-2
  289. - Fix review comments
  290. * Sun Jan 20 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.1-1
  291. - Initial version