guix: meson-build-system: Disable PIC for AVR.
* guix/build-system/meson.scm (make-built-in-options-alist): New procedure. (make-cross-file): Add 'built-in options' section to cross file. Change-Id: Ifff7f6fb1eb8b0e8ddd04881d22acb863c9e85b2 Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
parent
119edc3c9b
commit
06587003b8
|
@ -92,6 +92,13 @@ TRIPLET."
|
||||||
(ld . ,(string-append triplet "-ld"))
|
(ld . ,(string-append triplet "-ld"))
|
||||||
(strip . ,(string-append triplet "-strip"))))
|
(strip . ,(string-append triplet "-strip"))))
|
||||||
|
|
||||||
|
(define (make-built-in-options-alist triplet)
|
||||||
|
(if (target-avr? triplet)
|
||||||
|
`((b_pie . #f)
|
||||||
|
(b_staticpic . #f)
|
||||||
|
(default_library . "static"))
|
||||||
|
'()))
|
||||||
|
|
||||||
(define (make-cross-file triplet)
|
(define (make-cross-file triplet)
|
||||||
(computed-file "cross-file"
|
(computed-file "cross-file"
|
||||||
(with-imported-modules '((guix build meson-configuration))
|
(with-imported-modules '((guix build meson-configuration))
|
||||||
|
@ -102,7 +109,9 @@ TRIPLET."
|
||||||
(write-section-header port "host_machine")
|
(write-section-header port "host_machine")
|
||||||
(write-assignments port '#$(make-machine-alist triplet))
|
(write-assignments port '#$(make-machine-alist triplet))
|
||||||
(write-section-header port "binaries")
|
(write-section-header port "binaries")
|
||||||
(write-assignments port '#$(make-binaries-alist triplet))))))))
|
(write-assignments port '#$(make-binaries-alist triplet))
|
||||||
|
(write-section-header port "built-in options")
|
||||||
|
(write-assignments port '#$(make-built-in-options-alist triplet))))))))
|
||||||
|
|
||||||
(define %meson-build-system-modules
|
(define %meson-build-system-modules
|
||||||
;; Build-side modules imported by default.
|
;; Build-side modules imported by default.
|
||||||
|
|
Reference in New Issue