@@ -1362,8 +1362,9 @@ (define-public libcxx
`(#:phases
(modify-phases (@ (guix build cmake-build-system) %standard-phases)
(add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((gcc (assoc-ref inputs "gcc")))
+ (lambda* (#:key inputs native-inputs #:allow-other-keys)
+ (let ((gcc (or (assoc-ref (or native-inputs inputs) "gcc")))
+ (cross-gcc (assoc-ref native-inputs "cross-gcc")))
;; Hide GCC's C++ headers so that they do not interfere with
;; the ones we are attempting to build.
(setenv "CPLUS_INCLUDE_PATH"
@@ -1371,12 +1372,19 @@ (define-public libcxx
(string-split (getenv "CPLUS_INCLUDE_PATH")
#\:))
":"))
+ (when cross-gcc
+ (setenv "CROSS_CPLUS_INCLUDE_PATH"
+ (string-join (delete (string-append cross-gcc "/include/c++")
+ (string-split (getenv "CPLUS_INCLUDE_PATH")
+ #\:))
+ ":"))
+ (format #t
+ "environment variable `CROSS_CPLUS_INCLUDE_PATH' changed to ~a~%"
+ (getenv "CROSS_CPLUS_INCLUDE_PATH")))
(format #t
"environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%"
- (getenv "CPLUS_INCLUDE_PATH"))
- #t))))))
- (native-inputs
- (list clang llvm))
+ (getenv "CPLUS_INCLUDE_PATH"))))))))
+ (inputs (list llvm-9))
(home-page "https://libcxx.llvm.org")
(synopsis "C++ standard library")
(description
@@ -1397,8 +1405,7 @@ (define-public libcxx-6
(sha256
(base32
"0rzw4qvxp6qx4l4h9amrq02gp7hbg8lw4m0sy3k60f50234gnm3n"))))
- (native-inputs
- (list clang-6 llvm-6))))
+ (inputs (list llvm-6))))
(define-public libcxxabi-6
(package