From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 59237@debbugs.gnu.org
Cc: ludo@gnu.org, Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: [bug#59237] [PATCH v2 4/5] gnu: Add libomp-15.
Date: Wed, 16 Nov 2022 09:18:29 -0500 [thread overview]
Message-ID: <20221116141830.12398-5-maxim.cournoyer@gmail.com> (raw)
In-Reply-To: <20221116141830.12398-1-maxim.cournoyer@gmail.com>
* gnu/packages/llvm.scm (libomp-15): New variable.
(libomp-14): Inherit from it.
[arguments]: Use substitute-keyword-arguments and override the
chdir-to-source-and-install-license phase. Remove redundant fields.
---
gnu/packages/llvm.scm | 75 ++++++++++++++++++++++++++-----------------
1 file changed, 46 insertions(+), 29 deletions(-)
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 2b958b060e..528c2bc359 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -755,10 +755,44 @@ (define-public clang-14
(base32
"0rhq4wkmvr369nkk059skzzw7jx6qhzqhmiwmqg4sp66avzviwvw")))))
+(define-public libomp-15
+ (package
+ (name "libomp")
+ (version (package-version llvm-15))
+ (source (llvm-monorepo version))
+ (build-system cmake-build-system)
+ ;; XXX: Note this gets built with GCC because building with Clang itself
+ ;; fails (missing <atomic>, even when libcxx is added as an input.)
+ (arguments
+ (list
+ #:configure-flags
+ #~(list "-DLIBOMP_USE_HWLOC=ON"
+ "-DOPENMP_TEST_C_COMPILER=clang"
+ "-DOPENMP_TEST_CXX_COMPILER=clang++")
+ #:test-target "check-libomp"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir-to-source-and-install-license
+ (lambda _
+ (chdir "openmp")
+ (install-file "LICENSE.TXT"
+ (string-append #$output "/share/doc")))))))
+ (native-inputs (list clang-15 llvm-15 perl pkg-config python))
+ (inputs (list `(,hwloc "lib")))
+ (home-page "https://openmp.llvm.org")
+ (synopsis "OpenMP run-time support library")
+ (description "This package provides the run-time support library developed
+by the LLVM project for the OpenMP multi-theaded programming extension. This
+package notably provides @file{libgomp.so}, which is has a binary interface
+compatible with that of libgomp, the GNU Offloading and Multi Processing
+Library.")
+ (properties `((release-monitoring-url . ,%llvm-release-monitoring-url)
+ (upstream-name . "openmp")))
+ (license license:expat)))
(define-public libomp-14
(package
- (name "libomp")
+ (inherit libomp-15)
(version (package-version llvm-14))
(source (origin
(method url-fetch)
@@ -767,36 +801,19 @@ (define-public libomp-14
(base32
"07zby3gwy5c8jssabrhjk3nsxlwipnm6sk4dsvck1l5d0br1ywsg"))
(file-name (string-append "libomp-" version ".tar.xz"))))
- (build-system cmake-build-system)
- ;; XXX: Note this gets built with GCC because building with Clang itself
- ;; fails (missing <atomic>, even when libcxx is added as an input.)
(arguments
- (list
- #:configure-flags #~(list "-DLIBOMP_USE_HWLOC=ON"
- "-DOPENMP_TEST_C_COMPILER=clang"
- "-DOPENMP_TEST_CXX_COMPILER=clang++")
- #:test-target "check-libomp"
- #:phases
- #~(modify-phases %standard-phases
- (add-after 'unpack 'chdir-to-source-and-install-license
- (lambda _
- (chdir #$(string-append "../openmp-" version ".src"))
- (install-file "LICENSE.TXT"
- (string-append #$output "/share/doc")))))))
+ (substitute-keyword-arguments (package-arguments libomp-15)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (replace 'chdir-to-source-and-install-license
+ (lambda _
+ (chdir #$(string-append "../openmp-" version ".src"))
+ (install-file "LICENSE.TXT"
+ (string-append #$output "/share/doc"))))))))
(native-inputs
- (list clang-14 llvm-14 perl pkg-config python))
- (inputs
- (list `(,hwloc "lib")))
- (home-page "https://openmp.llvm.org")
- (synopsis "OpenMP run-time support library")
- (description
- "This package provides the run-time support library developed by the LLVM
-project for the OpenMP multi-theaded programming extension. This package
-notably provides @file{libgomp.so}, which is has a binary interface compatible
-with that of libgomp, the GNU Offloading and Multi Processing Library.")
- (properties `((release-monitoring-url . ,%llvm-release-monitoring-url)
- (upstream-name . "openmp")))
- (license license:expat)))
+ (modify-inputs (package-native-inputs libomp-15)
+ (replace "clang" clang-14)
+ (replace "llvm" llvm-14)))))
(define-public clang-toolchain-14
(make-clang-toolchain clang-14 libomp-14))
--
2.38.1
next prev parent reply other threads:[~2022-11-16 14:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-13 4:53 [bug#59237] [PATCH 0/3] Add LLVM/Clang 15.0.4 Maxim Cournoyer
2022-11-13 5:01 ` [bug#59237] [PATCH 1/3] gnu: Add llvm-15 Maxim Cournoyer
2022-11-13 5:01 ` [bug#59237] [PATCH 2/3] gnu: Add clang-runtime-15 Maxim Cournoyer
2022-11-13 5:02 ` [bug#59237] [PATCH 3/3] gnu: Add clang-15 Maxim Cournoyer
2022-11-15 10:33 ` [bug#59237] [PATCH 0/3] Add LLVM/Clang 15.0.4 Ludovic Courtès
2022-11-15 10:34 ` Ludovic Courtès
2022-11-15 10:28 ` Ludovic Courtès
2022-11-16 14:18 ` [bug#59237] [PATCH v2 0/5] Add LLVM/Clang 15 Maxim Cournoyer
2022-11-16 14:18 ` [bug#59237] [PATCH v2 1/5] gnu: Add llvm-15 Maxim Cournoyer
2022-11-16 14:18 ` [bug#59237] [PATCH v2 2/5] gnu: Add clang-runtime-15 Maxim Cournoyer
2022-11-16 14:18 ` [bug#59237] [PATCH v2 3/5] gnu: Add clang-15 Maxim Cournoyer
2022-11-16 14:18 ` Maxim Cournoyer [this message]
2022-11-16 14:18 ` [bug#59237] [PATCH v2 5/5] gnu: Add clang-toolchain-15 Maxim Cournoyer
2022-11-16 15:21 ` [bug#59237] [PATCH 0/3] Add LLVM/Clang 15.0.4 Ludovic Courtès
2022-11-16 19:16 ` bug#59237: " Maxim Cournoyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221116141830.12398-5-maxim.cournoyer@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=59237@debbugs.gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.