gnu: tbb: Fix building on powerpc-linux.

* gnu/packages/tbb.scm (tbb)[arguments]: Adjust configure-flags when
building for powerpc-linux to always link to libatomic and use the low
resources tests.  When building for powerpc-linux skip 3 tests.

Change-Id: I323db085db1fcbb33f96c2bccb85cb8f56d41f6b
This commit is contained in:
Efraim Flashner 2023-11-19 09:15:58 +02:00
parent b7abea0fd6
commit f7ef5a7f46
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -49,22 +49,33 @@ (define-public tbb
(build-system cmake-build-system) (build-system cmake-build-system)
(arguments (arguments
`(#:configure-flags `(#:configure-flags
'(,@(if (target-riscv64?) '(,@(if (or (target-riscv64?)
(target-ppc32?))
'("-DTBB_TEST_LINK_FLAGS=-latomic") '("-DTBB_TEST_LINK_FLAGS=-latomic")
`()) `())
,@(if (target-arm32?) ,@(if (or (target-arm32?)
(target-ppc32?))
'("-DTBB_TEST_COMPILE_FLAGS=-DTBB_TEST_LOW_WORKLOAD") '("-DTBB_TEST_COMPILE_FLAGS=-DTBB_TEST_LOW_WORKLOAD")
`()) `())
"-DTBB_STRICT=OFF") ;; Don't fail on warnings "-DTBB_STRICT=OFF") ;; Don't fail on warnings
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
,@(if (target-arm32?) ,@(cond
`((add-after 'unpack 'adjust-test-suite ((target-arm32?)
(lambda _ `((add-after 'unpack 'adjust-test-suite
(substitute* "test/CMakeLists.txt" (lambda _
;; Bus error, skipped on mips. (substitute* "test/CMakeLists.txt"
((".*test_malloc_pools.*") ""))))) ;; Bus error, skipped on mips.
'())))) ((".*test_malloc_pools.*") ""))))))
((target-ppc32?)
`((add-after 'unpack 'adjust-test-suite
(lambda _
(substitute* "test/CMakeLists.txt"
;; These tests hang forever.
((".*test_function_node.*") "")
((".*test_multifunction_node.*") "")
((".*test_async_node.*") ""))))))
(else '())))))
(home-page "https://www.threadingbuildingblocks.org") (home-page "https://www.threadingbuildingblocks.org")
(synopsis "C++ library for parallel programming") (synopsis "C++ library for parallel programming")
(description (description