diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-07-09 15:43:36 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-07-09 15:43:36 +0100 |
commit | 2719f73b6813d11d13a9650cdd2ab8ec6e69385d (patch) | |
tree | 8c816148bcbd22757d892089c989ae614eae4f5a /dev-util/hip | |
parent | 0f558761aa2dee1017b4751e4017205e015a9560 (diff) |
gentoo resync : 09.07.2022
Diffstat (limited to 'dev-util/hip')
-rw-r--r-- | dev-util/hip/Manifest | 3 | ||||
-rw-r--r-- | dev-util/hip/files/hip-5.0.2-correct-ldflag.patch | 18 | ||||
-rw-r--r-- | dev-util/hip/hip-5.0.2-r2.ebuild | 17 |
3 files changed, 36 insertions, 2 deletions
diff --git a/dev-util/hip/Manifest b/dev-util/hip/Manifest index a85e685cf06e..1cbe026b76a3 100644 --- a/dev-util/hip/Manifest +++ b/dev-util/hip/Manifest @@ -10,6 +10,7 @@ AUX hip-4.2.0-config-cmake-in.patch 588 BLAKE2B 98081d4caa593756c966b8eff9e3a306 AUX hip-4.3.0-hip_vector_types.patch 304 BLAKE2B 2821fb3bc7aa093a2f17fbb8baff8c5d68080f61a8636163d0c69463390f0ff553a0b67aa0a5879edbfd54a6afdae81325a8eaf58fb89cb6168cf6ccc5cc9208 SHA512 6d32cc886229d94b18b9779f30e81bb2e9cf51bd47385dc692ae49dd308de16e229a2fc560e5c40dad15f1c9c75038f13960754e0dbc57b3f281e5dfa6701f6c AUX hip-5.0.1-DisableTest.patch 1689 BLAKE2B dd25393370a594abd3cb6fe8abab6481c2c544edb3f84c7b6481501fd5c2cd33970245cb38d148c5218915a67a8c1d24fde14a5a5c47ed809c613ec78b6d25c7 SHA512 6932af7662b067766b6566f858dba9606818757070b642778d559b83052097ee2ecedb1ae0184ab000c7b068b5413201bb5521e0aa3bf090df369139f292306e AUX hip-5.0.1-hip_vector_types.patch 312 BLAKE2B fb5a61a73e741e2456c031adc9c2e96fdccb5b88a3d99e6b4d31a9b53897f6ccbb41c9535296b55512055f0581a394289bae31036d3b7c07a8081e88708b9a19 SHA512 2ab41b46baf0f8adcb82f55b7ebfcfa3097159b7317d2609b490c0406ba47728c37531c03b0a4e474d760776cf7b614e32ccab45c769ce2fb8e54fcdffa61f5a +AUX hip-5.0.2-correct-ldflag.patch 1117 BLAKE2B 8d11bc278660fb7e14585822a462de96ebca78bf5cec026c8097fa2b9eef87f3d4fd21641d0cfe77f217067bc161b6ece94eb55de71611f106243c8bd41b157c SHA512 1d4b46f941f5b3115705a416822b2a7c034ca6611a7706bc126902e5130239dcf84624f35624f9c7b952314c1d76fcba3f17e40ceb2574b4b37bddada073f808 AUX hip-5.0.2-set-build-id.patch 741 BLAKE2B 9d4668ab770fd1ebc93a19a3ddc2916e8feb69a95e54ceb5955c4a162733b8899d43f906c86b0b994add22ab46969ff18aad03035e6285a6492bc9c1405bce38 SHA512 714b2f8e791f0e30a7af567e430e2bba38473725e0d96e42de0c97a2ba939fd83b2f233eebf03cb8a6a82d10c46cfa5ea869af97f35c02da38924250a19e660a AUX hipvars-5.0.2.pm 590 BLAKE2B b67de8f86bc53d9fbcd50a9cfa9759feb0145f3b3e40360cc322676411e038ff21b8f81265ba27d099e51c3dc55230f87c477cbadfba2b48c08978216f2fbd81 SHA512 0becd625e6f34d687338e25ca4697e68a735a1df60a4c2c53f577e7999a34bc07041f513632f9534aa4b35da2cf50b02c96187f69fd183bff893343257aa85b9 AUX hipvars.pm 598 BLAKE2B 1645b12179195b95757d207248c85b7c8d9eda0347caee5cb48bdc66e85fda517f607bcb69cdfc63657a0db04ad8e96494a0a80268df7c17d6bb0e689325c2e8 SHA512 6c4e71455341673a329b4b0163fefd7f2f4b7d62da3496643d0de096755899c99b3b5a80fffbdf29896c234cb4f617b368217f4eecfd005849b294ff434b79c6 @@ -32,5 +33,5 @@ EBUILD hip-4.2.0.ebuild 3634 BLAKE2B 6ab4a5d74b08a2dd765bae85bb91fa7174cb0fbe411 EBUILD hip-4.3.0-r1.ebuild 3782 BLAKE2B b3f7e96b664662e9cdae955993251af254cd44f66e9a4306035875eaed8f507badca6c357bf4fa82e93e76eefdbdf7923de5f56a9eeee762c7ba364abff2b1e7 SHA512 97f34852764c8810eb093ee2aa09f3484382f5a0af5f21543020138bcd8cc40838480a03b1ea88be8044bca71500bf746ed768749e6c71e939b8438f569bd8cb EBUILD hip-4.3.0-r2.ebuild 3978 BLAKE2B 16ffbeddfdd5c6d0338e5be1fd609272bb4d00e1a5d1530a00a75d82a5882f52fc0bfd97b14bf9042affa4af4617507a5cd1b8d8f90a1f4c8744028ab63b7f38 SHA512 e664a11e69cc4a7629a8f088992d2e26517635d1f4e685d8dac69e74e6f94e8c1f782f09d0f54308b73c134021579a624bfa2ba8ecac3c470ab81cb317dcb67a EBUILD hip-4.3.0.ebuild 3761 BLAKE2B 7fdd7e65a7b1b246ad94a1e5ee37e7c3199f9dcc02df575e774fdbacf9690ac7609f53c122eff5dd87cddf9afd9c4f52d66a5502b3ec311fd6e9db5f3889a895 SHA512 07d8317cae9f7b2f4c179938477eb00ff8d0a136c730bd18582a835c23a8d9934d03824c2bb520c53cb1c2525e26618236b12dfcbfe520612a60c191a1d2947b -EBUILD hip-5.0.2-r2.ebuild 4516 BLAKE2B 4d49a096527c27bd77365022a7dca407e6a4a10c6f04b294fd96c7910fd41aa10e3c14715ad5630b2f975a3622402449b8d7bf848eaeca17b54bdc221bf8b3d7 SHA512 0f2dba482017db043c56d25bbbafc9af1f58fc1d63cfcda9d8fce606699ba191b8d8f37f514e94130d1ee4846cac0d4fe86c089619d0d8a4e4f60fefb7affa8a +EBUILD hip-5.0.2-r2.ebuild 4885 BLAKE2B a5b5c0cd40d1ae31d15ba4d774bfc6ce744b06025b08114976b6aa24758f5880eadf0cdd0b483d80469f6afd953beca56bf5dd6e8c79af111bbbe490baa876bb SHA512 00708d55c02c65cba95b009e3e14006901f92ea1ba8a08a32c25996e04613f4d6237c3b9ba0b1e2c237ad8269282fad39e17ef67b2319fb64bbe6ae9654f5748 MISC metadata.xml 597 BLAKE2B cca1b105463e26741aa4bf95c9d85dd582df075795646f633ed5f0d39bace0b07be98f771aa8eb1b89984788249837303b67617e92c4076eb7601611cd2abf6d SHA512 42767156ae0e89b3ce438bfb163161b543e15114838a5c14b4b1c889fe799e44dd9bf9684ee685798a1fc5d2d4c520d3c42c9c74a88178a079ccb634148e0738 diff --git a/dev-util/hip/files/hip-5.0.2-correct-ldflag.patch b/dev-util/hip/files/hip-5.0.2-correct-ldflag.patch new file mode 100644 index 000000000000..81d1bc3b8552 --- /dev/null +++ b/dev-util/hip/files/hip-5.0.2-correct-ldflag.patch @@ -0,0 +1,18 @@ +This removes ldflag -L"/usr/lib" and -Wl,-rpath=/usr/lib:/usr/lib which +causes `ld: skipping incompatible /usr/lib/libm.so when searching for -lm` +Reference: https://github.com/justxi/rocm/issues/8#issuecomment-1166193820 +=================================================================== +--- HIP-rocm-5.1.3.orig/bin/hipcc.pl ++++ HIP-rocm-5.1.3/bin/hipcc.pl +@@ -703,9 +703,9 @@ if ($HIP_PLATFORM eq "amd") { + + if (not $isWindows and not $compileOnly) { + if ($linkType eq 0) { +- $toolArgs = " -L$HIP_LIB_PATH -lamdhip64 -L$ROCM_PATH/lib -lhsa-runtime64 -ldl -lnuma " . ${toolArgs}; ++ $toolArgs = " -lamdhip64 -lhsa-runtime64 -ldl -lnuma " . ${toolArgs}; + } else { +- $toolArgs = " -Wl,--enable-new-dtags -Wl,-rpath=$HIP_LIB_PATH:$ROCM_PATH/lib -lamdhip64 " . ${toolArgs}; ++ $toolArgs = " -Wl,--enable-new-dtags -lamdhip64 " . ${toolArgs}; + } + # To support __fp16 and _Float16, explicitly link with compiler-rt + $HIP_CLANG_BUILTIN_LIB="/opt/gentoo/opt/gentoo/usr/lib/llvm/14/bin/../../../../lib/clang/14.0.6/lib/$HIP_CLANG_TARGET/libclang_rt.builtins.a"; diff --git a/dev-util/hip/hip-5.0.2-r2.ebuild b/dev-util/hip/hip-5.0.2-r2.ebuild index 223386227084..fd069acfe4b4 100644 --- a/dev-util/hip/hip-5.0.2-r2.ebuild +++ b/dev-util/hip/hip-5.0.2-r2.ebuild @@ -2,7 +2,10 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=8 -inherit cmake prefix + +PYTHON_COMPAT=( python3_{8..11} ) + +inherit cmake prefix python-any-r1 DESCRIPTION="C++ Heterogeneous-Compute Interface for Portability" HOMEPAGE="https://github.com/ROCm-Developer-Tools/hipamd" @@ -29,6 +32,10 @@ DEPEND=" RDEPEND="${DEPEND} dev-perl/URI-Encode dev-libs/roct-thunk-interface:${SLOT}" +BDEPEND="profile? ( $(python_gen_any_dep ' + dev-python/CppHeaderParser[${PYTHON_USEDEP}] + ') ) +" PATCHES=( "${FILESDIR}/${PN}-5.0.1-DisableTest.patch" @@ -38,6 +45,12 @@ PATCHES=( "${FILESDIR}/${PN}-5.0.2-set-build-id.patch" ) +python_check_deps() { + if use profile; then + has_version "dev-python/CppHeaderParser[${PYTHON_USEDEP}]" + fi +} + S="${WORKDIR}/hipamd-rocm-${PV}" HIP_S="${WORKDIR}"/HIP-rocm-${PV} OCL_S="${WORKDIR}"/ROCm-OpenCL-Runtime-rocm-${PV} @@ -65,11 +78,13 @@ src_prepare() { sed -e "/LIBRARY DESTINATION/s:lib:$(get_libdir):" -i src/CMakeLists.txt || die cd ${HIP_S} || die + eapply "${FILESDIR}/${PN}-5.0.2-correct-ldflag.patch" # Setting HSA_PATH to "/usr" results in setting "-isystem /usr/include" # which makes "stdlib.h" not found when using "#include_next" in header files; sed -e "/FLAGS .= \" -isystem \$HSA_PATH/d" \ -e "/HIP.*FLAGS.*isystem.*HIP_INCLUDE_PATH/d" \ -e "s:\$ENV{'DEVICE_LIB_PATH'}:'/usr/lib/amdgcn/bitcode':" \ + -e "s:\$ENV{'HIP_LIB_PATH'}:'/usr/$(get_libdir)':" \ -e "/rpath/s,--rpath=[^ ]*,," \ -i bin/hipcc.pl || die |