diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-06-29 10:15:54 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-06-29 10:15:54 +0100 |
commit | 9aa80713372911cec499b3adb2cd746790920916 (patch) | |
tree | b8e99dc5dd60ac2094a27cc52f74aada8df38f05 /sys-devel/llvm-roc | |
parent | b4d43e8c611df4a8061b6f88d9e9f6b1e3c83903 (diff) |
gentoo resync : 29.06.2021
Diffstat (limited to 'sys-devel/llvm-roc')
-rw-r--r-- | sys-devel/llvm-roc/Manifest | 12 | ||||
-rw-r--r-- | sys-devel/llvm-roc/files/llvm-roc-4.2.0-add_Object.patch | 11 | ||||
-rw-r--r-- | sys-devel/llvm-roc/files/llvm-roc-4.2.0-current_pos.patch | 28 | ||||
-rw-r--r-- | sys-devel/llvm-roc/llvm-roc-4.0.0-r2.ebuild | 2 | ||||
-rw-r--r-- | sys-devel/llvm-roc/llvm-roc-4.0.0.ebuild | 2 | ||||
-rw-r--r-- | sys-devel/llvm-roc/llvm-roc-4.0.1.ebuild | 2 | ||||
-rw-r--r-- | sys-devel/llvm-roc/llvm-roc-4.1.0.ebuild | 2 | ||||
-rw-r--r-- | sys-devel/llvm-roc/llvm-roc-4.2.0.ebuild | 92 |
8 files changed, 143 insertions, 8 deletions
diff --git a/sys-devel/llvm-roc/Manifest b/sys-devel/llvm-roc/Manifest index 6b84ba4a59b2..274490d56cc9 100644 --- a/sys-devel/llvm-roc/Manifest +++ b/sys-devel/llvm-roc/Manifest @@ -4,6 +4,8 @@ AUX llvm-roc-3.9.0-tensorflow.patch 1901 BLAKE2B 2fc2d2d77987e8a85c14e1190645f04 AUX llvm-roc-4.0.0-hip-location.patch 2956 BLAKE2B 9d139ea887f514ff62c1e0afbe1e27df617c9609f45356f77e851b76fa647a5153454effa5cd58813302c9d44a19aac0817376091c9009c6b06c56bbb2be455f SHA512 fb503f65ae109e81090e1cd92109110ce4b9fc875606ef0102f49ccc0b6e3aeae9970e5be308fd65510678e024fb731dcb037eb0644e2866108ac64cacbec428 AUX llvm-roc-4.0.0-remove-isystem-usr-include.patch 1187 BLAKE2B ec9043f7358373822c3f6ce53d267192470dfbf03cf649a0964bd93b8b843db8e0a794fee8bbf292f882a6a908d0fa26a1303e4b13d92233d60b6b41c461ce9f SHA512 c3e9f96cb393f702cebe4da8a18495b492ae7cab7877576f3f2a4e6555f77c499dff6eded623305c6939ccd2cd00307e1b5ee28f2c34c9fd3128568dbe88c887 AUX llvm-roc-4.1.0-fix-missing-include.patch 665 BLAKE2B f1bf71ef746cb7bf2671e8886c2c5d63889f0d7bdf7f5aff4568d83416a9f090f554e72250a3b362142963cab1d76688381eb23f9750c295a758a6de02cfa6de SHA512 d31f4f8b21b8d33ca1298bceb918bb1b7eb52421aea5691b4694634fb332dda5b99e9464808edc5833355dfa3b695bc12eb8b6c3d3657b75b6480fefebafa1b3 +AUX llvm-roc-4.2.0-add_Object.patch 439 BLAKE2B c59ab50959d94ea04d63b734d580f1e91e6fc12bab5ff94b2322a28388ffb2e9e2bd26905dc3095bc75c57248b6e9a0e8913a1d02054b06c7e5e3e72a05add93 SHA512 ed2ffebd3c79f2dbcdb77cbacffc9a546b35e11a7c523d524ad74b6b69eab7fca91e0d22af09bac42284865da1a332292dbe8a3df968e4364baf55996ea05823 +AUX llvm-roc-4.2.0-current_pos.patch 1217 BLAKE2B 693e79cb895918f5e1a56be8d6624c049e8aa5640c55c34fc3fe27f053b7642670310ece321548df58f23e73d145f00d5c95b1e462eee008070cf6a2fde1c66c SHA512 fa8f773ba230e01f83526e4ae644fb2e7aceae99720cb5219c1b22baaabc5008f9b0151aee4c44ba9a4415ef421a8bfeb268302ee70e8c56428bf56c08b15903 DIST llvm-rocm-ocl-3.10.0.tar.gz 123600166 BLAKE2B 9b69dab6c7d1a8dfe0d90c76b54446ec7f8ef6e59c74ad328208ac07dbf8836ae412dc5c32fdcbfc926a2488e81cd8afef71c3ebca6cd8ff745205028ab380d8 SHA512 3bb7dac13d89cadfb61a231564155f49021437b7c35eae8735b88ceae4a23b7950643f17e3bfebb0868621297202a04d41120d50ea52b6ad8980dabe9bc75509 DIST llvm-rocm-ocl-3.7.0.tar.gz 116973132 BLAKE2B c1cc8a3b95292d726626d3cb59ec1b96549682bfcbec16030e47cf1318c6ea01bc76f3349f012ce4f1e4d8b9fe192c51a025c2d08cf593622c61fe7c61969ba6 SHA512 0626075bedb3898c96c0bb0be7a2aba4662050a1c738115f661bedc03d744ace7a4581b55c6325060740c13a0e50e72e09272bb02c1186c2c4a40fc9b961dcbe DIST llvm-rocm-ocl-3.8.0.tar.gz 117004300 BLAKE2B 13c3213f0fb951fb9d574e8f6d76bb6c632fecadfe93dbe68a9720baa22e35aa3269deef8b533c5a5ff50a2c1ee3dd7a1ea0fae4b8ab8573ec5bfc5ca5d04f4f SHA512 4eca387a132c9d1237ebec7c80319e99c80088766209d05a697d09890f4a82c56ba5f48a5c8c8749bb051c177bb5eab67e00405b04d3191681d0ac7cf1ae868c @@ -12,13 +14,15 @@ DIST llvm-rocm-ocl-4.0.0.tar.gz 123595983 BLAKE2B 69dd47a50a53cf7d8168f872778bcd DIST llvm-rocm-ocl-4.0.1.tar.gz 123608276 BLAKE2B dd5a4d6bc198c7fb6fdc2514cd8c4533a2df6ded7a574c9b4762cda3cb65498a464a0e78427db94db05b468a29ce78d3d8131ac7c6e42953fc503896732474e3 SHA512 d23dceaee2badf46cda27aa725bce5b82bab2fba7d1c2220fedb4795eee455de5077b4ff7299ecd6850eeb0bbdb131ea12a699357f373aef818758d845550f04 DIST llvm-rocm-ocl-4.1.0.tar.gz 128913932 BLAKE2B 15a041ec7b9fec91e409c8ab98ff88f2d15ce58822aa8a77a26ff21416378a4a77a5904fce4e26c5447653da4ec2dbbb5bfec4ae70c72e8e64b2a5f5986ffb92 SHA512 8576e5a43754a9587613f166dc6cad18890812f07bfa55e563ab3de150b6f01ae1b5515aaaf4eef238a7f79e87890533ce791ef07528e4557ea8290c2642ebd3 DIST llvm-rocm-ocl-4.1.1.tar.gz 128914019 BLAKE2B 9806d1da497e9d9864fd015fc92f5e2d8a6077315d96538064357a38347bc9180948c65cdca9e29574b40f8df62c0660762731564822ac9e8b5364bebf016e43 SHA512 0e4c6b9b0c0330d58616f22d8ec6ebdd6c83aef9ce9968765ac56c022bcd76cba8af5a6cdfb47ed560b33cd67832ac5b026502357af6caec4ab699f1443163fd +DIST llvm-rocm-ocl-4.2.0.tar.gz 132337711 BLAKE2B f08781f881f2853cd551828ef9190c1253e33ca1bfb13aac790b6484838fe5481be9519609ea9cf4bc09a6c8631c54a567123dfe97c25498c51c464d215049de SHA512 694c37c707c84d18cddb92054d8d59e1eea82c9c9928d0111992cbae1421d6bb614a0889891993b444a821c35fa6e91c801ac8555761c2cd0803f89981475952 EBUILD llvm-roc-3.10.0.ebuild 1504 BLAKE2B 45a36c92ddd29b3e8c811db5476172a25847dab08436d03e3680c770494462257f31f30147744dcf18ca6364c24378b8f7723af20ee7675fe16511029a0cb869 SHA512 629d3193ece5023b0eaa12a70da8f003900d90bcccea1b8363f7dace8b559f16680e618a6e90932e60013a620ce2e2b2a6b4419494d411260a21eb15845fd4e1 EBUILD llvm-roc-3.7.0-r1.ebuild 1365 BLAKE2B a958e69206d2a91c93668c236bcd3fea12a80fc1860a58b92268a2deb546a4602a1863cbbfa1187afd0158303898def84cba1561a5b3e6c9af0e74e49c15e686 SHA512 a584e3f0816108d378115685329aec5eda07d8c944d532ba48499225d9ceaf043e1c341ea7762f26d35e241143671dafc7b13f48127f9f5236a5e5c5f38793d0 EBUILD llvm-roc-3.8.0.ebuild 1460 BLAKE2B 6582c682c3e0d648bc948aeb6214ae0cc578e9a7ff78c393186a22ca2535288924770a2590fe4d32787f25489ab5c537548a2b39fc5235e8d8b61f5833f4c1d3 SHA512 81a7adc423792f0eb23195eab9747ae04426f73238d82e19d2d03d7fbbbf81df946478cf12e9a75019edd6871b441cae1aebfb085ced8624e64921fa5e760bdb EBUILD llvm-roc-3.9.0.ebuild 1497 BLAKE2B e8b091329f9b3f4b865980dcd93897e28be2dff5c526448b33b06c994dcefcee3f95007ca499f1f1547acde9e065ecfac5095035966f6587f7263806c6b1369b SHA512 7e0cd4d606002321fddc3b4e50832a0b38e0846563f9e3511b8a4b73c791a44eb7042504f3283191682f38d6abdd5f55e8a29684371e5d65272bb0615918ae5f -EBUILD llvm-roc-4.0.0-r2.ebuild 2342 BLAKE2B 145b9265005c6a8cdd79e57ab157dd99406d662b25b94d80c58e7fdc03b5a84384bfa5c0fc7bb70e467d1adb09b8d4e653011ca61c20fb35d3a765ab6b70a796 SHA512 3ae5533b811223aafeee47322391f902abc4d2b088646640cd2b4599b3ec3db225126ad315a9f76c21a2ae824407d9e02e81a3a6fd9f3c01d5d9f9be8b1f2e04 -EBUILD llvm-roc-4.0.0.ebuild 2177 BLAKE2B 7a0215db387ab35174e52cc76be2af48663c3b6d234bf7383e79a749200d625156fd4d842c8880bc32fac00e1914d9614814c7db141e866809af7e477b517dcc SHA512 8441f3e213d08eadd7435f62a1b73f64badb8a4d47c043d53030dc7840a33279d3055dad50b9d6f25d7f3747dc04ea77c91931455e771f40cd21288b9d176aa1 -EBUILD llvm-roc-4.0.1.ebuild 2342 BLAKE2B 145b9265005c6a8cdd79e57ab157dd99406d662b25b94d80c58e7fdc03b5a84384bfa5c0fc7bb70e467d1adb09b8d4e653011ca61c20fb35d3a765ab6b70a796 SHA512 3ae5533b811223aafeee47322391f902abc4d2b088646640cd2b4599b3ec3db225126ad315a9f76c21a2ae824407d9e02e81a3a6fd9f3c01d5d9f9be8b1f2e04 -EBUILD llvm-roc-4.1.0.ebuild 2351 BLAKE2B a7b31d1ce044d5e5b5ff1c416757858bf849e5eb46ee5a9b90464c64f04515dc57da2ac02a228f4ea63d2abf83d2605c009898d3ea696932be147f8c1e3088e5 SHA512 63296983021cfd9e2214109dd0499dba23fdbe6e10be2804a6e0c591c7bff79154e3ea43607b480ca4c4346542dd273f9010200b2e603532b7e4d54b0ce1c1ce +EBUILD llvm-roc-4.0.0-r2.ebuild 2344 BLAKE2B d195d63018e995832f513b50ad0f2ac75634922da0d525a1b5ceed604cb01c17d256b8a8ebed94c4a598f83ff6b92f61a14014de48d293b608bb5b93d1b76e18 SHA512 76ebc208e2fac302c79ee41371156515531ec6b5f8bc1db7659077518ee8c53a5756b5b3f77c7484dacaa033b8ef8aca6a65723d6c7b47f70334a98866b59939 +EBUILD llvm-roc-4.0.0.ebuild 2179 BLAKE2B 62e5d8e3653c8d6059f3ad25781f7d3b41206ae5f27ce72db2433d6c73477aa01054309ebfb9d6db692965dd59b4c182a47bf1c95d4832c28db6e9e61bff3994 SHA512 50c89dedc33d17da583a96bedc21b2c82ad5b1da2f6b1eca524df5e6044d027752b5d6b4f36e3cbeb9e4f67c58a8ea77adf89b834fc8595a3cda4cd6a8b82a7c +EBUILD llvm-roc-4.0.1.ebuild 2344 BLAKE2B d195d63018e995832f513b50ad0f2ac75634922da0d525a1b5ceed604cb01c17d256b8a8ebed94c4a598f83ff6b92f61a14014de48d293b608bb5b93d1b76e18 SHA512 76ebc208e2fac302c79ee41371156515531ec6b5f8bc1db7659077518ee8c53a5756b5b3f77c7484dacaa033b8ef8aca6a65723d6c7b47f70334a98866b59939 +EBUILD llvm-roc-4.1.0.ebuild 2353 BLAKE2B 0ad6a859369212effe46aa857af8902d2be4113ff00b7760c79c4372c31f4c08e217b928fa06938e9aa9f4859677c6dc7b6624fe19b42b1477c238ec31c2b0df SHA512 2075d70c1d396a7a09a570480dfe054236ec987bf2b95059a85a0011e2c82f9dbc0d0a66ec61a93b5954ecfd5a6061cf742b51edf574754e3876e92733d458be EBUILD llvm-roc-4.1.1.ebuild 2392 BLAKE2B 6991a50a82746c051c1084f0e4794c31347fc792a7da6ba791cc09fe16de7394cdf70edc50da73db0db8db5e554c6d8cd41f087c47b9dec0d60bb9f8ac98f9fb SHA512 489431911aa16544645387b13a6296000b7171bd0910065bd778d87ef5b1db33f26d40ca4d6ea88998a7ed932603ceba41eea5c11b1ffb09890c5d530f64b644 +EBUILD llvm-roc-4.2.0.ebuild 2297 BLAKE2B 2eb247cd933fa4c0f99b238d89f42e2d317651e041123b0c9212c3ee855b4a1078936f9f5bbb478ddc275faa20a02d53f4ed23988c5b7296ca5b65e230e66c9a SHA512 f72043e690c646ddea8ff1af55c2f8996aaa933310feed4166df30ac422d1d96ca8ec2816786d5838be0dcff066e01f3c994e14987a4330c16bc5f97442f0999 MISC metadata.xml 461 BLAKE2B 5a060c417f0bb9bf1fba8375292e7bff20b2c50c3a2ab490bd436f81a954dbd370d61ba59b305b8bdaad9887e9c6a872eb30fea31c566dc6d74d3493b40d0a26 SHA512 a82c2186fc0642dab37608155dcf0aafd20701cb7e2769c6eb3aae88d4df6690743769a75f47efdb36fd8a3d6771f0feecd3efd01c98460fe195394c16d95660 diff --git a/sys-devel/llvm-roc/files/llvm-roc-4.2.0-add_Object.patch b/sys-devel/llvm-roc/files/llvm-roc-4.2.0-add_Object.patch new file mode 100644 index 000000000000..da21ab2fc85a --- /dev/null +++ b/sys-devel/llvm-roc/files/llvm-roc-4.2.0-add_Object.patch @@ -0,0 +1,11 @@ +diff --color -uprN orig/lib/Target/AMDGPU/Disassembler/CMakeLists.txt llvm/lib/Target/AMDGPU/Disassembler/CMakeLists.txt +--- orig/lib/Target/AMDGPU/Disassembler/CMakeLists.txt 2021-06-14 11:57:54.222796911 +0800 ++++ llvm/lib/Target/AMDGPU/Disassembler/CMakeLists.txt 2021-06-14 11:58:35.206796875 +0800 +@@ -11,6 +11,7 @@ add_llvm_component_library(LLVMAMDGPUDis + MC + MCDisassembler + Support ++ Object + + ADD_TO_COMPONENT + AMDGPU diff --git a/sys-devel/llvm-roc/files/llvm-roc-4.2.0-current_pos.patch b/sys-devel/llvm-roc/files/llvm-roc-4.2.0-current_pos.patch new file mode 100644 index 000000000000..0f3398951b07 --- /dev/null +++ b/sys-devel/llvm-roc/files/llvm-roc-4.2.0-current_pos.patch @@ -0,0 +1,28 @@ +diff -Naur a/include/llvm/Support/raw_ostream.h b/include/llvm/Support/raw_ostream.h +--- a/include/llvm/Support/raw_ostream.h 2021-05-22 19:56:44.779955686 +0200 ++++ b/include/llvm/Support/raw_ostream.h 2021-05-22 20:00:49.449954752 +0200 +@@ -610,9 +610,7 @@ + /// See raw_ostream::write_impl. + void write_impl(const char *Ptr, size_t Size) override; + +- /// Return the current position within the stream, not counting the bytes +- /// currently in the buffer. +- uint64_t current_pos() const override { return OS.size(); } ++ uint64_t current_pos() const override; + + public: + explicit raw_string_ostream(std::string &O) : OS(O) { +diff -Naur a/lib/Support/raw_ostream.cpp b/lib/Support/raw_ostream.cpp +--- a/lib/Support/raw_ostream.cpp 2021-05-22 19:59:05.651955148 +0200 ++++ b/lib/Support/raw_ostream.cpp 2021-05-22 20:01:22.929954625 +0200 +@@ -938,6 +938,10 @@ + // raw_string_ostream + //===----------------------------------------------------------------------===// + ++/// Return the current position within the stream, not counting the bytes ++/// currently in the buffer. ++uint64_t raw_string_ostream::current_pos() const { return OS.size(); } ++ + raw_string_ostream::~raw_string_ostream() { + flush(); + } diff --git a/sys-devel/llvm-roc/llvm-roc-4.0.0-r2.ebuild b/sys-devel/llvm-roc/llvm-roc-4.0.0-r2.ebuild index 9e962ecd02d5..1c7a0fec0170 100644 --- a/sys-devel/llvm-roc/llvm-roc-4.0.0-r2.ebuild +++ b/sys-devel/llvm-roc/llvm-roc-4.0.0-r2.ebuild @@ -39,7 +39,7 @@ src_prepare() { pushd "${S}"/../clang >/dev/null || die sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" CMakeLists.txt eend $? - ebegin "Use ${EPREFIX} as default sysroot" + ebegin "Use "${EPREFIX}" as default sysroot" cd lib/Driver/ToolChains >/dev/null || die ebegin "Use dynamic linker from ${EPREFIX}" sed -i -e "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" Linux.cpp diff --git a/sys-devel/llvm-roc/llvm-roc-4.0.0.ebuild b/sys-devel/llvm-roc/llvm-roc-4.0.0.ebuild index ac8ba78ad58c..3967ddabbea5 100644 --- a/sys-devel/llvm-roc/llvm-roc-4.0.0.ebuild +++ b/sys-devel/llvm-roc/llvm-roc-4.0.0.ebuild @@ -38,7 +38,7 @@ src_prepare() { sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" CMakeLists.txt eend $? - ebegin "Use ${EPREFIX} as default sysroot" + ebegin "Use "${EPREFIX}" as default sysroot" cd lib/Driver/ToolChains >/dev/null || die ebegin "Use dynamic linker from ${EPREFIX}" sed -i -e "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" Linux.cpp diff --git a/sys-devel/llvm-roc/llvm-roc-4.0.1.ebuild b/sys-devel/llvm-roc/llvm-roc-4.0.1.ebuild index 9e962ecd02d5..1c7a0fec0170 100644 --- a/sys-devel/llvm-roc/llvm-roc-4.0.1.ebuild +++ b/sys-devel/llvm-roc/llvm-roc-4.0.1.ebuild @@ -39,7 +39,7 @@ src_prepare() { pushd "${S}"/../clang >/dev/null || die sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" CMakeLists.txt eend $? - ebegin "Use ${EPREFIX} as default sysroot" + ebegin "Use "${EPREFIX}" as default sysroot" cd lib/Driver/ToolChains >/dev/null || die ebegin "Use dynamic linker from ${EPREFIX}" sed -i -e "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" Linux.cpp diff --git a/sys-devel/llvm-roc/llvm-roc-4.1.0.ebuild b/sys-devel/llvm-roc/llvm-roc-4.1.0.ebuild index e571fd4ca56c..68df2726a379 100644 --- a/sys-devel/llvm-roc/llvm-roc-4.1.0.ebuild +++ b/sys-devel/llvm-roc/llvm-roc-4.1.0.ebuild @@ -39,7 +39,7 @@ src_prepare() { pushd "${S}"/../clang >/dev/null || die sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" CMakeLists.txt eend $? - ebegin "Use ${EPREFIX} as default sysroot" + ebegin "Use "${EPREFIX}" as default sysroot" cd lib/Driver/ToolChains >/dev/null || die ebegin "Use dynamic linker from ${EPREFIX}" sed -i -e "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" Linux.cpp diff --git a/sys-devel/llvm-roc/llvm-roc-4.2.0.ebuild b/sys-devel/llvm-roc/llvm-roc-4.2.0.ebuild new file mode 100644 index 000000000000..7a2834b7dd3c --- /dev/null +++ b/sys-devel/llvm-roc/llvm-roc-4.2.0.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake + +DESCRIPTION="Radeon Open Compute llvm,lld,clang" +HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm/" +SRC_URI="https://github.com/RadeonOpenCompute/llvm-project/archive/rocm-${PV}.tar.gz -> llvm-rocm-ocl-${PV}.tar.gz" + +LICENSE="UoI-NCSA rc BSD public-domain" +SLOT="0" +KEYWORDS="~amd64" +IUSE="debug +runtime" + +RDEPEND="virtual/cblas + dev-libs/libxml2 + sys-libs/zlib + sys-libs/ncurses:=" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/llvm-project-rocm-${PV}/llvm" + +PATCHES=( + "${FILESDIR}/${PN}-4.2.0-current_pos.patch" + "${FILESDIR}/${PN}-4.2.0-add_BinaryFormat.patch" +) + +CMAKE_BUILD_TYPE=RelWithDebInfo + +src_prepare() { + cd "${WORKDIR}/llvm-project-rocm-${PV}" || die + eapply "${FILESDIR}/${PN}-3.0.0-add_libraries.patch" + eapply "${FILESDIR}/${PN}-4.0.0-remove-isystem-usr-include.patch" + + if [[ -n ${EPREFIX} ]]; then + pushd "${S}"/../clang >/dev/null || die + sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" CMakeLists.txt + eend $? + ebegin "Use "${EPREFIX}" as default sysroot" + cd lib/Driver/ToolChains >/dev/null || die + ebegin "Use dynamic linker from ${EPREFIX}" + sed -i -e "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" Linux.cpp + eend $? + + ebegin "Remove --sysroot call on ld for native toolchain" + sed -i -e "$(grep -n -B1 sysroot= Gnu.cpp | sed -ne '{1s/-.*//;1p}'),+1 d" Gnu.cpp + eend $? + popd >/dev/null || die + fi + + # handled by sysroot, don't prefixify here. + sed -e 's:/opt/rocm:/usr/lib/hip:' \ + -i "${S}"/../clang/lib/Driver/ToolChains/AMDGPU.cpp + + eapply_user + cmake_src_prepare +} + +src_configure() { + PROJECTS="clang;lld" + + if usex runtime; then + PROJECTS+=";compiler-rt" + fi + + local mycmakeargs=( + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/roc" + -DLLVM_ENABLE_PROJECTS="${PROJECTS}" + -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86" + -DLLVM_BUILD_DOCS=NO + -DLLVM_ENABLE_OCAMLDOC=OFF + -DLLVM_ENABLE_SPHINX=NO + -DLLVM_ENABLE_DOXYGEN=OFF + -DLLVM_INSTALL_UTILS=ON + -DLLVM_VERSION_SUFFIX=roc + -DOCAMLFIND=NO + ) + + use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" + + cmake_src_configure +} + +src_install() { + cmake_src_install + cat > "99${PN}" <<-EOF + LDPATH="${EROOT}/usr/lib/llvm/roc/lib" + EOF + doenvd "99${PN}" +} |