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>
parent
c7d2faf178
commit
d149073eaf
|
@ -202,21 +202,35 @@ base compiler and using LIBC (which may be either a libc package or #f.)"
|
||||||
|
|
||||||
#$@(if (target-avr? target)
|
#$@(if (target-avr? target)
|
||||||
#~("--enable-multilib")
|
#~("--enable-multilib")
|
||||||
|
#~())
|
||||||
|
|
||||||
|
|
||||||
|
#$@(if (and libc (target-avr? target))
|
||||||
|
#~((string-append "--with-native-system-header-dir="
|
||||||
|
#$libc "/" #$target "/include"))
|
||||||
#~()))
|
#~()))
|
||||||
|
|
||||||
(remove
|
(remove
|
||||||
(lambda (flag)
|
(lambda (flag)
|
||||||
(or (and #$libc
|
(or (and #$libc
|
||||||
(string-prefix? "--enable-languages" flag))
|
(string-prefix? "--enable-languages" flag))
|
||||||
|
(and #$libc
|
||||||
|
#$(target-avr? target)
|
||||||
|
(string-prefix? "--with-native-system-header-dir"
|
||||||
|
flag))
|
||||||
(and #$(target-avr? target)
|
(and #$(target-avr? target)
|
||||||
(string=? flag "--disable-multilib"))))
|
(string=? flag "--disable-multilib"))))
|
||||||
#$flags)))
|
#$flags)))
|
||||||
((#:make-flags flags)
|
((#:make-flags flags)
|
||||||
(if libc
|
(if libc
|
||||||
#~(let ((libc (assoc-ref %build-inputs "libc")))
|
#~(let ((libc (assoc-ref %build-inputs "libc"))
|
||||||
|
(lib-prefix (if #$(target-avr? target)
|
||||||
|
(string-append "/" #$target)
|
||||||
|
"")))
|
||||||
;; FLAGS_FOR_TARGET are needed for the target libraries to receive
|
;; FLAGS_FOR_TARGET are needed for the target libraries to receive
|
||||||
;; the -Bxxx for the startfiles.
|
;; the -Bxxx for the startfiles.
|
||||||
(cons (string-append "FLAGS_FOR_TARGET=-B" libc "/lib")
|
(cons (string-append "FLAGS_FOR_TARGET=-B"
|
||||||
|
libc lib-prefix "/lib")
|
||||||
#$flags))
|
#$flags))
|
||||||
flags))
|
flags))
|
||||||
((#:phases phases)
|
((#:phases phases)
|
||||||
|
|
Reference in New Issue