From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- sys-libs/libomp/Manifest | 21 +++++ ...-link-latomic-to-provide-atomics-when-ava.patch | 94 ++++++++++++++++++++++ .../files/libomp-3.7.0-no_compat_symlinks.patch | 17 ++++ .../libomp/files/libomp-3.7.0-os_detection.patch | 19 +++++ .../files/libomp-3.9.0-musl-strerror_r.patch | 35 ++++++++ .../files/libomp-3.9.0-optional-aliases.patch | 63 +++++++++++++++ sys-libs/libomp/libomp-3.7.1.ebuild | 57 +++++++++++++ sys-libs/libomp/libomp-3.8.1.ebuild | 57 +++++++++++++ sys-libs/libomp/libomp-3.9.0.ebuild | 49 +++++++++++ sys-libs/libomp/libomp-3.9.1.ebuild | 49 +++++++++++ sys-libs/libomp/libomp-4.0.1.ebuild | 79 ++++++++++++++++++ sys-libs/libomp/libomp-5.0.0.ebuild | 73 +++++++++++++++++ sys-libs/libomp/libomp-5.0.9999.ebuild | 74 +++++++++++++++++ sys-libs/libomp/libomp-9999.ebuild | 77 ++++++++++++++++++ sys-libs/libomp/metadata.xml | 16 ++++ 15 files changed, 780 insertions(+) create mode 100644 sys-libs/libomp/Manifest create mode 100644 sys-libs/libomp/files/4.0.1/0001-test-Try-to-link-latomic-to-provide-atomics-when-ava.patch create mode 100644 sys-libs/libomp/files/libomp-3.7.0-no_compat_symlinks.patch create mode 100644 sys-libs/libomp/files/libomp-3.7.0-os_detection.patch create mode 100644 sys-libs/libomp/files/libomp-3.9.0-musl-strerror_r.patch create mode 100644 sys-libs/libomp/files/libomp-3.9.0-optional-aliases.patch create mode 100644 sys-libs/libomp/libomp-3.7.1.ebuild create mode 100644 sys-libs/libomp/libomp-3.8.1.ebuild create mode 100644 sys-libs/libomp/libomp-3.9.0.ebuild create mode 100644 sys-libs/libomp/libomp-3.9.1.ebuild create mode 100644 sys-libs/libomp/libomp-4.0.1.ebuild create mode 100644 sys-libs/libomp/libomp-5.0.0.ebuild create mode 100644 sys-libs/libomp/libomp-5.0.9999.ebuild create mode 100644 sys-libs/libomp/libomp-9999.ebuild create mode 100644 sys-libs/libomp/metadata.xml (limited to 'sys-libs/libomp') diff --git a/sys-libs/libomp/Manifest b/sys-libs/libomp/Manifest new file mode 100644 index 000000000000..b39728d7bcb4 --- /dev/null +++ b/sys-libs/libomp/Manifest @@ -0,0 +1,21 @@ +AUX 4.0.1/0001-test-Try-to-link-latomic-to-provide-atomics-when-ava.patch 3456 SHA256 c88bbb1d1c81b69bcece498ae8d4861bd6cbca465d294a9a681796ce5eed96f1 SHA512 677d6d7e316d6df028ebed606cde1a4225ed6e06bacbe81cd527acf57c705858ab5aed2f71946c2404336033bfa985dafee2d56423204a59954a80424ca856e0 WHIRLPOOL cdea0f06b3436f48c1860da75e4c887c08ad031d938f080f1da7d334d73adbb0ae44ed56c94950f3665fb08d680046484f09277101093fbaa1483b5e29679b25 +AUX libomp-3.7.0-no_compat_symlinks.patch 845 SHA256 d91c4104e158e8c8c9d90ffb0f28c08e683c47d6febc822ac3f9374834d7701f SHA512 4878cf052790638717fad4d1926354fbfc3370b2e65ebe228702649f78e20bc1d22e5eb3340f58d04d3288f310a68ed22c4fb882b74b14db319f87841329a67b WHIRLPOOL 5bfa0b674715133b28cdb15367c8b18dd1593a0062179667f1f3a0dae9f1cffb4b773492094840b392b55a40112acadc697922ccad1d0acf105752e9500e1d74 +AUX libomp-3.7.0-os_detection.patch 1235 SHA256 9372541a923b0a3c3b573fdfb3c92b1261f0aea5dc216d2432ab19c928da8e0f SHA512 d023b73312ea8aacb2cbc18cdd43ae4bbb4c4dde3fd02f499d3daab2dc8c74ace68a3077fd2f6f05727dc32d5641c5514b108e24e663eb6f84cc77818cac534b WHIRLPOOL b3edd1106f90040d2e8a99d8e4e6f35b2c6354df52fdba5fce4548ae11daa8fb91bd627692269e0d2b718e8793631abda0b3cb741eb0cc6b67273213c7b758e9 +AUX libomp-3.9.0-musl-strerror_r.patch 1159 SHA256 b1aa6d44d4d613cb1383975831ad49ccf433de5e6ff80fec1686ec161edf3ee7 SHA512 f35c5b9b1acf3cc636b505b8935a974796080fa71d96aee46e4edb559a5c5c03bf95457b27e1f026b4330a052654de539d556c4098f1b4a02cd2f95740bc3a4f WHIRLPOOL debde3f0265408f1a5c1376fcf4b84d6c210b9a8824343e22f86fdd8e1485ac20c2d8668e04ee692f14c8d8a7a13b1eaf0b117fde4565f21cc80aada9f498bb0 +AUX libomp-3.9.0-optional-aliases.patch 2536 SHA256 31c143bdb761a969888348ced721f22be7af7413da0b5238642a75efd8c2fcd7 SHA512 0cf501decca0997ee84754bc6c5b3401dbf408571dc169bbfd3fe892f6d0c730785a1bb4293e55eb47f8e808707810e22fac15702853a06cd7531d7a37c54265 WHIRLPOOL fa722bd91c74307217d7c419a27d6d6a55730bcd144a5e2630c0ab48a974b9ce4686e1a2dc82da735dec525f8ad5c96885a5c27b900cc5ce0057a32c146ef414 +DIST openmp-3.7.1.src.tar.xz 2026988 SHA256 9a702e20c247014f6de8c45b738c6ea586eca0559304520f565ac9a7cba4bf9a SHA512 ec29f2665c9de4dee184f86a980a90c87a99e7728bb9c46c9e513801c30b28b6496bfcfbe4cefbd90ef63b761886cd74c19cf8e26a8854d8569e357b78633f6a WHIRLPOOL e69f2ef825df7f438db3647d2405d0fe6e6b00d8614efe0783e1fef5ae72db11b4a5f231383f3cc66402cb0785a025610187cc69fba2edbafa51136bd990453e +DIST openmp-3.8.1.src.tar.xz 2009572 SHA256 68fcde6ef34e0275884a2de3450a31e931caf1d6fda8606ef14f89c4123617dc SHA512 406e9077817c50bcd58dd50bd334258ebf4b81c3ecce830ae1f427bd7c1fc9376b63fdeb3459c953c341becde82d83be18069bfcd34cbaeee6f1478267c0b2bc WHIRLPOOL b733b7f8f965be86af49af5b02892ec8aacaafe00d310a21c8cc0155f1699da66d1c8aa7709eb230810c4ff68f63896d5a7548777c100ca91a8af998922bdca0 +DIST openmp-3.9.0.src.tar.xz 2257596 SHA256 df88f90d7e5b5e9525a35fa2e2b93cbbb83c4882f91df494e87ee3ceddacac91 SHA512 030432bb10d86016f0f1c4f4d8b25f78acdb4aed33c604baf07c825bbcc6198306f2f71a3e56030f20864a92ab0187357aff94d34e47f7166991faf539c0104d WHIRLPOOL 7bfb362c0f087d3867c8cab04ebba23c8e6337d34ddcdfeda1cbe960611eacf1e4356e99bf4d6316b60c9f4b9f9fb23eecdb346feaae72b9cd168ee0aa3cca2a +DIST openmp-3.9.1.src.tar.xz 2031588 SHA256 d23b324e422c0d5f3d64bae5f550ff1132c37a070e43c7ca93991676c86c7766 SHA512 80924a6f9765f634d24d7b0aa036d92c912dbd8e067487a14bdd03b4c587fdfc92e83eb29926bfa637ef45be3f133a924f77ab12099ea3706c18e9c42774708b WHIRLPOOL b6ec75d4f9d2b86bb8e2927791cb46e61ff8657fc21f9e0ba9893d81d3382522aca330564f3156c1fbbf765de0499e875e41e11199abe2da8ed1bef057d5e8d8 +DIST openmp-4.0.1.src.tar.xz 2275240 SHA256 ec693b170e0600daa7b372240a06e66341ace790d89eaf4a843e8d56d5f4ada4 SHA512 0b737dde832c5907a0cac41fe1d594b61e85dd405eee42b39f09233db62b44543204ccc775e52e2981f9c9f0683b234526e288a3a7a04f712280fb3a575abcaf WHIRLPOOL 102f4b6984e6bc4dc08349e7f1f0ff31646bad923018cfd342e0bee760d8b1036f0c54c565af3b0730c470d584e37ed905bcbfa1ffc2325dafa0a02d91088b05 +DIST openmp-5.0.0.src.tar.xz 2074004 SHA256 c0ef081b05e0725a04e8711d9ecea2e90d6c3fbb1622845336d3d095d0a3f7c5 SHA512 038cc1d262414fac9a05eabdce97b21eb04fc1b3609d07f8da2c9da6b1aaa143f8b26953cb799e7dde82f708103539fe03fe939ba7323a71bd3e9e3925bd5513 WHIRLPOOL e32436cc925173db2f58dc0b454ed046c733877edce3383da0a621ea90e9c30d9e45c0063451feb9b0dc95102893db02832d97bfb3a200e3440e4cad7fb9720a +EBUILD libomp-3.7.1.ebuild 1368 SHA256 fc595016c19b8ac57c43fe6d7a42c101c418ff21b56fb437f8994d4eedd8b6f7 SHA512 ae3b3688f05694e867d98f1a02ef70a36d95b457f0fb369c0f60c86ee4b1a37fab860d1866bf437c6a4344b96904618e717b3a3a5ec7e6756065e4d5e35c9a3a WHIRLPOOL 2da154ac123cf8a7d921621dec560299ad2f5913f4a062f083807df3872f66161ad5c2ee17c511399bd1188e75d56a9fdbd7aec902d017b3af188ff393444b96 +EBUILD libomp-3.8.1.ebuild 1368 SHA256 72f9dcaaed1359a623d483773c1548598e550141bf3e4aac6b015f64f6ec3281 SHA512 7ba7b4fccdbc2e9a69f73f5fafd985f862b4b28eb3f775d2650e78a2596826b1d8d947aa6e19f708572409139ea094da0d1c24ee35fb3d8812f8363bd948b3c7 WHIRLPOOL fe4043b740e6fd756650c3d722757a58bf50638699fe53d2b86ac66898bfcada958911a1b7ecba526e7e1bbd17eeec65e5b8f826516ecb71c2576aa38ac9d44a +EBUILD libomp-3.9.0.ebuild 1264 SHA256 fc643ce90c5d7a2e102316716d0877a78ce975480458898c3bd8c3d6fc7ece2e SHA512 e0772254fd1ccf735a4325a41bcd30eaaeec30063a541b9f77a5295e1674e0b4a38af86738bfc9a71f4196b81945cd7c08655fc468105aa11d24c38d303aac0a WHIRLPOOL 72987a3143339c37b89d45a6bde2c2d2495bf2747b871eab304eea9f6796cc3dace4c70eb26aabe9fa4d8901ebe94e25b8bedeb934d96811b629965e7b516632 +EBUILD libomp-3.9.1.ebuild 1326 SHA256 6b973aaa8ae527a06aeac418bea5fc6b744bb448613cc8f9356a68c606dfff18 SHA512 99afa3364dfe73c52792e1f0c4cc19c9beb1fdb28d7fd009a778c351f86fd1759a1c4bfcd46194890b51f227844c063fed53085d78c0b91351858ed517e42794 WHIRLPOOL 151b52008b00b06e8e28dbcf4a32f790b3f184e32118de701aa6846fd0293b72dd04164e00cb8b63430f7ec3a84477b4c40a110beb5c86d8453d4364e0da75b7 +EBUILD libomp-4.0.1.ebuild 1961 SHA256 f75f49ca7226a70f06f506938e99e534795958a5efeee6cfce84d9f2a29e8366 SHA512 7ab537285eb1493a2e5ea56e8df8281ecc3f413579ecd342bf47257b80bdee0e861760af86b42d2a55215b70ce3bd4518120a10948e07b300f3cedc775448351 WHIRLPOOL ea92a34085e7cb0573236b8ec8f6853cb5836cfa066d058bed831cf8b8b42ba2dc945801a90f95c8798e3603c36163a18843e3a4838eae393cf637929939909f +EBUILD libomp-5.0.0.ebuild 1854 SHA256 b56ff7e80747d9356597e8f24fa17a146d0b6f7bcca8f7d559d41fdb84c638ec SHA512 b4a288850dcebdc278fea6ac838fdd5326c4af41d65b28d7b11572811eb8985eb512aae32104abb53c0f94315d2126c4b17f71126e6101573d7f23b3e717601b WHIRLPOOL 1d96fc826897047644d43d3420d1d51957e808987a0657ee6ca865d4853641ad81ed83feb26c56de06c0b6aa23336b6298daca4cd553a62d30b27d16bc6f2d31 +EBUILD libomp-5.0.9999.ebuild 1867 SHA256 09a6b094903aaee60a3305daab10750e66e93e06e01d20097861a0647f1623f4 SHA512 0b79eef5f12b0f2056c5353c887f096ee05ff628b75dd634be4fbb70e45a82c13845a91c06d076398c2df5d7e426854f29ead69e9de615bbcbf0b0b25c62cde0 WHIRLPOOL ec6a5086cd3622939557d19177d58598bc1975f66bf00913891f0b1bec5b73d4a536bc959cdfab8c08ef0d041535f44bed02507eab8848ee7e0db9dd5af1da51 +EBUILD libomp-9999.ebuild 1944 SHA256 2de75d1398bc08c0e9aee540902204ec1f7af8030c0aa0f175137d36a198569d SHA512 c609649bf0cbae868d52a07f242ef060a779a2db87b18da0df04b4057f4d8fdc33d191a8b815c8f3db8449247e4895216d6fa7f4bd4e3e713995452e844bc7e6 WHIRLPOOL c40ba87d9259e1c9980f37492d270d9bac27c4930b5eaadf97c67430feaafe17bc022d02c7e0522c751a33fa20faea802ecf4fb28358b41c3d52357e0ffea7be +MISC ChangeLog 3330 SHA256 adc90fa866b023f27a776d00d8ed8fabed42db351d87d2dd3fd5fb96b48842ba SHA512 f4565bca8edf184e494547d6d5a27a8a4cd1ded1bad4c75bfb1c915a05c33ef5db706d81800046d617a7b018325c15b6d30ca87046023cca57e9ab1783ddaa0a WHIRLPOOL 74edae6e0a95dbcec22a9a2737793641262a8b51f46d092988b99255051b96ae5541873dc548e89b976950c269184a2acc8c9d214a7d2d94990d67a92f0e8e6a +MISC metadata.xml 670 SHA256 c32e97e9d85d756302a38aac03d55a14d3e5b43cc910f1dff35b9f0c8bea03b1 SHA512 d4269bb7192e00feed26327bb2ac36db3b1c4f5d55417c22efb9a64fa5a006c17dd39459ecc305e8a9a3a954271ad10013fe5c9159a30ea609513aabddebf485 WHIRLPOOL d0022a64d2cad055eab1c6921cdfd4372fcf9cabd40c5ba7bf74d49eaff5f3498545fe29bbfc20bbee2cc3fed596e6a4d9f408d912f39900bbfb1c6c4aabb61a diff --git a/sys-libs/libomp/files/4.0.1/0001-test-Try-to-link-latomic-to-provide-atomics-when-ava.patch b/sys-libs/libomp/files/4.0.1/0001-test-Try-to-link-latomic-to-provide-atomics-when-ava.patch new file mode 100644 index 000000000000..688175583269 --- /dev/null +++ b/sys-libs/libomp/files/4.0.1/0001-test-Try-to-link-latomic-to-provide-atomics-when-ava.patch @@ -0,0 +1,94 @@ +From 7bd70635240f69fcd4da4d98a4aca8aaa779dd11 Mon Sep 17 00:00:00 2001 +From: Michal Gorny +Date: Fri, 24 Feb 2017 22:15:24 +0000 +Subject: [PATCH] [test] Try to link -latomic to provide atomics when available + +When using -rtlib=libgcc, the fallback implementation of __atomic_* +builtins is provided via libatomic (included in GCC). However, neither +GCC itself nor clang link libatomic implicitly, and it seems that GCC +upstream expects projects to link it explicitly as necessary. + +Since compiler-rt provides __atomic_* builtins directly in the main +library, check if they are provided by the default libraries first. +If they are not, check if -latomic is available to provide them +and add explicit -latomic for tests in this case. + +This fixes unresolved __atomic_load() references when running openmp +tests on i386 with libgcc backend. + +Differential Revision: https://reviews.llvm.org/D30083 + +git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@296183 91177308-0d34-0410-b5e6-96231b3b80d8 +--- + runtime/test/CMakeLists.txt | 13 +++++++++++++ + runtime/test/lit.cfg | 2 ++ + runtime/test/lit.site.cfg.in | 2 +- + 3 files changed, 16 insertions(+), 1 deletion(-) + +diff --git a/runtime/test/CMakeLists.txt b/runtime/test/CMakeLists.txt +index 8162855..88c02c8 100644 +--- a/runtime/test/CMakeLists.txt ++++ b/runtime/test/CMakeLists.txt +@@ -1,6 +1,7 @@ + # CMakeLists.txt file for unit testing OpenMP Library + include(FindPythonInterp) + include(CheckTypeSize) ++include(CheckFunctionExists) + include(CheckLibraryExists) + + if(NOT PYTHONINTERP_FOUND) +@@ -11,6 +12,17 @@ endif() + + # Some tests use math functions + check_library_exists(m sqrt "" LIBOMP_HAVE_LIBM) ++# When using libgcc, -latomic may be needed for atomics ++# (but when using compiler-rt, the atomics will be built-in) ++# Note: we can not check for __atomic_load because clang treats it ++# as special built-in and that breaks CMake checks ++check_function_exists(__atomic_load_1 LIBOMP_HAVE_BUILTIN_ATOMIC) ++if(NOT LIBOMP_HAVE_BUILTIN_ATOMIC) ++ check_library_exists(atomic __atomic_load_1 "" LIBOMP_HAVE_LIBATOMIC) ++else() ++ # not needed ++ set(LIBOMP_HAVE_LIBATOMIC 0) ++endif() + + macro(pythonize_bool var) + if (${var}) +@@ -25,6 +37,7 @@ pythonize_bool(LIBOMP_OMPT_SUPPORT) + pythonize_bool(LIBOMP_OMPT_BLAME) + pythonize_bool(LIBOMP_OMPT_TRACE) + pythonize_bool(LIBOMP_HAVE_LIBM) ++pythonize_bool(LIBOMP_HAVE_LIBATOMIC) + + set(LIBOMP_TEST_CFLAGS "" CACHE STRING + "Extra compiler flags to send to the test compiler") +diff --git a/runtime/test/lit.cfg b/runtime/test/lit.cfg +index 7f18da4..bef61d4 100644 +--- a/runtime/test/lit.cfg ++++ b/runtime/test/lit.cfg +@@ -52,6 +52,8 @@ config.test_cflags = config.test_openmp_flag + \ + libs = "" + if config.has_libm: + libs += " -lm" ++if config.has_libatomic: ++ libs += " -latomic" + + # Allow XFAIL to work + config.target_triple = [ ] +diff --git a/runtime/test/lit.site.cfg.in b/runtime/test/lit.site.cfg.in +index 448132e..b0d57ce 100644 +--- a/runtime/test/lit.site.cfg.in ++++ b/runtime/test/lit.site.cfg.in +@@ -12,7 +12,7 @@ config.hwloc_library_dir = "@LIBOMP_HWLOC_LIBRARY_DIR@" + config.using_hwloc = @LIBOMP_USE_HWLOC@ + config.has_ompt = @LIBOMP_OMPT_SUPPORT@ and @LIBOMP_OMPT_BLAME@ and @LIBOMP_OMPT_TRACE@ + config.has_libm = @LIBOMP_HAVE_LIBM@ ++config.has_libatomic = @LIBOMP_HAVE_LIBATOMIC@ + + # Let the main config do the real work. + lit_config.load_config(config, "@LIBOMP_BASE_DIR@/test/lit.cfg") +- +-- +2.12.0 + diff --git a/sys-libs/libomp/files/libomp-3.7.0-no_compat_symlinks.patch b/sys-libs/libomp/files/libomp-3.7.0-no_compat_symlinks.patch new file mode 100644 index 000000000000..c8b56e2bc89d --- /dev/null +++ b/sys-libs/libomp/files/libomp-3.7.0-no_compat_symlinks.patch @@ -0,0 +1,17 @@ +diff -Naur openmp-3.7.0.src.orig/runtime/src/CMakeLists.txt openmp-3.7.0.src/runtime/src/CMakeLists.txt +--- openmp-3.7.0.src.orig/runtime/src/CMakeLists.txt 2015-07-15 23:41:36.000000000 +0200 ++++ openmp-3.7.0.src/runtime/src/CMakeLists.txt 2015-09-05 23:41:17.105242541 +0200 +@@ -288,13 +288,6 @@ + endforeach() + else() + install(TARGETS omp LIBRARY DESTINATION lib${LIBOMP_LIBDIR_SUFFIX}) +- # Create aliases (symlinks) of the library for backwards compatibility +- set(LIBOMP_ALIASES "libgomp;libiomp5") +- foreach(alias IN LISTS LIBOMP_ALIASES) +- install(CODE "execute_process(COMMAND \"\${CMAKE_COMMAND}\" -E create_symlink \"${LIBOMP_LIB_FILE}\" +- \"${alias}${CMAKE_SHARED_LIBRARY_SUFFIX}\" WORKING_DIRECTORY +- \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/lib${LIBOMP_LIBDIR_SUFFIX})") +- endforeach() + endif() + install( + FILES diff --git a/sys-libs/libomp/files/libomp-3.7.0-os_detection.patch b/sys-libs/libomp/files/libomp-3.7.0-os_detection.patch new file mode 100644 index 000000000000..a0b2aad375f1 --- /dev/null +++ b/sys-libs/libomp/files/libomp-3.7.0-os_detection.patch @@ -0,0 +1,19 @@ +diff -Naur openmp-3.7.0.src.orig/runtime/tools/lib/Uname.pm openmp-3.7.0.src/runtime/tools/lib/Uname.pm +--- openmp-3.7.0.src.orig/runtime/tools/lib/Uname.pm 2015-01-19 19:29:35.000000000 +0100 ++++ openmp-3.7.0.src/runtime/tools/lib/Uname.pm 2015-09-04 19:30:25.821746740 +0200 +@@ -236,15 +236,6 @@ + $bulk =~ m{^DISTRIB_ID\s*=\s*(.*?)\s*$}m + or runtime_error( "$release: There is no DISTRIB_ID:", $bulk, "(eof)" ); + $values{ operating_system_name } = $1; +- $bulk =~ m{^DISTRIB_RELEASE\s*=\s*(.*?)\s*$}m +- or runtime_error( "$release: There is no DISTRIB_RELEASE:", $bulk, "(eof)" ); +- $values{ operating_system_release } = $1; +- $bulk =~ m{^DISTRIB_CODENAME\s*=\s*(.*?)\s*$}m +- or runtime_error( "$release: There is no DISTRIB_CODENAME:", $bulk, "(eof)" ); +- $values{ operating_system_codename } = $1; +- $bulk =~ m{^DISTRIB_DESCRIPTION\s*="?\s*(.*?)"?\s*$}m +- or runtime_error( "$release: There is no DISTRIB_DESCRIPTION:", $bulk, "(eof)" ); +- $values{ operating_system_description } = $1; + } else { + # Oops. lsb-release is missed or not informative. Try other *-release files. + $release = "/etc/system-release"; diff --git a/sys-libs/libomp/files/libomp-3.9.0-musl-strerror_r.patch b/sys-libs/libomp/files/libomp-3.9.0-musl-strerror_r.patch new file mode 100644 index 000000000000..4fbf9f691c05 --- /dev/null +++ b/sys-libs/libomp/files/libomp-3.9.0-musl-strerror_r.patch @@ -0,0 +1,35 @@ +From 4fa7d5e207a4f7ef79b423b7d9658b7625795f5c Mon Sep 17 00:00:00 2001 +From: Michal Gorny +Date: Tue, 18 Oct 2016 16:38:44 +0000 +Subject: [PATCH] Fix a compile error on musl-libc due to strerror_r() + prototype + +Function strerror_r() has different signatures in different +implementations of libc: glibc's version returns a char*, while BSDs +and musl return a int. libomp unconditionally assumes glibc on Linux +and thus fails to compile against musl-libc. This patch addresses this +issue. + +Differential Revision: https://reviews.llvm.org/D25071 + +git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@284492 91177308-0d34-0410-b5e6-96231b3b80d8 +--- + runtime/src/kmp_i18n.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/runtime/src/kmp_i18n.c b/runtime/src/kmp_i18n.c +index 546e693..e008d1f 100644 +--- a/runtime/src/kmp_i18n.c ++++ b/runtime/src/kmp_i18n.c +@@ -809,7 +809,7 @@ sys_error( + int strerror_r( int, char *, size_t ); // XSI version + */ + +- #if KMP_OS_LINUX ++ #if defined(__GLIBC__) && defined(_GNU_SOURCE) + + // GNU version of strerror_r. + +-- +2.10.1 + diff --git a/sys-libs/libomp/files/libomp-3.9.0-optional-aliases.patch b/sys-libs/libomp/files/libomp-3.9.0-optional-aliases.patch new file mode 100644 index 000000000000..faf5bb51bca9 --- /dev/null +++ b/sys-libs/libomp/files/libomp-3.9.0-optional-aliases.patch @@ -0,0 +1,63 @@ +From 89ab78e360b7b20ebe1bc89736880a8e4aaa9e6e Mon Sep 17 00:00:00 2001 +From: Michal Gorny +Date: Wed, 14 Sep 2016 17:46:27 +0000 +Subject: [PATCH] [cmake] Make libgomp & libiomp5 alias install optional + +Introduce a new LIBOMP_INSTALL_VARIABLES cache variable that can be used +to disable creating libgomp and libiomp5 aliases on 'make install'. +Those aliases are undesired e.g. on Gentoo systems where libomp is used +purely by clang. + +Differential Revision: https://reviews.llvm.org/D24563 + +git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@281512 91177308-0d34-0410-b5e6-96231b3b80d8 +--- + runtime/CMakeLists.txt | 4 ++++ + runtime/src/CMakeLists.txt | 16 +++++++++------- + 2 files changed, 13 insertions(+), 7 deletions(-) + +diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt +index 9db058b..e8e9a74 100644 +--- a/runtime/CMakeLists.txt ++++ b/runtime/CMakeLists.txt +@@ -340,6 +340,10 @@ endif() + + set(LIBOMP_LIB_FILE ${LIBOMP_LIB_NAME}${LIBOMP_LIBRARY_SUFFIX}) + ++# Optional backwards compatibility aliases. ++set(LIBOMP_INSTALL_ALIASES TRUE CACHE BOOL ++ "Install libgomp and libiomp5 library aliases for backwards compatibility") ++ + # Print configuration after all variables are set. + if(${LIBOMP_STANDALONE_BUILD}) + libomp_say("Operating System -- ${CMAKE_SYSTEM_NAME}") +diff --git a/runtime/src/CMakeLists.txt b/runtime/src/CMakeLists.txt +index 777434d..c80f88d 100644 +--- a/runtime/src/CMakeLists.txt ++++ b/runtime/src/CMakeLists.txt +@@ -305,13 +305,15 @@ else() + + install(TARGETS omp ${LIBOMP_INSTALL_KIND} DESTINATION lib${LIBOMP_LIBDIR_SUFFIX}) + +- # Create aliases (symlinks) of the library for backwards compatibility +- set(LIBOMP_ALIASES "libgomp;libiomp5") +- foreach(alias IN LISTS LIBOMP_ALIASES) +- install(CODE "execute_process(COMMAND \"\${CMAKE_COMMAND}\" -E create_symlink \"${LIBOMP_LIB_FILE}\" +- \"${alias}${LIBOMP_LIBRARY_SUFFIX}\" WORKING_DIRECTORY +- \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/lib${LIBOMP_LIBDIR_SUFFIX})") +- endforeach() ++ if(${LIBOMP_INSTALL_ALIASES}) ++ # Create aliases (symlinks) of the library for backwards compatibility ++ set(LIBOMP_ALIASES "libgomp;libiomp5") ++ foreach(alias IN LISTS LIBOMP_ALIASES) ++ install(CODE "execute_process(COMMAND \"\${CMAKE_COMMAND}\" -E create_symlink \"${LIBOMP_LIB_FILE}\" ++ \"${alias}${LIBOMP_LIBRARY_SUFFIX}\" WORKING_DIRECTORY ++ \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/lib${LIBOMP_LIBDIR_SUFFIX})") ++ endforeach() ++ endif() + endif() + install( + FILES +-- +2.4.10 + diff --git a/sys-libs/libomp/libomp-3.7.1.ebuild b/sys-libs/libomp/libomp-3.7.1.ebuild new file mode 100644 index 000000000000..16091c3c0b9c --- /dev/null +++ b/sys-libs/libomp/libomp-3.7.1.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +: ${CMAKE_MAKEFILE_GENERATOR:=ninja} + +inherit cmake-utils multilib-minimal + +MY_P=openmp-${PV} +DESCRIPTION="OpenMP runtime library for LLVM/clang compiler" +HOMEPAGE="https://openmp.llvm.org" +SRC_URI="https://llvm.org/releases/${PV}/${MY_P}.src.tar.xz" + +# Additional licenses: +# - MIT-licensed Intel code, +# - LLVM Software Grant from Intel. + +LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant" +SLOT="0/3.7" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${MY_P}.src" + +PATCHES=( + "${FILESDIR}"/${PN}-3.7.0-os_detection.patch + "${FILESDIR}"/${PN}-3.7.0-no_compat_symlinks.patch + ) + +pkg_pretend() { + if [[ ${MERGE_TYPE} != binary ]]; then + if ! test-flag-CXX -std=c++11; then + eerror "${P} requires C++11-capable C++ compiler. Your current compiler" + eerror "does not seem to support -std=c++11 option. Please upgrade your compiler" + eerror "to gcc-4.7 or an equivalent version supporting C++11." + die "Currently active compiler does not support -std=c++11" + fi + fi +} + +multilib_src_configure() { + local libdir="$(get_libdir)" + local mycmakeargs=( "-DLIBOMP_LIBDIR_SUFFIX=${libdir#lib}" ) + cmake-utils_src_configure +} + +multilib_src_compile() { + cmake-utils_src_compile +} + +multilib_src_install() { + cmake-utils_src_install +} diff --git a/sys-libs/libomp/libomp-3.8.1.ebuild b/sys-libs/libomp/libomp-3.8.1.ebuild new file mode 100644 index 000000000000..3db23e409e13 --- /dev/null +++ b/sys-libs/libomp/libomp-3.8.1.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +: ${CMAKE_MAKEFILE_GENERATOR:=ninja} + +inherit cmake-utils multilib-minimal + +MY_P=openmp-${PV} +DESCRIPTION="OpenMP runtime library for LLVM/clang compiler" +HOMEPAGE="https://openmp.llvm.org" +SRC_URI="https://llvm.org/releases/${PV}/${MY_P}.src.tar.xz" + +# Additional licenses: +# - MIT-licensed Intel code, +# - LLVM Software Grant from Intel. + +LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant" +SLOT="0/3.8" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${MY_P}.src" + +PATCHES=( + "${FILESDIR}"/${PN}-3.7.0-os_detection.patch + "${FILESDIR}"/${PN}-3.7.0-no_compat_symlinks.patch + ) + +pkg_pretend() { + if [[ ${MERGE_TYPE} != binary ]]; then + if ! test-flag-CXX -std=c++11; then + eerror "${P} requires C++11-capable C++ compiler. Your current compiler" + eerror "does not seem to support -std=c++11 option. Please upgrade your compiler" + eerror "to gcc-4.7 or an equivalent version supporting C++11." + die "Currently active compiler does not support -std=c++11" + fi + fi +} + +multilib_src_configure() { + local libdir="$(get_libdir)" + local mycmakeargs=( "-DLIBOMP_LIBDIR_SUFFIX=${libdir#lib}" ) + cmake-utils_src_configure +} + +multilib_src_compile() { + cmake-utils_src_compile +} + +multilib_src_install() { + cmake-utils_src_install +} diff --git a/sys-libs/libomp/libomp-3.9.0.ebuild b/sys-libs/libomp/libomp-3.9.0.ebuild new file mode 100644 index 000000000000..b72ad15d2b73 --- /dev/null +++ b/sys-libs/libomp/libomp-3.9.0.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +: ${CMAKE_MAKEFILE_GENERATOR:=ninja} + +inherit cmake-multilib + +MY_P=openmp-${PV} +DESCRIPTION="OpenMP runtime library for LLVM/clang compiler" +HOMEPAGE="https://openmp.llvm.org" +SRC_URI="https://llvm.org/releases/${PV}/${MY_P}.src.tar.xz" + +# Additional licenses: +# - MIT-licensed Intel code, +# - LLVM Software Grant from Intel. + +LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant" +SLOT="0/3.9" +KEYWORDS="~amd64 ~x86" +IUSE="hwloc ompt" + +RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )" +DEPEND="${RDEPEND} + dev-lang/perl" + +S="${WORKDIR}/${MY_P}.src" + +PATCHES=( + # backport of https://reviews.llvm.org/D24563 + "${FILESDIR}"/${PN}-3.9.0-optional-aliases.patch + # backport of https://reviews.llvm.org/D25071 + "${FILESDIR}"/${PN}-3.9.0-musl-strerror_r.patch +) + +multilib_src_configure() { + local libdir="$(get_libdir)" + local mycmakeargs=( + -DLIBOMP_LIBDIR_SUFFIX="${libdir#lib}" + -DLIBOMP_USE_HWLOC=$(usex hwloc) + -DLIBOMP_OMPT_SUPPORT=$(usex ompt) + # do not install libgomp.so & libiomp5.so aliases + -DLIBOMP_INSTALL_ALIASES=OFF + # disable unnecessary hack copying stuff back to srcdir + -DLIBOMP_COPY_EXPORTS=OFF + ) + cmake-utils_src_configure +} diff --git a/sys-libs/libomp/libomp-3.9.1.ebuild b/sys-libs/libomp/libomp-3.9.1.ebuild new file mode 100644 index 000000000000..f52c0d168fd3 --- /dev/null +++ b/sys-libs/libomp/libomp-3.9.1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +: ${CMAKE_MAKEFILE_GENERATOR:=ninja} + +inherit cmake-multilib + +MY_P=openmp-${PV} +DESCRIPTION="OpenMP runtime library for LLVM/clang compiler" +HOMEPAGE="https://openmp.llvm.org" +SRC_URI="https://llvm.org/releases/${PV}/${MY_P}.src.tar.xz" + +# Additional licenses: +# - MIT-licensed Intel code, +# - LLVM Software Grant from Intel. + +LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant" +SLOT="0/3.9" +KEYWORDS="amd64 ~arm64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="hwloc ompt" + +RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )" +DEPEND="${RDEPEND} + dev-lang/perl" + +S="${WORKDIR}/${MY_P}.src" + +PATCHES=( + # backport of https://reviews.llvm.org/D24563 + "${FILESDIR}"/${PN}-3.9.0-optional-aliases.patch + # backport of https://reviews.llvm.org/D25071 + "${FILESDIR}"/${PN}-3.9.0-musl-strerror_r.patch +) + +multilib_src_configure() { + local libdir="$(get_libdir)" + local mycmakeargs=( + -DLIBOMP_LIBDIR_SUFFIX="${libdir#lib}" + -DLIBOMP_USE_HWLOC=$(usex hwloc) + -DLIBOMP_OMPT_SUPPORT=$(usex ompt) + # do not install libgomp.so & libiomp5.so aliases + -DLIBOMP_INSTALL_ALIASES=OFF + # disable unnecessary hack copying stuff back to srcdir + -DLIBOMP_COPY_EXPORTS=OFF + ) + cmake-utils_src_configure +} diff --git a/sys-libs/libomp/libomp-4.0.1.ebuild b/sys-libs/libomp/libomp-4.0.1.ebuild new file mode 100644 index 000000000000..6b5290fbe402 --- /dev/null +++ b/sys-libs/libomp/libomp-4.0.1.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +: ${CMAKE_MAKEFILE_GENERATOR:=ninja} +# (needed due to CMAKE_BUILD_TYPE != Gentoo) +CMAKE_MIN_VERSION=3.7.0-r1 +PYTHON_COMPAT=( python2_7 ) + +inherit cmake-multilib python-any-r1 + +DESCRIPTION="OpenMP runtime library for LLVM/clang compiler" +HOMEPAGE="https://openmp.llvm.org" +SRC_URI="https://releases.llvm.org/${PV/_//}/openmp-${PV/_/}.src.tar.xz" + +# Additional licenses: +# - MIT-licensed Intel code, +# - LLVM Software Grant from Intel. + +LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="hwloc ompt test" + +RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )" +# tests: +# - dev-python/lit provides the test runner +# - sys-devel/llvm provide test utils (e.g. FileCheck) +# - sys-devel/clang provides the compiler to run tests +DEPEND="${RDEPEND} + dev-lang/perl + test? ( + $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') + sys-devel/llvm + >=sys-devel/clang-3.9.0 + )" + +S=${WORKDIR}/openmp-${PV/_/}.src + +# least intrusive of all +CMAKE_BUILD_TYPE=RelWithDebInfo + +python_check_deps() { + has_version "dev-python/lit[${PYTHON_USEDEP}]" +} + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + +src_prepare() { + # fix atomic tests with gcc + eapply "${FILESDIR}"/4.0.1/0001-test-Try-to-link-latomic-to-provide-atomics-when-ava.patch + + eapply_user +} + +multilib_src_configure() { + local libdir="$(get_libdir)" + local mycmakeargs=( + -DLIBOMP_LIBDIR_SUFFIX="${libdir#lib}" + -DLIBOMP_USE_HWLOC=$(usex hwloc) + -DLIBOMP_OMPT_SUPPORT=$(usex ompt) + # do not install libgomp.so & libiomp5.so aliases + -DLIBOMP_INSTALL_ALIASES=OFF + # disable unnecessary hack copying stuff back to srcdir + -DLIBOMP_COPY_EXPORTS=OFF + -DLIBOMP_TEST_COMPILER="$(type -P "${CHOST}-clang")" + ) + cmake-utils_src_configure +} + +multilib_src_test() { + # respect TMPDIR! + local -x LIT_PRESERVES_TMP=1 + + cmake-utils_src_make check-libomp +} diff --git a/sys-libs/libomp/libomp-5.0.0.ebuild b/sys-libs/libomp/libomp-5.0.0.ebuild new file mode 100644 index 000000000000..633709ec57d9 --- /dev/null +++ b/sys-libs/libomp/libomp-5.0.0.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +: ${CMAKE_MAKEFILE_GENERATOR:=ninja} +# (needed due to CMAKE_BUILD_TYPE != Gentoo) +CMAKE_MIN_VERSION=3.7.0-r1 +PYTHON_COMPAT=( python2_7 ) + +inherit cmake-multilib python-any-r1 + +DESCRIPTION="OpenMP runtime library for LLVM/clang compiler" +HOMEPAGE="https://openmp.llvm.org" +SRC_URI="https://releases.llvm.org/${PV/_//}/openmp-${PV/_/}.src.tar.xz" + +# Additional licenses: +# - MIT-licensed Intel code, +# - LLVM Software Grant from Intel. + +LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="hwloc ompt test" + +RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )" +# tests: +# - dev-python/lit provides the test runner +# - sys-devel/llvm provide test utils (e.g. FileCheck) +# - sys-devel/clang provides the compiler to run tests +DEPEND="${RDEPEND} + dev-lang/perl + test? ( + $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') + sys-devel/llvm + >=sys-devel/clang-3.9.0 + )" + +S=${WORKDIR}/openmp-${PV/_/}.src + +# least intrusive of all +CMAKE_BUILD_TYPE=RelWithDebInfo + +python_check_deps() { + has_version "dev-python/lit[${PYTHON_USEDEP}]" +} + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + +multilib_src_configure() { + local libdir="$(get_libdir)" + local mycmakeargs=( + -DLIBOMP_LIBDIR_SUFFIX="${libdir#lib}" + -DLIBOMPTARGET_LIBDIR_SUFFIX="${libdir#lib}" + -DLIBOMP_USE_HWLOC=$(usex hwloc) + -DLIBOMP_OMPT_SUPPORT=$(usex ompt) + # do not install libgomp.so & libiomp5.so aliases + -DLIBOMP_INSTALL_ALIASES=OFF + # disable unnecessary hack copying stuff back to srcdir + -DLIBOMP_COPY_EXPORTS=OFF + -DLIBOMP_TEST_COMPILER="$(type -P "${CHOST}-clang")" + ) + cmake-utils_src_configure +} + +multilib_src_test() { + # respect TMPDIR! + local -x LIT_PRESERVES_TMP=1 + + cmake-utils_src_make check-libomp +} diff --git a/sys-libs/libomp/libomp-5.0.9999.ebuild b/sys-libs/libomp/libomp-5.0.9999.ebuild new file mode 100644 index 000000000000..086e4db0217d --- /dev/null +++ b/sys-libs/libomp/libomp-5.0.9999.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +: ${CMAKE_MAKEFILE_GENERATOR:=ninja} +# (needed due to CMAKE_BUILD_TYPE != Gentoo) +CMAKE_MIN_VERSION=3.7.0-r1 +PYTHON_COMPAT=( python2_7 ) + +inherit cmake-multilib git-r3 python-any-r1 + +DESCRIPTION="OpenMP runtime library for LLVM/clang compiler" +HOMEPAGE="https://openmp.llvm.org" +SRC_URI="" +EGIT_REPO_URI="https://git.llvm.org/git/openmp.git + https://github.com/llvm-mirror/openmp.git" +EGIT_BRANCH="release_50" + +# Additional licenses: +# - MIT-licensed Intel code, +# - LLVM Software Grant from Intel. + +LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant" +SLOT="0" +KEYWORDS="" +IUSE="hwloc ompt test" + +RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )" +# tests: +# - dev-python/lit provides the test runner +# - sys-devel/llvm provide test utils (e.g. FileCheck) +# - sys-devel/clang provides the compiler to run tests +DEPEND="${RDEPEND} + dev-lang/perl + test? ( + $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') + sys-devel/llvm + >=sys-devel/clang-3.9.0 + )" + +# least intrusive of all +CMAKE_BUILD_TYPE=RelWithDebInfo + +python_check_deps() { + has_version "dev-python/lit[${PYTHON_USEDEP}]" +} + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + +multilib_src_configure() { + local libdir="$(get_libdir)" + local mycmakeargs=( + -DLIBOMP_LIBDIR_SUFFIX="${libdir#lib}" + -DLIBOMPTARGET_LIBDIR_SUFFIX="${libdir#lib}" + -DLIBOMP_USE_HWLOC=$(usex hwloc) + -DLIBOMP_OMPT_SUPPORT=$(usex ompt) + # do not install libgomp.so & libiomp5.so aliases + -DLIBOMP_INSTALL_ALIASES=OFF + # disable unnecessary hack copying stuff back to srcdir + -DLIBOMP_COPY_EXPORTS=OFF + -DLIBOMP_TEST_COMPILER="$(type -P "${CHOST}-clang")" + ) + cmake-utils_src_configure +} + +multilib_src_test() { + # respect TMPDIR! + local -x LIT_PRESERVES_TMP=1 + + cmake-utils_src_make check-libomp +} diff --git a/sys-libs/libomp/libomp-9999.ebuild b/sys-libs/libomp/libomp-9999.ebuild new file mode 100644 index 000000000000..2235d0cc45f0 --- /dev/null +++ b/sys-libs/libomp/libomp-9999.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +: ${CMAKE_MAKEFILE_GENERATOR:=ninja} +# (needed due to CMAKE_BUILD_TYPE != Gentoo) +CMAKE_MIN_VERSION=3.7.0-r1 +PYTHON_COMPAT=( python2_7 ) + +inherit cmake-multilib git-r3 python-any-r1 + +DESCRIPTION="OpenMP runtime library for LLVM/clang compiler" +HOMEPAGE="https://openmp.llvm.org" +SRC_URI="" +EGIT_REPO_URI="https://git.llvm.org/git/openmp.git + https://github.com/llvm-mirror/openmp.git" + +# Additional licenses: +# - MIT-licensed Intel code, +# - LLVM Software Grant from Intel. + +LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant" +SLOT="0" +KEYWORDS="" +IUSE="hwloc ompt test" + +RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )" +# tests: +# - dev-python/lit provides the test runner +# - sys-devel/llvm provide test utils (e.g. FileCheck) +# - sys-devel/clang provides the compiler to run tests +DEPEND="${RDEPEND} + dev-lang/perl + test? ( + $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') + sys-devel/llvm + >=sys-devel/clang-3.9.0 + )" + +# least intrusive of all +CMAKE_BUILD_TYPE=RelWithDebInfo + +python_check_deps() { + has_version "dev-python/lit[${PYTHON_USEDEP}]" +} + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + +multilib_src_configure() { + local libdir="$(get_libdir)" + local mycmakeargs=( + -DLIBOMP_LIBDIR_SUFFIX="${libdir#lib}" + -DLIBOMPTARGET_LIBDIR_SUFFIX="${libdir#lib}" + -DLIBOMP_USE_HWLOC=$(usex hwloc) + -DLIBOMP_OMPT_SUPPORT=$(usex ompt) + # do not install libgomp.so & libiomp5.so aliases + -DLIBOMP_INSTALL_ALIASES=OFF + # disable unnecessary hack copying stuff back to srcdir + -DLIBOMP_COPY_EXPORTS=OFF + -DLIBOMP_TEST_COMPILER="$(type -P "${CHOST}-clang")" + ) + use test && mycmakeargs+=( + -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" + -DLLVM_LIT_ARGS="-vv" + ) + cmake-utils_src_configure +} + +multilib_src_test() { + # respect TMPDIR! + local -x LIT_PRESERVES_TMP=1 + + cmake-utils_src_make check-libomp +} diff --git a/sys-libs/libomp/metadata.xml b/sys-libs/libomp/metadata.xml new file mode 100644 index 000000000000..ca91e84fce57 --- /dev/null +++ b/sys-libs/libomp/metadata.xml @@ -0,0 +1,16 @@ + + + + + voyageur@gentoo.org + Bernard Cafarelli + + + llvm@gentoo.org + + + Enable CPU affinity support via hwloc + Enable OpenMP Tools Interface support + + The OpenMP subproject of LLVM is intended to contain all of the components required to build an executing OpenMP program that are outside the compiler itself. + -- cgit v1.2.3