meta.yaml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529
  1. {% set build_num = gcc_version_build_number %}
  2. # You can use this to allow investigating errors in more recent glibcs than
  3. # you have RPMs to make the sysroot packages from.
  4. {% set hack_sysroot_ver = False %}
  5. # {% set hack_sysroot_ver = '2.17' %}
  6. {% set build_string = 'h' + PKG_HASH + '_' + PKG_BUILDNUM %}
  7. package:
  8. name: gcc-compiler
  9. version: {{ gcc_version }}
  10. source:
  11. path: .
  12. build:
  13. merge_build_host: False
  14. # defined in conda_build_config.yaml so that we can keep it associated
  15. # with a particular GCC version number
  16. number: {{ build_num | default(0) }}
  17. # trigger: 0
  18. string: {{ build_string }}
  19. skip: True # [not linux]
  20. # The CentOS7 system libraries should be used for everything here.
  21. # We do not have CDT packages yet, nor compilers that would use them!
  22. missing_dso_whitelist:
  23. - "*"
  24. requirements:
  25. build:
  26. # due a conda-build issue compiler-activation can't be used as
  27. # it leads to direct conflicts ...
  28. - {{ compiler('c') }} # [hidden_dep]
  29. - {{ compiler('cxx') }} # [hidden_dep]
  30. # instead we install this dependency during build
  31. - llvm-tools # [osx]
  32. - make
  33. - bash # [not (ppc64le or s390x or aarch64)]
  34. - autoconf
  35. - automake
  36. - libtool
  37. - bison
  38. - flex
  39. - sed
  40. - patch
  41. - gawk
  42. - m4
  43. - help2man
  44. - texinfo
  45. - git
  46. # Need something here so that build does not get installed to a long prefix
  47. # as that breaks on some systems.
  48. host:
  49. - bison
  50. outputs:
  51. - name: libgcc-devel_{{ target_platform }}
  52. script: install_scripts/install-libgcc-devel.sh
  53. build:
  54. number: {{ build_num }}
  55. string: {{ build_string }}
  56. detect_binary_files_with_prefix: False
  57. binary_relocation: False
  58. missing_dso_whitelist:
  59. - "*"
  60. requirements:
  61. host:
  62. - sysroot_{{ target_platform }}
  63. test:
  64. commands:
  65. - test -f ${PREFIX}/lib/gcc/{{ cpu_arch }}-conda-linux-gnu/{{ gcc_version }}/crtbegin.o
  66. about:
  67. summary: The GNU C development libraries and object files
  68. home: https://gcc.gnu.org/
  69. license: GPL-3.0-only WITH GCC-exception-3.1
  70. - name: libstdcxx-devel_{{ target_platform }}
  71. script: install_scripts/install-libstdc++-devel.sh
  72. build:
  73. number: {{ build_num }}
  74. string: {{ build_string }}
  75. detect_binary_files_with_prefix: False
  76. binary_relocation: False
  77. missing_dso_whitelist:
  78. - "*"
  79. test:
  80. commands:
  81. - test -f ${PREFIX}/{{ cpu_arch }}-conda-linux-gnu/lib64/libstdc++.a
  82. about:
  83. summary: The GNU C++ headers and development libraries
  84. home: https://gcc.gnu.org/
  85. license: GPL-3.0-only WITH GCC-exception-3.1
  86. - name: gcc_impl_{{ target_platform }}
  87. script: install_scripts/install-gcc.sh
  88. build:
  89. number: {{ build_num }}
  90. string: {{ build_string }}
  91. detect_binary_files_with_prefix: False
  92. binary_relocation:
  93. - 'bin/*'
  94. - 'lib/*.so*'
  95. - 'libexec/**/*.so*'
  96. - 'libexec/**/cc1*'
  97. - 'libexec/**/collect2'
  98. - 'libexec/**/gcc'
  99. - 'libexec/**/lto*'
  100. - 'libexec/**/plugin/gengtype'
  101. missing_dso_whitelist:
  102. - '*'
  103. runpath_whitelist:
  104. - "x86_64-conda-linux-gnu/sysroot/lib/libpthread-2.12.2.so"
  105. - "aarch64-conda-linux-gnu/sysroot/lib64/libpthread-2.26.so"
  106. ignore_run_exports:
  107. - __glibc
  108. - libgomp
  109. - sysroot_{{ target_platform }}
  110. requirements:
  111. host:
  112. - {{ pin_subpackage("libgomp", exact=True) }}
  113. - {{ pin_subpackage("libstdcxx-ng", exact=True) }}
  114. - {{ pin_subpackage("libgcc-ng", exact=True) }}
  115. - {{ pin_subpackage("libgfortran" ~ libgfortran_soname) }}
  116. - sysroot_{{ target_platform }} {{ conda_glibc_ver }}
  117. run:
  118. - binutils_impl_{{ target_platform }} >=2.38
  119. - {{ pin_subpackage("libgcc-devel_" ~ target_platform, exact=True) }}
  120. # libstdcxx-ng is a runtime dep of gcc because LTO requires it.
  121. - {{ pin_subpackage("libstdcxx-ng", max_pin=None) }}
  122. - {{ pin_subpackage("libgcc-ng", max_pin=None) }}
  123. - {{ pin_subpackage("libgomp", max_pin=None) }}
  124. - sysroot_{{ target_platform }}
  125. - libstdcxx-ng >=4.9
  126. - libgcc-ng >=4.9
  127. run_exports:
  128. # impose this requirement across the build/host boundary
  129. strong:
  130. - libgcc-ng >={{ gcc_version }}
  131. test:
  132. requires:
  133. {% if hack_sysroot_ver %}
  134. - sysroot_{{ target_platform }} {{ hack_sysroot_ver }}.*
  135. {% else %}
  136. - sysroot_{{ target_platform }} {{ conda_glibc_ver }}.*
  137. {% endif %}
  138. files:
  139. - tests
  140. commands:
  141. - echo {{ target_platform }}
  142. - echo {{ conda_glibc_ver }}
  143. - echo conda
  144. - echo {{ kernel_version }}
  145. - test -f ${PREFIX}/{{ cpu_arch }}-conda-linux-gnu/sysroot/lib/libgomp.so
  146. - test `readlink ${PREFIX}/{{ cpu_arch }}-conda-linux-gnu/sysroot/lib/libgomp.so` == "../../../lib/libgomp.so"
  147. - test `readlink ${PREFIX}/lib/libgomp.so` == "libgomp.so.1.0.0"
  148. - test -f ${PREFIX}/bin/{{ cpu_arch }}-conda_cos7-linux-gnu-gcc
  149. - CC=$(${PREFIX}/bin/*-gcc -dumpmachine)-gcc
  150. - ${CC} -Wall tests/aligned_alloc.c -c -o c_aligned.o -v
  151. - ${CC} -Wall c_aligned.o -o c_aligned -v && ./c_aligned
  152. about:
  153. summary: GNU C Compiler
  154. home: https://gcc.gnu.org/
  155. license: GPL-3.0-only WITH GCC-exception-3.1
  156. - name: gxx_impl_{{ target_platform }}
  157. script: install_scripts/install-g++.sh
  158. build:
  159. number: {{ build_num }}
  160. string: {{ build_string }}
  161. detect_binary_files_with_prefix: False
  162. binary_relocation:
  163. - 'bin/*'
  164. - 'lib/*.so'
  165. - 'libexec/**/*.so*'
  166. - 'libexec/**/cc1*'
  167. missing_dso_whitelist:
  168. - "*"
  169. ignore_run_exports:
  170. - __glibc
  171. - sysroot_{{ target_platform }}
  172. requirements:
  173. host:
  174. # For cpp and crt{i,n}.o
  175. - {{ pin_subpackage("gcc_impl_" ~ target_platform, exact=True) }}
  176. run:
  177. # For cpp and crt{i,n}.o
  178. - {{ pin_subpackage("gcc_impl_" ~ target_platform, exact=True) }}
  179. # not needed due to pinning above but marks this build as using the new sysroots
  180. - sysroot_{{ target_platform }}
  181. - {{ pin_subpackage("libstdcxx-devel_" ~ target_platform, exact=True) }}
  182. run_exports:
  183. # impose this requirement across the build/host boundary
  184. strong:
  185. - libstdcxx-ng >={{ gcc_version }}
  186. test:
  187. requires:
  188. {% if hack_sysroot_ver %}
  189. - sysroot_{{ target_platform }} {{ hack_sysroot_ver }}.*
  190. {% else %}
  191. - sysroot_{{ target_platform }} {{ conda_glibc_ver }}.*
  192. {% endif %}
  193. files:
  194. - tests
  195. commands:
  196. - test -f ${PREFIX}/bin/{{ cpu_arch }}-conda_cos7-linux-gnu-g++
  197. - test -f ${PREFIX}/bin/{{ cpu_arch }}-conda-linux-gnu-g++
  198. - CXX=$(${PREFIX}/bin/*-gcc -dumpmachine)-g++
  199. - ${CXX} -Wall tests/aligned_alloc.cpp -c -o cpp_aligned.o --std=c++17
  200. - ${CXX} -Wall cpp_aligned.o -o cpp_aligned --std=c++17 && ./cpp_aligned
  201. about:
  202. summary: GNU C++ Compiler
  203. home: https://gcc.gnu.org/
  204. license: GPL-3.0-only WITH GCC-exception-3.1
  205. - name: gfortran_impl_{{ target_platform }}
  206. script: install_scripts/install-gfortran.sh
  207. build:
  208. number: {{ build_num }}
  209. string: {{ build_string }}
  210. detect_binary_files_with_prefix: False
  211. binary_relocation:
  212. - 'bin/*'
  213. - 'lib/*.so'
  214. - 'libexec/**/*.so*'
  215. - 'libexec/**/f951'
  216. missing_dso_whitelist:
  217. - "*"
  218. ignore_run_exports:
  219. - __glibc
  220. - sysroot_{{ target_platform }}
  221. requirements:
  222. build:
  223. # For cpp and crt{i,n}.o
  224. - {{ pin_subpackage("gcc_impl_" ~ target_platform, exact=True) }}
  225. host:
  226. - {{ pin_subpackage("gcc_impl_" ~ target_platform, exact=True) }}
  227. # not needed due to pinning above but marks this build as using the new sysroots
  228. - sysroot_{{ target_platform }}
  229. run:
  230. # For cpp and crt{i,n}.o
  231. - gcc_impl_{{ target_platform }} >={{ gcc_version }}
  232. - {{ pin_subpackage("libgfortran" ~ libgfortran_soname) }}
  233. - {{ pin_subpackage("libgcc-ng", max_pin=None) }}
  234. - sysroot_{{ target_platform }}
  235. - libgcc-ng >=4.9
  236. - libstdcxx-ng >=4.9
  237. run_exports:
  238. # impose this requirement across the build/host boundary
  239. strong:
  240. - libgfortran{{ libgfortran_soname }} {{ gcc_version }}.*
  241. - libgcc-ng >={{ gcc_version }}
  242. test:
  243. requires:
  244. - cmake
  245. {% if hack_sysroot_ver %}
  246. - sysroot_{{ target_platform }} {{ hack_sysroot_ver }}.*
  247. {% else %}
  248. - sysroot_{{ target_platform }} {{ conda_glibc_ver }}.*
  249. {% endif %}
  250. commands:
  251. - test -f ${PREFIX}/bin/{{ cpu_arch }}-conda_cos7-linux-gnu-gfortran
  252. - test -f ${PREFIX}/bin/{{ cpu_arch }}-conda-linux-gnu-gfortran
  253. - find $PREFIX/lib -iname omp_lib.mod | grep '.'
  254. - find $PREFIX/lib -iname omp_lib.h | grep '.'
  255. - pushd tests/fortomp || exit 1
  256. - sh test_fort.sh || true
  257. - popd
  258. files:
  259. - tests/fortomp/*
  260. about:
  261. summary: GNU Fortran Compiler
  262. home: https://gcc.gnu.org/
  263. license: GPL-3.0-only WITH GCC-exception-3.1
  264. - name: libstdcxx-ng
  265. target: {{ target_platform }}
  266. script: install_scripts/install-libstdc++.sh
  267. build:
  268. number: {{ build_num }}
  269. string: {{ build_string }}
  270. detect_binary_files_with_prefix: False
  271. binary_relocation: False
  272. missing_dso_whitelist:
  273. - "*"
  274. ignore_run_exports:
  275. - __glibc
  276. requirements:
  277. host:
  278. - sysroot_{{ target_platform }}
  279. test:
  280. commands:
  281. - test -f ${PREFIX}/lib/libstdc++.so
  282. about:
  283. summary: The GNU C++ Runtime Library
  284. home: https://gcc.gnu.org/
  285. license: GPL-3.0-only WITH GCC-exception-3.1
  286. - name: libgcc-ng
  287. target: {{ target_platform }}
  288. script: install_scripts/install-libgcc-no-gomp.sh
  289. requirements:
  290. host:
  291. - {{ pin_subpackage("libgomp", exact=True) }}
  292. - {{ pin_subpackage('_openmp_mutex', exact=True) }}
  293. - sysroot_{{ target_platform }}
  294. run:
  295. - _libgcc_mutex {{ _libgcc_mutex }}
  296. - _openmp_mutex
  297. run_constrained:
  298. - {{ pin_subpackage("libgomp", exact=True) }}
  299. - _libgcc_mutex {{ _libgcc_mutex }}
  300. - _openmp_mutex
  301. build:
  302. number: {{ build_num }}
  303. string: {{ build_string }}
  304. detect_binary_files_with_prefix: False
  305. binary_relocation: False
  306. missing_dso_whitelist:
  307. - "*"
  308. ignore_run_exports:
  309. - __glibc
  310. - _openmp_mutex
  311. test:
  312. requires:
  313. - sysroot_{{ target_platform }}
  314. commands:
  315. - test -f ${PREFIX}/lib/libgcc_s.so
  316. - test -f ${PREFIX}/lib/libgomp.so.{{ libgomp_ver[0:1] }}
  317. - test `readlink ${PREFIX}/lib/libgomp.so.{{ libgomp_ver[0:1] }}` == "libgomp.so.{{ libgomp_ver }}"
  318. about:
  319. summary: The GCC low-level runtime library
  320. home: https://gcc.gnu.org/onlinedocs/gccint/Libgcc.html
  321. license: GPL-3.0-only WITH GCC-exception-3.1
  322. - name: libgomp
  323. target: {{ target_platform }}
  324. script: install_scripts/install-libgomp.sh
  325. requirements:
  326. host:
  327. - sysroot_{{ target_platform }}
  328. run:
  329. - _libgcc_mutex {{ _libgcc_mutex }}
  330. build:
  331. number: {{ build_num }}
  332. string: {{ build_string }}
  333. detect_binary_files_with_prefix: False
  334. binary_relocation: False
  335. missing_dso_whitelist:
  336. - "*"
  337. run_exports:
  338. strong:
  339. - {{ pin_subpackage("_openmp_mutex", max_pin=None) }}
  340. ignore_run_exports:
  341. - __glibc
  342. test:
  343. requires:
  344. - sysroot_{{ target_platform }}
  345. commands:
  346. - test -f ${PREFIX}/lib/libgomp.so.{{ libgomp_ver }}
  347. - test ! -f ${PREFIX}/lib/libgomp.so.{{ libgomp_ver[0:1] }}
  348. about:
  349. summary: The GCC OpenMP implementation.
  350. home: https://gcc.gnu.org/onlinedocs/gccint/Libgcc.html
  351. license: GPL-3.0-only WITH GCC-exception-3.1
  352. - name: _openmp_mutex
  353. script: install_scripts/install-openmp_impl.sh
  354. version: {{ openmp_ver }}
  355. requirements:
  356. run:
  357. - _libgcc_mutex {{ _libgcc_mutex }}
  358. - libgomp >=7.5.0
  359. run_constrained:
  360. # conflict with previous name
  361. - openmp_impl 9999
  362. build:
  363. string: 1_gnu
  364. run_exports:
  365. strong:
  366. - {{ pin_subpackage("_openmp_mutex", max_pin=None) }}
  367. test:
  368. commands:
  369. - test -f ${PREFIX}/lib/libgomp.so.{{ libgomp_ver[0:1] }}
  370. - test `readlink ${PREFIX}/lib/libgomp.so.{{ libgomp_ver[0:1] }}` == "libgomp.so.{{ libgomp_ver }}"
  371. about:
  372. summary: OpenMP Implementation Mutex
  373. license: BSD-3-Clause
  374. license_file: ../LICENSE
  375. home: https://github.com/AnacondaRecipes/gcc-compiler-feedstock
  376. - name: libgfortran-ng
  377. target: {{ target_platform }}
  378. build:
  379. requirements:
  380. run:
  381. - libgfortran{{ libgfortran_soname }} {{ gcc_version }}.*
  382. test:
  383. commands:
  384. - test -f ${PREFIX}/lib/libgfortran.so
  385. about:
  386. summary: The GNU Fortran Runtime Library
  387. home: https://gcc.gnu.org/
  388. license: GPL-3.0-only WITH GCC-exception-3.1
  389. - name: libgfortran{{ libgfortran_soname }}
  390. target: {{ target_platform }}
  391. script: install_scripts/install-libgfortran.sh
  392. build:
  393. number: {{ build_num }}
  394. string: {{ build_string }}
  395. detect_binary_files_with_prefix: False
  396. binary_relocation: False
  397. missing_dso_whitelist:
  398. - "*"
  399. ignore_run_exports:
  400. - __glibc
  401. requirements:
  402. host:
  403. - sysroot_{{ target_platform }}
  404. run_constrained:
  405. - libgfortran-ng {{ gcc_version }} *_{{ build_num | default(0) }}
  406. test:
  407. commands:
  408. - test -f ${PREFIX}/lib/libgfortran.so
  409. about:
  410. summary: The GNU Fortran Runtime Library
  411. home: https://gcc.gnu.org/
  412. license: GPL-3.0-only WITH GCC-exception-3.1
  413. {% if gdb_version is defined %}
  414. - name: gdb_{{ target_platform }}
  415. target: {{ target_platform }}
  416. version: {{ gdb_version }}
  417. script: install_scripts/install-gdb.sh
  418. build:
  419. number: {{ build_num }}
  420. string: {{ build_string }}
  421. missing_dso_whitelist:
  422. - "*"
  423. about:
  424. summary: The GNU Project Debugger
  425. home: https://www.gnu.org/software/gdb/
  426. license: GPL
  427. {% endif %}
  428. {% if gdb_server_version is defined %}
  429. - name: gdb_server_{{ target_platform }}
  430. target: {{ target_platform }}
  431. version: {{ gdb_server_version }}
  432. script: install_scripts/install-gdb-server.sh
  433. build:
  434. number: {{ build_num }}
  435. string: {{ build_string }}
  436. missing_dso_whitelist:
  437. - "*"
  438. about:
  439. summary: The GNU Project Debugger
  440. home: https://www.gnu.org/software/gdb/
  441. license: GPL
  442. {% endif %}
  443. {% if ltrace_version is defined %}
  444. - name: ltrace_{{ target_platform }}
  445. target: {{ target_platform }}
  446. version: {{ ltrace_version }}
  447. script: install_scripts/install-ltrace.sh
  448. build:
  449. number: {{ build_num }}
  450. string: {{ build_string }}
  451. missing_dso_whitelist:
  452. - "*"
  453. about:
  454. summary: Ltrace is a debugging tool for recording library calls, and signals
  455. home: https://alioth.debian.org/projects/ltrace/
  456. license: GPL
  457. {% endif %}
  458. {% if strace_version is defined %}
  459. - name: strace_{{ target_platform }}
  460. target: {{ target_platform }}
  461. script: install_scripts/install-strace.sh
  462. build:
  463. number: {{ build_num }}
  464. string: {{ build_string }}
  465. missing_dso_whitelist:
  466. - "*"
  467. about:
  468. summary: Strace is a linux diagnostic, and debugging utility with cli
  469. home: https://strace.io
  470. license: GPL
  471. {% endif %}
  472. {% if duma_version is defined %}
  473. - name: duma_{{ target_platform }}
  474. target: {{ target_platform }}
  475. version: {{ duma_version }}
  476. script: install_scripts/install-duma.sh
  477. build:
  478. number: {{ build_num }}
  479. string: {{ build_string }}
  480. detect_binary_files_with_prefix: False
  481. binary_relocation:
  482. - 'bin/*'
  483. - 'lib/*.so*'
  484. - 'libexec/**/*.so*'
  485. missing_dso_whitelist:
  486. - "*"
  487. about:
  488. summary: DUMA is an open-source library to detect buffer overruns and under-runs in C and C++ programs.
  489. home: http://duma.sourceforge.net/
  490. license: GPL
  491. {% endif %}
  492. # make the linter happy
  493. about:
  494. summary: GNU Compiler Collection
  495. home: https://gcc.gnu.org/
  496. license: GPL-3.0-only WITH GCC-exception-3.1
  497. license_file:
  498. - gcc/COPYING
  499. - gcc/COPYING.lib
  500. - gcc/COPYING.RUNTIME
  501. - gcc/COPYING3
  502. - COPYING3.lib
  503. extra:
  504. recipe-maintainers:
  505. - katietz