summary refs log tree commit diff
path: root/gnu/packages/embedded.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2017-05-22 16:13:17 +0200
committerRicardo Wurmus <rekado@elephly.net>2017-05-24 23:29:41 +0200
commit1a1e83366d2d9aa5b49f2dba728a1a312fc22b65 (patch)
treeb872473ae3975ecffa67af760a2057464a630672 /gnu/packages/embedded.scm
parent6a34e2ae2875e8152f90ad1337832e60b8a85ce1 (diff)
downloadguix-1a1e83366d2d9aa5b49f2dba728a1a312fc22b65.tar.gz
gnu: Add libstdc++-arm-none-eabi.
* gnu/packages/embedded.scm (make-libstdc++-arm-none-eabi): New procedure.
Diffstat (limited to 'gnu/packages/embedded.scm')
-rw-r--r--gnu/packages/embedded.scm24
1 files changed, 24 insertions, 0 deletions
diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 632682d630..2befdf31b3 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -197,6 +197,30 @@ usable on embedded products.")
            "--disable-nls"))))
     (synopsis "Newlib variant for small systems with limited memory")))
 
+(define (make-libstdc++-arm-none-eabi xgcc newlib)
+  (let ((libstdc++ (make-libstdc++ xgcc)))
+    (package (inherit libstdc++)
+      (name "libstdc++-arm-none-eabi")
+      (arguments
+       (substitute-keyword-arguments (package-arguments libstdc++)
+         ((#:configure-flags flags)
+          ``("--target=arm-none-eabi"
+             "--host=arm-none-eabi"
+             "--disable-libstdcxx-pch"
+             "--enable-multilib"
+             "--with-multilib-list=armv6-m,armv7-m,armv7e-m"
+             "--disable-shared"
+             "--disable-tls"
+             "--disable-plugin"
+             "--with-newlib"
+             ,(string-append "--with-gxx-include-dir="
+                             (assoc-ref %outputs "out")
+                             "/arm-none-eabi/include")))))
+      (native-inputs
+       `(("newlib" ,newlib)
+         ("xgcc" ,xgcc)
+         ,@(package-native-inputs libstdc++))))))
+
 (define (arm-none-eabi-toolchain xgcc newlib)
   "Produce a cross-compiler toolchain package with the compiler XGCC and the C
 library variant NEWLIB."