aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2015-06-27 11:47:04 +0200
committerRicardo Wurmus <rekado@elephly.net>2015-06-29 21:01:13 +0200
commit2b6b6d13e7d6b414440fc2260facbe5a6c3af9fe (patch)
treee04731873ece67bc35a5b4412ee868c15bd9e052
parent74e03fccd35e3d7ae664d9ae76102c7ce7853e40 (diff)
downloadguix-2b6b6d13e7d6b414440fc2260facbe5a6c3af9fe.tar
guix-2b6b6d13e7d6b414440fc2260facbe5a6c3af9fe.tar.gz
gnu: Add libiberty.
* gnu/packages/gcc.scm (make-libiberty, libiberty): New variables.
-rw-r--r--gnu/packages/gcc.scm35
1 files changed, 35 insertions, 0 deletions
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index c81d700b69..39e99c1228 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -373,6 +373,41 @@ using compilers other than GCC."
(define-public libstdc++-4.9
(make-libstdc++ gcc-4.9))
+(define (make-libiberty gcc)
+ "Return a libiberty package based on GCC."
+ (package
+ (inherit gcc)
+ (name "libiberty")
+ (arguments
+ `(#:out-of-source? #t
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'chdir
+ (lambda _
+ (chdir "libiberty")
+ #t))
+ (replace
+ 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (lib (string-append out "/lib/"))
+ (include (string-append out "/include/")))
+ (mkdir-p lib)
+ (mkdir-p include)
+ (copy-file "libiberty.a"
+ (string-append lib "libiberty.a"))
+ (copy-file "../include/libiberty.h"
+ (string-append include "libiberty.h"))
+ #t))))))
+ (inputs '())
+ (outputs '("out"))
+ (native-inputs '())
+ (propagated-inputs '())
+ (synopsis "Collection of subroutines used by various GNU programs")))
+
+(define-public libiberty
+ (make-libiberty gcc))
+
(define* (custom-gcc gcc name languages #:key (separate-lib-output? #t))
"Return a custom version of GCC that supports LANGUAGES."
(package (inherit gcc)