summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorJean-Pierre De Jesus DIAZ <jean@foundationdevices.com>2023-11-28 12:34:58 +0100
committerEfraim Flashner <efraim@flashner.co.il>2023-12-11 13:37:20 +0200
commit06587003b896755f876ecd57b848e1d663fafb87 (patch)
treea73fd8d19adb42f9ac48a9f5d218e65c153b8326 /guix
parent119edc3c9b0a30511603262850245d15a9012789 (diff)
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>
Diffstat (limited to 'guix')
-rw-r--r--guix/build-system/meson.scm11
1 files changed, 10 insertions, 1 deletions
diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm
index dd5e9e897e..bf9ca15ecc 100644
--- a/guix/build-system/meson.scm
+++ b/guix/build-system/meson.scm
@@ -92,6 +92,13 @@ TRIPLET."
(ld . ,(string-append triplet "-ld"))
(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)
(computed-file "cross-file"
(with-imported-modules '((guix build meson-configuration))
@@ -102,7 +109,9 @@ TRIPLET."
(write-section-header port "host_machine")
(write-assignments port '#$(make-machine-alist triplet))
(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
;; Build-side modules imported by default.