diff options
| author | Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com> | 2023-11-28 12:34:55 +0100 |
|---|---|---|
| committer | Efraim Flashner <efraim@flashner.co.il> | 2023-12-11 13:36:51 +0200 |
| commit | d149073eaf27f7dc3ac6201b2fcf4a454c5dd549 (patch) | |
| tree | 4842c4f9fef6799ba541211c7d855b31b114c022 /gnu/packages | |
| parent | c7d2faf1788a1f40defc9d4b875d19b912b6ef01 (diff) | |
gnu: cross-gcc: Find AVR Libc files.
* gnu/packages/cross-base.scm (cross-gcc-arguments)
<configure-flags>: Add --with-native-system-header-dir for AVR.
<make-flags>: Add target prefix to /lib to find AVR library.
Change-Id: Ie9cae338da241fe987f53463aa3774a890e2af9a
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
Diffstat (limited to 'gnu/packages')
| -rw-r--r-- | gnu/packages/cross-base.scm | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 7f67aaed89b..e89208b8b6b 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm | |||
| @@ -202,21 +202,35 @@ base compiler and using LIBC (which may be either a libc package or #f.)" | |||
| 202 | 202 | ||
| 203 | #$@(if (target-avr? target) | 203 | #$@(if (target-avr? target) |
| 204 | #~("--enable-multilib") | 204 | #~("--enable-multilib") |
| 205 | #~()) | ||
| 206 | |||
| 207 | |||
| 208 | #$@(if (and libc (target-avr? target)) | ||
| 209 | #~((string-append "--with-native-system-header-dir=" | ||
| 210 | #$libc "/" #$target "/include")) | ||
| 205 | #~())) | 211 | #~())) |
| 206 | 212 | ||
| 207 | (remove | 213 | (remove |
| 208 | (lambda (flag) | 214 | (lambda (flag) |
| 209 | (or (and #$libc | 215 | (or (and #$libc |
| 210 | (string-prefix? "--enable-languages" flag)) | 216 | (string-prefix? "--enable-languages" flag)) |
| 217 | (and #$libc | ||
| 218 | #$(target-avr? target) | ||
| 219 | (string-prefix? "--with-native-system-header-dir" | ||
| 220 | flag)) | ||
| 211 | (and #$(target-avr? target) | 221 | (and #$(target-avr? target) |
| 212 | (string=? flag "--disable-multilib")))) | 222 | (string=? flag "--disable-multilib")))) |
| 213 | #$flags))) | 223 | #$flags))) |
| 214 | ((#:make-flags flags) | 224 | ((#:make-flags flags) |
| 215 | (if libc | 225 | (if libc |
| 216 | #~(let ((libc (assoc-ref %build-inputs "libc"))) | 226 | #~(let ((libc (assoc-ref %build-inputs "libc")) |
| 227 | (lib-prefix (if #$(target-avr? target) | ||
| 228 | (string-append "/" #$target) | ||
| 229 | ""))) | ||
| 217 | ;; FLAGS_FOR_TARGET are needed for the target libraries to receive | 230 | ;; FLAGS_FOR_TARGET are needed for the target libraries to receive |
| 218 | ;; the -Bxxx for the startfiles. | 231 | ;; the -Bxxx for the startfiles. |
| 219 | (cons (string-append "FLAGS_FOR_TARGET=-B" libc "/lib") | 232 | (cons (string-append "FLAGS_FOR_TARGET=-B" |
| 233 | libc lib-prefix "/lib") | ||
| 220 | #$flags)) | 234 | #$flags)) |
| 221 | flags)) | 235 | flags)) |
| 222 | ((#:phases phases) | 236 | ((#:phases phases) |
