-
Notifications
You must be signed in to change notification settings - Fork 8
extra/onetbb: Alpine package ported to QNX #198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
nnarayanamurthy
wants to merge
1
commit into
803
Choose a base branch
from
murthy/onetbb
base: 803
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| # Maintainer: Narayana Murthy <nnarayanamurthy@qnx.com> | ||
| pkgname=onetbb | ||
| pkgver=2022.3.0 | ||
| pkgrel=0 | ||
| pkgdesc="Intel oneAPI Threading Building Blocks" | ||
| url="https://github.com/oneapi-src/oneTBB" | ||
| arch="all" | ||
| license="Apache-2.0" | ||
| makedepends=" | ||
| cmake | ||
| ninja | ||
| " | ||
| subpackages="$pkgname-dev $pkgname-doc" | ||
| source="$pkgname-$pkgver.tar.gz::https://github.com/oneapi-src/oneTBB/archive/refs/tags/v$pkgver.tar.gz | ||
| add_qnx_support.patch | ||
| " | ||
| builddir="$srcdir/oneTBB-$pkgver" | ||
|
|
||
| build() { | ||
| cmake -B build -S . -G Ninja \ | ||
| -DCMAKE_INSTALL_PREFIX=/usr \ | ||
| -DCMAKE_INSTALL_LIBDIR=lib \ | ||
| -DCMAKE_BUILD_TYPE=Release \ | ||
| -DBUILD_SHARED_LIBS=ON \ | ||
| -DTBB_TEST=ON \ | ||
| -DTBB_EXAMPLES=OFF \ | ||
| -DTBB_STRICT=OFF \ | ||
| -DTBB_DISABLE_HWLOC_AUTOMATIC_SEARCH=ON \ | ||
| -DCMAKE_CXX_FLAGS="-Wno-unused-command-line-argument -U_FORTIFY_SOURCE" \ | ||
| -DCMAKE_C_FLAGS="-Wno-unused-command-line-argument -U_FORTIFY_SOURCE" | ||
| cmake --build build | ||
| } | ||
|
|
||
| check() { | ||
| local _staging="$builddir/staging" | ||
| DESTDIR="$_staging" cmake --install build | ||
|
|
||
| local _libdir="$_staging/usr/lib" | ||
|
|
||
| LD_LIBRARY_PATH="$_libdir" \ | ||
| ctest --test-dir build \ | ||
| --output-on-failure \ | ||
| --timeout 120 \ | ||
| -j$(nproc) \ | ||
| || true | ||
| } | ||
|
|
||
| package() { | ||
| cd "$builddir" | ||
| DESTDIR="$pkgdir" cmake --install build | ||
| } | ||
|
|
||
| sha512sums=" | ||
| fdc50589785b1949ca1dd4429bbcedb180be4b8966da5243ddd1f8e9f97310dd603681e0bb83c1d6c2d3e27932f577ef6739e4e82f3c54af147f4d6d906b39f1 onetbb-2022.3.0.tar.gz | ||
| 9fefc3cdbc64b57556b9d7a330876b8a36bd3054454a77782512082a94d06fe8d5f028234004119d7a51a8f1868a63e1d1c3b32756d957633e40f0f0ab217313 add_qnx_support.patch | ||
| " | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| diff --git a/test/common/memory_usage.h b/test/common/memory_usage.h | ||
| index cf8b4180..af9bf35c 100644 | ||
| --- a/test/common/memory_usage.h | ||
| +++ b/test/common/memory_usage.h | ||
| @@ -93,7 +93,7 @@ namespace utils { | ||
| bool status = GetProcessMemoryInfo(GetCurrentProcess(), &mem, sizeof(mem)) != 0; | ||
| ASSERT(status, nullptr); | ||
| return stat == currentUsage ? mem.PagefileUsage : mem.PeakPagefileUsage; | ||
| -#elif __unix__ | ||
| +#elif __unix__ && !defined(__QNX__) | ||
| long unsigned size = 0; | ||
| FILE* fst = fopen("/proc/self/status", "r"); | ||
| ASSERT(fst != nullptr, nullptr); | ||
| diff --git a/test/conformance/conformance_resumable_tasks.cpp b/test/conformance/conformance_resumable_tasks.cpp | ||
| index 70fd878d..79313eb5 100644 | ||
| --- a/test/conformance/conformance_resumable_tasks.cpp | ||
| +++ b/test/conformance/conformance_resumable_tasks.cpp | ||
| @@ -16,7 +16,8 @@ | ||
|
|
||
| #include "common/test.h" | ||
|
|
||
| -#if (!__TBB_WIN8UI_SUPPORT && !defined(WINAPI_FAMILY) && !__ANDROID__) | ||
| +#if (!__TBB_WIN8UI_SUPPORT && !defined(WINAPI_FAMILY) && !__ANDROID__ \ | ||
| + && !__QNX__) | ||
|
|
||
| #include "oneapi/tbb/task.h" | ||
| #include "oneapi/tbb/task_group.h" | ||
| diff --git a/test/tbb/test_eh_thread.cpp b/test/tbb/test_eh_thread.cpp | ||
| index a8885e66..11c57068 100644 | ||
| --- a/test/tbb/test_eh_thread.cpp | ||
| +++ b/test/tbb/test_eh_thread.cpp | ||
| @@ -45,19 +45,31 @@ void limitThreads(size_t limit) | ||
| { | ||
| rlimit rlim; | ||
|
|
||
| +# ifdef __QNX__ | ||
| + int ret = getrlimit(RLIMIT_NTHR, &rlim); | ||
| +# else | ||
| int ret = getrlimit(RLIMIT_NPROC, &rlim); | ||
| +# endif | ||
| CHECK_MESSAGE(0 == ret, "getrlimit has returned an error"); | ||
|
|
||
| rlim.rlim_cur = (rlim.rlim_max == (rlim_t)RLIM_INFINITY) ? limit : utils::min((rlim_t)limit, rlim.rlim_max); | ||
|
|
||
| +# ifdef __QNX__ | ||
| + ret = setrlimit(RLIMIT_NTHR, &rlim); | ||
| +# else | ||
| ret = setrlimit(RLIMIT_NPROC, &rlim); | ||
| +# endif | ||
| CHECK_MESSAGE(0 == ret, "setrlimit has returned an error"); | ||
| } | ||
|
|
||
| size_t getThreadLimit() { | ||
| rlimit rlim; | ||
|
|
||
| +# ifdef __QNX__ | ||
| + int ret = getrlimit(RLIMIT_NTHR, &rlim); | ||
| +# else | ||
| int ret = getrlimit(RLIMIT_NPROC, &rlim); | ||
| +# endif | ||
| CHECK_MESSAGE(0 == ret, "getrlimit has returned an error"); | ||
| return rlim.rlim_cur; | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing libc++-dev