summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/packages/cross-base.scm42
1 files changed, 26 insertions, 16 deletions
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 777b5d87619..0561fd2df81 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -249,6 +249,31 @@ base compiler and using LIBC (which may be either a libc package or #f.)"
249 "-DTOOLDIR_BASE_PREFIX=\\\"../../../../\\\"")) 249 "-DTOOLDIR_BASE_PREFIX=\\\"../../../../\\\""))
250 #t)) 250 #t))
251 251
252(define (cross-gcc-search-paths target)
253 "Return list of GCC search path specifications needed for TARGET."
254 (cons (search-path-specification
255 (variable "CROSS_LIBRARY_PATH")
256 (files `("lib" "lib64"
257 ,@(list (string-append target "/lib")
258 (string-append target "/lib64")))))
259
260 (map (lambda (variable)
261 (search-path-specification
262 (variable variable)
263
264 ;; Add 'include/c++' here so that <cstdlib>'s
265 ;; "#include_next <stdlib.h>" finds GCC's
266 ;; <stdlib.h>, not libc's.
267 (files (match variable
268 ("CROSS_CPLUS_INCLUDE_PATH"
269 `("include/c++" "include"
270 ,@(list (string-append target "/include/c++")
271 (string-append target "/include"))))
272 (_
273 `("include"
274 ,(string-append target "/include")))))))
275 %gcc-cross-include-paths)))
276
252(define* (cross-gcc target 277(define* (cross-gcc target
253 #:key 278 #:key
254 (xgcc %xgcc) 279 (xgcc %xgcc)
@@ -341,22 +366,7 @@ target that libc."
341 (inputs '()) 366 (inputs '())
342 367
343 ;; Only search target inputs, not host inputs. 368 ;; Only search target inputs, not host inputs.
344 (search-paths (cons (search-path-specification 369 (search-paths (cross-gcc-search-paths target))
345 (variable "CROSS_LIBRARY_PATH")
346 (files '("lib" "lib64")))
347 (map (lambda (variable)
348 (search-path-specification
349 (variable variable)
350
351 ;; Add 'include/c++' here so that <cstdlib>'s
352 ;; "#include_next <stdlib.h>" finds GCC's
353 ;; <stdlib.h>, not libc's.
354 (files (match variable
355 ("CROSS_CPLUS_INCLUDE_PATH"
356 '("include/c++" "include"))
357 (_
358 '("include"))))))
359 %gcc-cross-include-paths)))
360 (native-search-paths '()))) 370 (native-search-paths '())))
361 371
362(define* (cross-kernel-headers . args) 372(define* (cross-kernel-headers . args)