GNU bug report logs -
#66263
[PATCH 00/23] guix: Add avr as a platform.
Previous Next
Full log
Message #172 received at 66263 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/cross-base.scm (cross-gcc-search-paths): New procedure.
* gnu/packages/cross-base.scm (cross-gcc) <search-paths>: Convert to and use
cross-gcc-search-paths procedure.
Change-Id: Id306782eaf928d05cd005b9539087ed631506b5b
---
gnu/packages/cross-base.scm | 42 +++++++++++++++++++++++--------------
1 file changed, 26 insertions(+), 16 deletions(-)
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index dcb1c3efa8..fe33770c2a 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -249,6 +249,31 @@ (define (cross-gcc-snippet target)
"-DTOOLDIR_BASE_PREFIX=\\\"../../../../\\\""))
#t))
+(define (cross-gcc-search-paths target)
+ "Return list of GCC search path specifications needed for TARGET."
+ (cons (search-path-specification
+ (variable "CROSS_LIBRARY_PATH")
+ (files `("lib" "lib64"
+ ,@(list (string-append target "/lib")
+ (string-append target "/lib64")))))
+
+ (map (lambda (variable)
+ (search-path-specification
+ (variable variable)
+
+ ;; Add 'include/c++' here so that <cstdlib>'s
+ ;; "#include_next <stdlib.h>" finds GCC's
+ ;; <stdlib.h>, not libc's.
+ (files (match variable
+ ("CROSS_CPLUS_INCLUDE_PATH"
+ `("include/c++" "include"
+ ,@(list (string-append target "/include/c++")
+ (string-append target "/include"))))
+ (_
+ `("include"
+ ,(string-append target "/include")))))))
+ %gcc-cross-include-paths)))
+
(define* (cross-gcc target
#:key
(xgcc %xgcc)
@@ -341,22 +366,7 @@ (define* (cross-gcc target
(inputs '())
;; Only search target inputs, not host inputs.
- (search-paths (cons (search-path-specification
- (variable "CROSS_LIBRARY_PATH")
- (files '("lib" "lib64")))
- (map (lambda (variable)
- (search-path-specification
- (variable variable)
-
- ;; Add 'include/c++' here so that <cstdlib>'s
- ;; "#include_next <stdlib.h>" finds GCC's
- ;; <stdlib.h>, not libc's.
- (files (match variable
- ("CROSS_CPLUS_INCLUDE_PATH"
- '("include/c++" "include"))
- (_
- '("include"))))))
- %gcc-cross-include-paths)))
+ (search-paths (cross-gcc-search-paths target))
(native-search-paths '())))
(define* (cross-kernel-headers . args)
--
2.41.0
This bug report was last modified 1 year and 220 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.