[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/23: gnu: cross-gcc: Handle target include paths.
From: |
guix-commits |
Subject: |
08/23: gnu: cross-gcc: Handle target include paths. |
Date: |
Mon, 11 Dec 2023 06:57:41 -0500 (EST) |
efraim pushed a commit to branch master
in repository guix.
commit f49ccd9cefcc2cd93543a0619f54d10f86c61468
Author: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com>
AuthorDate: Tue Nov 28 12:34:51 2023 +0100
gnu: cross-gcc: Handle target include paths.
* gnu/packages/cross-base.scm (cross-gcc-search-paths): New procedure.
(cross-gcc)[search-paths]: Convert to and use cross-gcc-search-paths
procedure.
Change-Id: Id306782eaf928d05cd005b9539087ed631506b5b
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
---
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 777b5d8761..0561fd2df8 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.)"
"-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 @@ target that libc."
(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)
- 10/23: gnu: cross-gcc: Handle AVR inputs., (continued)
- 10/23: gnu: cross-gcc: Handle AVR inputs., guix-commits, 2023/12/11
- 09/23: gnu: cross-libc: Add AVR Libc support., guix-commits, 2023/12/11
- 12/23: gnu: cross-gcc: Find AVR Libc files., guix-commits, 2023/12/11
- 11/23: gnu: cross-toolchain: Add set-cross-path for AVR., guix-commits, 2023/12/11
- 13/23: gnu: cross-gcc: Only C and C++ for AVR., guix-commits, 2023/12/11
- 17/23: gnu: Add gcc-cross-avr-toolchain., guix-commits, 2023/12/11
- 20/23: gnu: lufa: Use AVR target., guix-commits, 2023/12/11
- 04/23: guix: Add target-avr?., guix-commits, 2023/12/11
- 07/23: gnu: cross-gcc: Enable multilib for AVR., guix-commits, 2023/12/11
- 03/23: guix: Add avr platform., guix-commits, 2023/12/11
- 08/23: gnu: cross-gcc: Handle target include paths.,
guix-commits <=
- 15/23: guix: meson-build-system: Disable PIC for AVR., guix-commits, 2023/12/11
- 22/23: gnu: Add gcc-cross-x86_64-w64-mingw32-toolchain., guix-commits, 2023/12/11
- 05/23: gnu: microscheme: Move to avr-xyz., guix-commits, 2023/12/11
- 19/23: gnu: make-qmk-firmware: Use AVR target., guix-commits, 2023/12/11
- 14/23: guix: meson-build-system: Support AVR., guix-commits, 2023/12/11
- 21/23: gnu: Add gcc-cross-i686-w64-mingw32-toolchain., guix-commits, 2023/12/11
- 16/23: gnu: Add cross-gcc-toolchain procedure., guix-commits, 2023/12/11
- 18/23: gnu: make-ergodox-firmware: Use AVR target., guix-commits, 2023/12/11
- 23/23: guix: platform: Add platform-rust-target., guix-commits, 2023/12/11