[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#54239] [PATCH v3 02/10] gnu: clang-runtime: Fix cross-compilation.
From: |
Julien Lepiller |
Subject: |
[bug#54239] [PATCH v3 02/10] gnu: clang-runtime: Fix cross-compilation. |
Date: |
Sat, 16 Jul 2022 21:47:59 +0200 |
* gnu/packages/llvm.scm (clang-runtime-from-llvm): Sanitie
CROSS_CPLUS_INCLUDE_PATH in the same way as CPLUS_INCLUDE_PATH.
---
gnu/packages/llvm.scm | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 5a2f411eb2..6428391650 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -141,7 +141,7 @@ (define* (clang-runtime-from-llvm llvm
;; Work around https://issues.guix.info/issue/36882. We
need to
;; remove glibc from CPLUS_INCLUDE_PATH so that the one
hardcoded
;; in GCC, at the bottom of GCC include search-path is
used.
- (lambda* (#:key inputs #:allow-other-keys)
+ (lambda* (#:key inputs target #:allow-other-keys)
(let* ((filters '("libc"))
(input-directories
(filter-map (lambda (input)
@@ -153,7 +153,20 @@ (define* (clang-runtime-from-llvm llvm
(set-path-environment-variable "CPLUS_INCLUDE_PATH"
'("include")
input-directories)
- #t))))))
+ (when target
+ (let ((libc (assoc-ref inputs "cross-libc")))
+ (setenv "CROSS_CPLUS_INCLUDE_PATH"
+ (string-join
+ (filter
+ (lambda (path)
+ (and
+ (not (equal? path
+ (string-append libc
"/include")))
+ (string-suffix? "include" path)))
+
+ (string-split (getenv
"CROSS_CPLUS_INCLUDE_PATH")
+ #\:))
+ ":"))))))))))
(home-page "https://compiler-rt.llvm.org")
(synopsis "Runtime library for Clang/LLVM")
(description
--
2.37.0
- [bug#54239] [PATCH] gnu: Add cross-clang., Julien Lepiller, 2022/07/16
- [bug#54239] [PATCH v3 01/10] guix: Add build-system transformation for target., Julien Lepiller, 2022/07/16
- [bug#54239] [PATCH v3 03/10] gnu: llvm-9: Fix cross-compilation., Julien Lepiller, 2022/07/16
- [bug#54239] [PATCH v3 04/10] gnu: Add cross-llvm., Julien Lepiller, 2022/07/16
- [bug#54239] [PATCH v3 02/10] gnu: clang-runtime: Fix cross-compilation.,
Julien Lepiller <=
- [bug#54239] [PATCH v3 06/10] gnu: libcxx: Allow cross-compilation., Julien Lepiller, 2022/07/16
- [bug#54239] [PATCH v3 07/10] gnu: libcxxabi-6: Allow cross-compilation., Julien Lepiller, 2022/07/16
- [bug#54239] [PATCH v3 08/10] gnu: Add libcxxabi-9., Julien Lepiller, 2022/07/16
- [bug#54239] [PATCH v3 09/10] gnu: Add libcxx-12., Julien Lepiller, 2022/07/16
- [bug#54239] [PATCH v3 10/10] gnu: Add libcxxabi-12., Julien Lepiller, 2022/07/16
- [bug#54239] [PATCH v3 05/10] gnu: Add cross-clang., Julien Lepiller, 2022/07/16
- [bug#54239] [PATCH] gnu: Add cross-clang., Maxime Devos, 2022/07/19