aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-06-19 11:34:16 +0200
committerLudovic Courtès <ludo@gnu.org>2015-06-19 17:23:47 +0200
commitd0abf829a95b5a4501eae452e03ca8b1d47b0b16 (patch)
tree41a86097aea022ed6cf957c95abb905801361b3a
parent9942e8030dac70a313cf8eeabf3c8e250119d227 (diff)
downloadguix-d0abf829a95b5a4501eae452e03ca8b1d47b0b16.tar
guix-d0abf829a95b5a4501eae452e03ca8b1d47b0b16.tar.gz
gnu: Add libstdc++ as a standalone package.
* gnu/packages/gcc.scm (make-libstdc++): New procedure. (libstdc++-4.9): New variable. * gnu/packages/commencement.scm (libstdc++): Add TODO comment.
-rw-r--r--gnu/packages/commencement.scm1
-rw-r--r--gnu/packages/gcc.scm26
2 files changed, 27 insertions, 0 deletions
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index a5402f0556..9cabaa0886 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -497,6 +497,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(define libstdc++
;; Intermediate libstdc++ that will allow us to build the final GCC
;; (remember that GCC-BOOT0 cannot build libstdc++.)
+ ;; TODO: Write in terms of 'make-libstdc++'.
(package-with-bootstrap-guile
(package (inherit gcc-4.8)
(name "libstdc++")
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index b652521bb8..73e8ae97e8 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -347,6 +347,32 @@ Go. It also includes runtime support libraries for these languages.")
'("gcc-arm-link-spec-fix.patch"
"gcc-5.0-libvtv-runpath.patch")))))))
+(define-public (make-libstdc++ gcc)
+ "Return a libstdc++ package based on GCC. The primary use case is when
+using compilers other than GCC."
+ (package
+ (inherit gcc)
+ (name "libstdc++")
+ (arguments
+ `(#:out-of-source? #t
+ #:phases (alist-cons-before
+ 'configure 'chdir
+ (lambda _
+ (chdir "libstdc++-v3"))
+ %standard-phases)
+ #:configure-flags `("--disable-libstdcxx-pch"
+ ,(string-append "--with-gxx-include-dir="
+ (assoc-ref %outputs "out")
+ "/include"))))
+ (outputs '("out" "debug"))
+ (inputs '())
+ (native-inputs '())
+ (propagated-inputs '())
+ (synopsis "GNU C++ standard library")))
+
+(define-public libstdc++-4.9
+ (make-libstdc++ gcc-4.9))
+
(define* (custom-gcc gcc name languages #:key (separate-lib-output? #t))
"Return a custom version of GCC that supports LANGUAGES."
(package (inherit gcc)