diff options
Diffstat (limited to 'dev-libs/rocr-runtime')
-rw-r--r-- | dev-libs/rocr-runtime/Manifest | 5 | ||||
-rw-r--r-- | dev-libs/rocr-runtime/files/rocr-runtime-5.7.1-musl.patch | 106 | ||||
-rw-r--r-- | dev-libs/rocr-runtime/rocr-runtime-5.7.1-r2.ebuild (renamed from dev-libs/rocr-runtime/rocr-runtime-5.7.1-r1.ebuild) | 9 | ||||
-rw-r--r-- | dev-libs/rocr-runtime/rocr-runtime-6.0.0-r1.ebuild (renamed from dev-libs/rocr-runtime/rocr-runtime-6.0.0.ebuild) | 7 |
4 files changed, 118 insertions, 9 deletions
diff --git a/dev-libs/rocr-runtime/Manifest b/dev-libs/rocr-runtime/Manifest index df4fef57f7a3..5b45191c1e1d 100644 --- a/dev-libs/rocr-runtime/Manifest +++ b/dev-libs/rocr-runtime/Manifest @@ -1,6 +1,7 @@ AUX rocr-runtime-4.3.0_no-aqlprofiler.patch 1084 BLAKE2B dfc2b9bbea0360fdbbd04988f0dbed76e53d8d9f9d2a5217f154e02e39f7b78f3408edb0204a93b6b4e927103b2c041788bd6befb8475d3f4e333bdc6ad19a0d SHA512 f90b92eb547640bc8cf71d042f12a55504371e4c3e624b02435c026e7ae9d5885e23a2be3a0f5c443fc502b3a1c8a03fdb5efabaeaabe8be33a28aab3ac9d9ca AUX rocr-runtime-5.0.1-cmake-install-paths.patch 2744 BLAKE2B fbbecdefbfabcbe4cd7f029e10d6abed94b492f94157839336adf83e98efe5c0e93dbb20856ca6adab32cb315bbd7b6c397c8fc48b66ea784cdbb3becb5f718e SHA512 db7ee8b87b526991a62c3cbfd385e85d27e05ba9a7f4726e8060d7ad29917e154bdcd0715e61a08210dad4b6112c731dfcab9e9f7e809b74da2f74c62a1eab72 AUX rocr-runtime-5.7.1-extend-isa-compatibility-check.patch 3006 BLAKE2B 91de5e4c427678aa8623c1663dd044a2fde1f46ff450d167f516fb618ccdfe71713f3309146766350de171b43ecdab82fa7cc89ccf9bf2481b7f0c6e724fa8dc SHA512 2646741d75829ca22a142f520635586312884617e1747e53b9fa1e0f226e5ab7353b99c905a8cc0d6eda9bd74fb763b5e38e66e1ca342375444744393268c18a +AUX rocr-runtime-5.7.1-musl.patch 3609 BLAKE2B 563a831a23f8d9515cca9cafc67355e631714c1f3f1eb02de02dd463db3da29cf75b055a8d3cb123a50039540941739e77a16dbdf8d16253785bec31e1577ad5 SHA512 99939293225a1015c280bbf1a01ea8e4cf53c2370ad940fa3b73c87ba84f87d24cd635e7dec4b5b6c28e25adc5ff6ccd7bee4ddec53e6b10c21bc7d9ae6bf73d DIST rocr-runtime-5.1.3.tar.gz 720567 BLAKE2B bdf2d258ec607ffc69264d48ce82c36787757b7809397d643a24abaa852f3cc217a57210fba760d4d11ef8ce2922dc1ef275d3b47a4bebc5c7b204bbbb5b7c66 SHA512 d47523ea2fe32fee832ca19b56a091f52e16b366db1c571f87e5599514b826376d49281e79ff0936dcaf7349f9becbc8ae9b3e9472a9c3e14b62a3f98d541b35 DIST rocr-runtime-5.3.3.tar.gz 809871 BLAKE2B 1a44e88c34fcebcea3351de812f2ac64a7b151303c5bfc4066920755c185731388afff89c705afee6010d262f68358a20b1c0197e8f23c22ab24409eb55fde0a SHA512 27efe57954575549703b31c4a632548bf3d82df0f01d5f15485d0bda7efa6ec2ad0a4a8710b8f240ff57296eb62d3796926e32d16dfe448b188d8264fde0ef8b DIST rocr-runtime-5.4.3.tar.gz 811062 BLAKE2B 4ee8ef49cdac7f6918db3aa96089852847d093aacc11ed7e7157a6eb512cf36a3d37396670c14ea24b16b1127c4547977390694d05bc6006ac48b40e707d6dae SHA512 29f13a1b16ef457071cc050227d57cda92992f416ebc074f8cd5a856d9bd76fd34ab2ccb53c21c3d798165282d44bba287ef44a9d1da327ee198e1facc77a4db @@ -11,6 +12,6 @@ EBUILD rocr-runtime-5.1.3-r1.ebuild 1489 BLAKE2B bddcaa60234f530822d4f96ea90c4c1 EBUILD rocr-runtime-5.3.3-r1.ebuild 1556 BLAKE2B 4554d25ea988cb2c4b0520691544525288cb57dbaf53b79e06552f3f3c508f52efb9a796f8f1b4fca6e98984ad56ec6c29f50b1777a7f324d0a870ef911a3773 SHA512 861e2b6f917698fa2a0a6bdcfe988c18a1bd2a7b2f5a036cdf09af161b244534ce0daa596dc2a5073e586132a14fdc58128f867f83adeef31355402de607db30 EBUILD rocr-runtime-5.4.3-r1.ebuild 1767 BLAKE2B 56cac1aa980f509aace3c24344384375f6896f889d24a48ffed04db8f2e7f6a23bf1f5abb1511f1bc624e6b94e00b1147c8996cbb16cb7a4adde6c5a65eba68b SHA512 f41eb9d3621681723276e569e3d663c9bcff4834127a4f6e346486814f1f4f49a6a5be8f14409ff9514798455f22766a1ed4dc8b6a6ea2d02f2ce8f5de53d6b5 EBUILD rocr-runtime-5.5.1.ebuild 1767 BLAKE2B d40d4db7f5d5609fc324944e64df866acdde567f5be2f85006ae0c1f56180e5c0c7e4ebcc87e884c5dd824111886b46a72a368eb66e7cb9c694e2d2398182d83 SHA512 c443449775b064e691aaa068903b8fd65e710e447fe88d2a33a7a22e5a2eca22fc1b18985ce8d7c20e49fc6c33fba7fe0fa7ec0ce884c0775f5c53963a12210c -EBUILD rocr-runtime-5.7.1-r1.ebuild 1859 BLAKE2B 06897559fc90982ab8ee3b239a8dabc4acff310043fa0a2d7bbdccf2bdc874bca9dda75c71a64b66f3035c085d4b7711c3ca38551173fdaea8692ab2d0779bb3 SHA512 46833d46b8f4aee9dd8c9be24ba6c8c0d1d31113eae9b4c4f0b26b81b43b8a0228cde2012bca5139e20bd577d28ff3483ea08e9a54b7c1da34dc633d807c9ef5 -EBUILD rocr-runtime-6.0.0.ebuild 1795 BLAKE2B 983418b479375cb5e260307945eb6b1f500a7dc4efb3e44bc990025d061e9ccf22041815db10d8e37c2a3a8c350b9d594778dba7784ef734cb06cd3ed19a44d6 SHA512 625d8490a0f0c23fe6868da2f8102f6a597277a78c4668056fe2b7c7d2106e8ff16b0f536aa3b358d0dff0f83a1b0afd516cb26615256ac5920fba11048d6d62 +EBUILD rocr-runtime-5.7.1-r2.ebuild 1933 BLAKE2B 5477718eea40fa0254a0fc4b281a3c32fc2962b1de0d835ae235a7278b5f07d66f13f1915f1c23a750906a0247902e854789607c62e58ccb7269def790ff2344 SHA512 fbc18eda78e7290b780c7b49ecfda78945782b293eeb08fed95f92289380c2f5912786defce12abac2de8c9704abdb453c7a96f601e79b99eff04c9f2a1ac293 +EBUILD rocr-runtime-6.0.0-r1.ebuild 1869 BLAKE2B 3c7ef21868a9ebddfda260ba433ee33738a8d961661f1e62fc0e6d4c2feda7a3ec338416148af37f5ed53eda8f53363068d6b4c81dd0e622bbb7551c1e6549ff SHA512 8db31035d8370eb953600edd728809abf383a086d713a3bbab960f2944692c3df9ed2a22806b4a5ba9ebab065c32b79ba35b53a1ef730df96ad8289c982d8968 MISC metadata.xml 515 BLAKE2B ccb566413bfb5e7027d1596b040f6c957dc8d58fc413859c4a08fbd484ab16d536948bcf24cdd1edd5bdc8a4951b5abe6adbb3da6fde37e5a9ba1bdcfd312827 SHA512 6d0f0ab69b8f04a9106d71003f17c00e693b42c03aa5c430ebb03f7ffb3ecb8f4b10128fd22462692b97870c23e85aa3f037433fa65c55a342d64038f0db5a93 diff --git a/dev-libs/rocr-runtime/files/rocr-runtime-5.7.1-musl.patch b/dev-libs/rocr-runtime/files/rocr-runtime-5.7.1-musl.patch new file mode 100644 index 000000000000..0e8e53209738 --- /dev/null +++ b/dev-libs/rocr-runtime/files/rocr-runtime-5.7.1-musl.patch @@ -0,0 +1,106 @@ +Fix compilation with musl. + +Bug: https://github.com/ROCm/ROCR-Runtime/issues/181 +--- a/core/inc/checked.h ++++ b/core/inc/checked.h +@@ -58,7 +58,7 @@ template <uint64_t code, bool multiProcess = false> class Check final { + Check(const Check&) { object_ = uintptr_t(this) ^ uintptr_t(code); } + Check(Check&&) { object_ = uintptr_t(this) ^ uintptr_t(code); } + +- ~Check() { object_ = NULL; } ++ ~Check() { object_ = uintptr_t(NULL); } + + const Check& operator=(Check&& rhs) { return *this; } + const Check& operator=(const Check& rhs) { return *this; } +--- a/core/runtime/default_signal.cpp ++++ b/core/runtime/default_signal.cpp +@@ -57,7 +57,7 @@ int BusyWaitSignal::rtti_id_ = 0; + BusyWaitSignal::BusyWaitSignal(SharedSignal* abi_block, bool enableIPC) + : Signal(abi_block, enableIPC) { + signal_.kind = AMD_SIGNAL_KIND_USER; +- signal_.event_mailbox_ptr = NULL; ++ signal_.event_mailbox_ptr = uint64_t(NULL); + } + + hsa_signal_value_t BusyWaitSignal::LoadRelaxed() { +--- a/core/util/lnx/os_linux.cpp ++++ b/core/util/lnx/os_linux.cpp +@@ -111,9 +111,12 @@ class os_thread { + } + } + ++ int cores = 0; ++ cpu_set_t* cpuset = nullptr; ++ + if (core::Runtime::runtime_singleton_->flag().override_cpu_affinity()) { +- int cores = get_nprocs_conf(); +- cpu_set_t* cpuset = CPU_ALLOC(cores); ++ cores = get_nprocs_conf(); ++ cpuset = CPU_ALLOC(cores); + if (cpuset == nullptr) { + fprintf(stderr, "CPU_ALLOC failed: %s\n", strerror(errno)); + return; +@@ -122,12 +125,6 @@ class os_thread { + for (int i = 0; i < cores; i++) { + CPU_SET(i, cpuset); + } +- err = pthread_attr_setaffinity_np(&attrib, CPU_ALLOC_SIZE(cores), cpuset); +- CPU_FREE(cpuset); +- if (err != 0) { +- fprintf(stderr, "pthread_attr_setaffinity_np failed: %s\n", strerror(err)); +- return; +- } + } + + err = pthread_create(&thread, &attrib, ThreadTrampoline, args.get()); +@@ -157,6 +154,14 @@ class os_thread { + if (err != 0) { + fprintf(stderr, "pthread_attr_destroy failed: %s\n", strerror(err)); + } ++ ++ if (thread && cores && cpuset) { ++ err = pthread_setaffinity_np(thread, CPU_ALLOC_SIZE(cores), cpuset); ++ CPU_FREE(cpuset); ++ if (err != 0) { ++ fprintf(stderr, "pthread_setaffinity_np failed: %s\n", strerror(err)); ++ } ++ } + } + + os_thread(os_thread&& rhs) { +@@ -617,11 +622,13 @@ SharedMutex CreateSharedMutex() { + fprintf(stderr, "rw lock attribute init failed: %s\n", strerror(err)); + return nullptr; + } ++#if defined(__GLIBC__) + err = pthread_rwlockattr_setkind_np(&attrib, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP); + if (err != 0) { + fprintf(stderr, "Set rw lock attribute failure: %s\n", strerror(err)); + return nullptr; + } ++#endif + + pthread_rwlock_t* lock = new pthread_rwlock_t; + err = pthread_rwlock_init(lock, &attrib); +--- a/core/util/utils.h ++++ b/core/util/utils.h +@@ -74,7 +74,7 @@ static __forceinline void* _aligned_malloc(size_t size, size_t alignment) { + return aligned_alloc(alignment, size); + #else + void *mem = NULL; +- if (NULL != posix_memalign(&mem, alignment, size)) ++ if (0 != posix_memalign(&mem, alignment, size)) + return NULL; + return mem; + #endif +--- a/image/util.h ++++ b/image/util.h +@@ -95,7 +95,7 @@ static __forceinline void* _aligned_malloc(size_t size, size_t alignment) { + return aligned_alloc(alignment, size); + #else + void* mem = NULL; +- if (NULL != posix_memalign(&mem, alignment, size)) return NULL; ++ if (0 != posix_memalign(&mem, alignment, size)) return NULL; + return mem; + #endif + } diff --git a/dev-libs/rocr-runtime/rocr-runtime-5.7.1-r1.ebuild b/dev-libs/rocr-runtime/rocr-runtime-5.7.1-r2.ebuild index 564da67950fa..00615488c2d2 100644 --- a/dev-libs/rocr-runtime/rocr-runtime-5.7.1-r1.ebuild +++ b/dev-libs/rocr-runtime/rocr-runtime-5.7.1-r2.ebuild @@ -3,10 +3,10 @@ EAPI=8 -inherit cmake flag-o-matic llvm - LLVM_MAX_SLOT=17 +inherit cmake flag-o-matic llvm + if [[ ${PV} == *9999 ]] ; then EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/" inherit git-r3 @@ -22,6 +22,7 @@ HOMEPAGE="https://github.com/RadeonOpenCompute/ROCR-Runtime" PATCHES=( "${FILESDIR}/${PN}-4.3.0_no-aqlprofiler.patch" "${FILESDIR}/${PN}-5.7.1-extend-isa-compatibility-check.patch" + "${FILESDIR}/${PN}-5.7.1-musl.patch" ) LICENSE="MIT" @@ -33,8 +34,8 @@ COMMON_DEPEND="dev-libs/elfutils DEPEND="${COMMON_DEPEND} >=dev-libs/roct-thunk-interface-${PV} >=dev-libs/rocm-device-libs-${PV} - sys-devel/clang - sys-devel/lld" + sys-devel/clang:${LLVM_MAX_SLOT}= + sys-devel/lld:${LLVM_MAX_SLOT}=" RDEPEND="${DEPEND}" BDEPEND="app-editors/vim-core" # vim-core is needed for "xxd" diff --git a/dev-libs/rocr-runtime/rocr-runtime-6.0.0.ebuild b/dev-libs/rocr-runtime/rocr-runtime-6.0.0-r1.ebuild index 840a1949b160..cdd27fbbbefd 100644 --- a/dev-libs/rocr-runtime/rocr-runtime-6.0.0.ebuild +++ b/dev-libs/rocr-runtime/rocr-runtime-6.0.0-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -21,6 +21,7 @@ DESCRIPTION="Radeon Open Compute Runtime" HOMEPAGE="https://github.com/RadeonOpenCompute/ROCR-Runtime" PATCHES=( "${FILESDIR}/${PN}-4.3.0_no-aqlprofiler.patch" + "${FILESDIR}/${PN}-5.7.1-musl.patch" ) LICENSE="MIT" @@ -32,8 +33,8 @@ COMMON_DEPEND="dev-libs/elfutils DEPEND="${COMMON_DEPEND} >=dev-libs/roct-thunk-interface-${PV} >=dev-libs/rocm-device-libs-${PV} - sys-devel/clang - sys-devel/lld" + sys-devel/clang:${LLVM_MAX_SLOT}= + sys-devel/lld:${LLVM_MAX_SLOT}=" RDEPEND="${DEPEND}" BDEPEND="app-editors/vim-core" # vim-core is needed for "xxd" |