summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu-system.am3
-rw-r--r--gnu/packages/base.scm28
-rw-r--r--gnu/packages/bison.scm4
-rw-r--r--gnu/packages/commencement.scm51
-rw-r--r--gnu/packages/cross-base.scm204
-rw-r--r--gnu/packages/flex.scm2
-rw-r--r--gnu/packages/gawk.scm4
-rw-r--r--gnu/packages/gcc.scm38
-rw-r--r--gnu/packages/linux.scm22
-rw-r--r--gnu/packages/make-bootstrap.scm6
-rw-r--r--gnu/packages/nettle.scm6
-rw-r--r--gnu/packages/patches/findutils-localstatedir.patch14
-rw-r--r--gnu/packages/patches/gawk-shell.patch18
-rw-r--r--gnu/packages/patches/gcc-arm-link-spec-fix.patch4
-rw-r--r--gnu/packages/patches/guile-linux-syscalls.patch6
-rw-r--r--gnu/packages/patches/sed-hurd-path-max.patch34
-rw-r--r--gnu/packages/patches/tar-d_ino_in_dirent-fix.patch33
-rw-r--r--gnu/packages/perl.scm55
-rw-r--r--gnu/packages/xml.scm58
-rw-r--r--guix/packages.scm12
20 files changed, 380 insertions, 222 deletions
diff --git a/gnu-system.am b/gnu-system.am
index 978e839bfa..206c87680e 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -418,6 +418,7 @@ dist_patch_DATA = \
gnu/packages/patches/emacs-exec-path.patch \
gnu/packages/patches/eudev-rules-directory.patch \
gnu/packages/patches/findutils-absolute-paths.patch \
+ gnu/packages/patches/findutils-localstatedir.patch \
gnu/packages/patches/flashrom-use-libftdi1.patch \
gnu/packages/patches/flex-bison-tests.patch \
gnu/packages/patches/fltk-shared-lib-defines.patch \
@@ -537,6 +538,7 @@ dist_patch_DATA = \
gnu/packages/patches/ratpoison-shell.patch \
gnu/packages/patches/readline-link-ncurses.patch \
gnu/packages/patches/ripperx-libm.patch \
+ gnu/packages/patches/sed-hurd-path-max.patch \
gnu/packages/patches/scheme48-tests.patch \
gnu/packages/patches/scotch-test-threading.patch \
gnu/packages/patches/sdl-libx11-1.6.patch \
@@ -548,6 +550,7 @@ dist_patch_DATA = \
gnu/packages/patches/soprano-find-clucene.patch \
gnu/packages/patches/subversion-sqlite-3.8.9-fix.patch \
gnu/packages/patches/superlu-dist-scotchmetis.patch \
+ gnu/packages/patches/tar-d_ino_in_dirent-fix.patch \
gnu/packages/patches/tcsh-fix-autotest.patch \
gnu/packages/patches/teckit-cstdio.patch \
gnu/packages/patches/texi2html-document-encoding.patch \
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index c6206fdce2..091e2f59ec 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -101,7 +101,8 @@ including, for example, recursive directory searching.")
".tar.bz2"))
(sha256
(base32
- "1myvrmh99jsvk7v3d7crm0gcrq51hmmm1r2kjyyci152in1x2j7h"))))
+ "1myvrmh99jsvk7v3d7crm0gcrq51hmmm1r2kjyyci152in1x2j7h"))
+ (patches (list (search-patch "sed-hurd-path-max.patch")))))
(build-system gnu-build-system)
(synopsis "Stream editor")
(arguments
@@ -136,7 +137,8 @@ implementation offers several extensions over the standard utility.")
version ".tar.xz"))
(sha256
(base32
- "1wi2zwm4c9r3h3b8y4w0nm0qq897kn8kyj9k22ba0iqvxj48vvk4"))))
+ "1wi2zwm4c9r3h3b8y4w0nm0qq897kn8kyj9k22ba0iqvxj48vvk4"))
+ (patches (list (search-patch "tar-d_ino_in_dirent-fix.patch")))))
(build-system gnu-build-system)
(synopsis "Managing tar archives")
(description
@@ -205,14 +207,20 @@ interactive means to merge two files.")
(sha256
(base32
"0amn0bbwqvsvvsh6drfwz20ydc2czk374lzw5kksbh6bf78k4ks3"))
- (patches (list (search-patch "findutils-absolute-paths.patch")))))
+ (patches (map search-patch
+ '("findutils-absolute-paths.patch"
+ "findutils-localstatedir.patch")))))
(build-system gnu-build-system)
(arguments
- ;; Work around cross-compilation failure.
- ;; See <http://savannah.gnu.org/bugs/?27299#comment1>.
- (if (%current-target-system)
- '(#:configure-flags '("gl_cv_func_wcwidth_works=yes"))
- '()))
+ `(#:configure-flags (list
+ ;; Tell 'updatedb' to write to /var.
+ "--localstatedir=/var"
+
+ ;; Work around cross-compilation failure. See
+ ;; <http://savannah.gnu.org/bugs/?27299#comment1>.
+ ,@(if (%current-target-system)
+ '("gl_cv_func_wcwidth_works=yes")
+ '()))))
(synopsis "Operating on files matching given criteria")
(description
"Findutils supplies the basic file directory searching utilities of the
@@ -672,14 +680,14 @@ test environments.")
(define-public which
(package
(name "which")
- (version "2.20")
+ (version "2.21")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/which/which-"
version ".tar.gz"))
(sha256
(base32
- "1y2p50zadb36izzh2zw4dm5hvdiydqf3qa88l8kav20dcmfbc5yl"))))
+ "1bgafvy3ypbhhfznwjv1lxmd6mci3x1byilnnkc7gcr486wlb8pl"))))
(build-system gnu-build-system)
(home-page "https://gnu.org/software/which/")
(synopsis "Find full path of shell commands")
diff --git a/gnu/packages/bison.scm b/gnu/packages/bison.scm
index 43ab216797..c8ec8cc274 100644
--- a/gnu/packages/bison.scm
+++ b/gnu/packages/bison.scm
@@ -40,7 +40,9 @@
(base32
"1qbgf6q1n2z17k8g33444m0q68kf3fbiq65q7jlrzpvvj73jh957"))))
(build-system gnu-build-system)
- (native-inputs `(("perl" ,perl)))
+ (native-inputs `(("perl" ,perl)
+ ;; m4 is not present in PATH when cross-building
+ ("m4" ,m4)))
(inputs `(("flex" ,flex)))
(propagated-inputs `(("m4" ,m4)))
(home-page "http://www.gnu.org/software/bison/")
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 9611ff2620..14af09395a 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -139,6 +139,28 @@
(arguments
`(#:guile ,%bootstrap-guile
#:implicit-inputs? #f
+
+ #:modules ((guix build gnu-build-system)
+ (guix build utils)
+ (ice-9 ftw)) ; for 'scandir'
+ #:phases (alist-cons-after
+ 'install 'add-symlinks
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; The cross-gcc invokes 'as', 'ld', etc, without the
+ ;; triplet prefix, so add symlinks.
+ (let ((out (assoc-ref outputs "out"))
+ (triplet-prefix (string-append ,(boot-triplet) "-")))
+ (define (has-triplet-prefix? name)
+ (string-prefix? triplet-prefix name))
+ (define (remove-triplet-prefix name)
+ (substring name (string-length triplet-prefix)))
+ (with-directory-excursion (string-append out "/bin")
+ (for-each (lambda (name)
+ (symlink name (remove-triplet-prefix name)))
+ (scandir "." has-triplet-prefix?)))
+ #t))
+ %standard-phases)
+
,@(substitute-keyword-arguments (package-arguments binutils)
((#:configure-flags cf)
`(cons ,(string-append "--target=" (boot-triplet))
@@ -147,7 +169,7 @@
(define gcc-boot0
(package-with-bootstrap-guile
- (package (inherit gcc-4.8)
+ (package (inherit gcc-4.9)
(name "gcc-cross-boot0")
(arguments
`(#:guile ,%bootstrap-guile
@@ -157,7 +179,7 @@
(ice-9 regex)
(srfi srfi-1)
(srfi srfi-26))
- ,@(substitute-keyword-arguments (package-arguments gcc-4.8)
+ ,@(substitute-keyword-arguments (package-arguments gcc-4.9)
((#:configure-flags flags)
`(append (list ,(string-append "--target=" (boot-triplet))
@@ -179,6 +201,8 @@
"--disable-libsanitizer"
"--disable-libitm"
"--disable-libgomp"
+ "--disable-libcilkrts"
+ "--disable-libvtv"
"--disable-libssp"
"--disable-libquadmath"
"--disable-decimal-float")
@@ -218,7 +242,7 @@
(with-directory-excursion
(string-append out "/lib/gcc/"
,(boot-triplet)
- "/" ,(package-version gcc-4.8))
+ "/" ,(package-version gcc-4.9))
(symlink "libgcc.a" "libgcc_eh.a"))))
,phases))))))
@@ -234,7 +258,7 @@
;; No need for Texinfo at this stage.
(native-inputs (alist-delete "texinfo"
- (package-native-inputs gcc-4.8))))))
+ (package-native-inputs gcc-4.9))))))
(define perl-boot0
(package-with-bootstrap-guile
@@ -272,10 +296,7 @@
;; 2nd stage inputs.
`(("gcc" ,gcc-boot0)
("binutils-cross" ,binutils-boot0)
-
- ;; Keep "binutils" here because the cross-gcc invokes `as', not the
- ;; cross-`as'.
- ,@%boot0-inputs))
+ ,@(alist-delete "binutils" %boot0-inputs)))
(define glibc-final-with-bootstrap-bash
;; The final libc, "cross-built". If everything went well, the resulting
@@ -333,7 +354,7 @@
(define (cross-gcc-wrapper gcc binutils glibc bash)
"Return a wrapper for the pseudo-cross toolchain GCC/BINUTILS/GLIBC
that makes it available under the native tool names."
- (package (inherit gcc-4.8)
+ (package (inherit gcc-4.9)
(name (string-append (package-name gcc) "-wrapped"))
(source #f)
(build-system trivial-build-system)
@@ -500,7 +521,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
;; Intermediate libstdc++ that will allow us to build the final GCC
;; (remember that GCC-BOOT0 cannot build libstdc++.)
(package-with-bootstrap-guile
- (package (inherit gcc-4.8)
+ (package (inherit gcc-4.9)
(name "libstdc++")
(arguments
`(#:guile ,%bootstrap-guile
@@ -519,7 +540,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(assoc-ref %outputs "out")
"/include"
;; "/include/c++/"
- ;; ,(package-version gcc-4.8)
+ ;; ,(package-version gcc-4.9)
))))
(outputs '("out"))
(inputs %boot2-inputs)
@@ -532,6 +553,12 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(package (inherit gcc-boot0)
(name "gcc")
(location (source-properties->location (current-source-location)))
+
+ ;; XXX: Currently #:allowed-references applies to all the outputs but the
+ ;; "debug" output contains disallowed references, notably
+ ;; linux-libre-headers. Disable the debugging output to work around that.
+ (outputs (delete "debug" (package-outputs gcc-boot0)))
+
(arguments
`(#:guile ,%bootstrap-guile
#:implicit-inputs? #f
@@ -548,7 +575,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
;; doesn't honor $LIBRARY_PATH, which breaks `gnu-build-system'.)
,@(substitute-keyword-arguments (package-arguments gcc-boot0)
((#:configure-flags boot-flags)
- (let loop ((args (package-arguments gcc-4.8)))
+ (let loop ((args (package-arguments gcc-4.9)))
(match args
((#:configure-flags normal-flags _ ...)
normal-flags)
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 9a459400e8..e5e21045e0 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -86,101 +86,107 @@ may be either a libc package or #f.)"
;; Set the current target system so that 'glibc-dynamic-linker' returns the
;; right name.
(parameterize ((%current-target-system target))
- (substitute-keyword-arguments (package-arguments gcc-4.8)
- ((#:configure-flags flags)
- `(append (list ,(string-append "--target=" target)
- ,@(if libc
- '()
- `( ;; Disable features not needed at this stage.
- "--disable-shared" "--enable-static"
-
- ;; Disable C++ because libstdc++'s configure
- ;; script otherwise fails with "Link tests are not
- ;; allowed after GCC_NO_EXECUTABLES."
- "--enable-languages=c"
-
- "--disable-threads" ;libgcc, would need libc
- "--disable-libatomic"
- "--disable-libmudflap"
- "--disable-libgomp"
- "--disable-libssp"
- "--disable-libquadmath"
- "--disable-decimal-float" ;would need libc
- )))
-
- ,(if libc
- flags
- `(remove (cut string-match "--enable-languages.*" <>)
- ,flags))))
- ((#:make-flags flags)
- (if libc
- `(let ((libc (assoc-ref %build-inputs "libc")))
- ;; FLAGS_FOR_TARGET are needed for the target libraries to receive
- ;; the -Bxxx for the startfiles.
- (cons (string-append "FLAGS_FOR_TARGET=-B" libc "/lib")
- ,flags))
- flags))
- ((#:phases phases)
- (let ((phases
- `(alist-cons-after
- 'install 'make-cross-binutils-visible
- (lambda* (#:key outputs inputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (libexec (string-append out "/libexec/gcc/"
- ,target))
- (binutils (string-append
- (assoc-ref inputs "binutils-cross")
- "/bin/" ,target "-"))
- (wrapper (string-append
- (assoc-ref inputs "ld-wrapper-cross")
- "/bin/" ,target "-ld")))
- (for-each (lambda (file)
- (symlink (string-append binutils file)
- (string-append libexec "/"
- file)))
- '("as" "nm"))
- (symlink wrapper (string-append libexec "/ld"))
- #t))
- ,phases)))
- (if libc
- `(alist-cons-before
- 'configure 'set-cross-path
- (lambda* (#:key inputs #:allow-other-keys)
- ;; Add the cross Linux headers to CROSS_CPATH, and remove them
- ;; from CPATH.
- (let ((libc (assoc-ref inputs "libc"))
- (linux (assoc-ref inputs
- "libc/linux-headers")))
- (define (cross? x)
- ;; Return #t if X is a cross-libc or cross Linux.
- (or (string-prefix? libc x)
- (string-prefix? linux x)))
-
- (setenv "CROSS_CPATH"
- (string-append libc "/include:"
- linux "/include"))
- (setenv "CROSS_LIBRARY_PATH"
- (string-append libc "/lib"))
-
- (let ((cpath (search-path-as-string->list
- (getenv "CPATH")))
- (libpath (search-path-as-string->list
- (getenv "LIBRARY_PATH"))))
- (setenv "CPATH"
- (list->search-path-as-string
- (remove cross? cpath) ":"))
- (setenv "LIBRARY_PATH"
- (list->search-path-as-string
- (remove cross? libpath) ":"))
- #t)))
- ,phases)
- phases)))
- ((#:strip-binaries? _)
- ;; Disable stripping as this can break binaries, with object files of
- ;; libgcc.a showing up as having an unknown architecture. See
- ;; <http://lists.fedoraproject.org/pipermail/arm/2010-August/000663.html>
- ;; for instance.
- #f))))
+ ;; Disable stripping as this can break binaries, with object files of
+ ;; libgcc.a showing up as having an unknown architecture. See
+ ;; <http://lists.fedoraproject.org/pipermail/arm/2010-August/000663.html>
+ ;; for instance.
+ (let ((args `(#:strip-binaries? #f
+ ,@(package-arguments gcc-4.9))))
+ (substitute-keyword-arguments args
+ ((#:configure-flags flags)
+ `(append (list ,(string-append "--target=" target)
+ ,@(if libc
+ '()
+ `( ;; Disable features not needed at this stage.
+ "--disable-shared" "--enable-static"
+
+ ;; Disable C++ because libstdc++'s configure
+ ;; script otherwise fails with "Link tests are not
+ ;; allowed after GCC_NO_EXECUTABLES."
+ "--enable-languages=c"
+
+ "--disable-threads" ;libgcc, would need libc
+ "--disable-libatomic"
+ "--disable-libmudflap"
+ "--disable-libgomp"
+ "--disable-libssp"
+ "--disable-libquadmath"
+ "--disable-decimal-float" ;would need libc
+ )))
+
+ ,(if libc
+ flags
+ `(remove (cut string-match "--enable-languages.*" <>)
+ ,flags))))
+ ((#:make-flags flags)
+ (if libc
+ `(let ((libc (assoc-ref %build-inputs "libc")))
+ ;; FLAGS_FOR_TARGET are needed for the target libraries to receive
+ ;; the -Bxxx for the startfiles.
+ (cons (string-append "FLAGS_FOR_TARGET=-B" libc "/lib")
+ ,flags))
+ flags))
+ ((#:phases phases)
+ (let ((phases
+ `(alist-cons-after
+ 'install 'make-cross-binutils-visible
+ (lambda* (#:key outputs inputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (libexec (string-append out "/libexec/gcc/"
+ ,target))
+ (binutils (string-append
+ (assoc-ref inputs "binutils-cross")
+ "/bin/" ,target "-"))
+ (wrapper (string-append
+ (assoc-ref inputs "ld-wrapper-cross")
+ "/bin/" ,target "-ld")))
+ (for-each (lambda (file)
+ (symlink (string-append binutils file)
+ (string-append libexec "/"
+ file)))
+ '("as" "nm"))
+ (symlink wrapper (string-append libexec "/ld"))
+ #t))
+ (alist-replace
+ 'install
+ (lambda _
+ ;; Unlike our 'strip' phase, this will do the right thing
+ ;; for cross-compilers.
+ (zero? (system* "make" "install-strip")))
+ ,phases))))
+ (if libc
+ `(alist-cons-before
+ 'configure 'set-cross-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Add the cross Linux headers to CROSS_CPATH, and remove them
+ ;; from CPATH.
+ (let ((libc (assoc-ref inputs "libc"))
+ (linux (assoc-ref inputs
+ "libc/linux-headers")))
+ (define (cross? x)
+ ;; Return #t if X is a cross-libc or cross Linux.
+ (or (string-prefix? libc x)
+ (string-prefix? linux x)))
+
+ (setenv "CROSS_CPATH"
+ (string-append libc "/include:"
+ linux "/include"))
+ (setenv "CROSS_LIBRARY_PATH"
+ (string-append libc "/lib"))
+
+ (let ((cpath (search-path-as-string->list
+ (getenv "CPATH")))
+ (libpath (search-path-as-string->list
+ (getenv "LIBRARY_PATH"))))
+ (setenv "CPATH"
+ (list->search-path-as-string
+ (remove cross? cpath) ":"))
+ (setenv "LIBRARY_PATH"
+ (list->search-path-as-string
+ (remove cross? libpath) ":"))
+ #t)))
+ ,phases)
+ phases)))))))
(define (cross-gcc-patches target)
"Return GCC patches needed for TARGET."
@@ -194,14 +200,14 @@ may be either a libc package or #f.)"
"Return a cross-compiler for TARGET, where TARGET is a GNU triplet. Use
XBINUTILS as the associated cross-Binutils. If LIBC is false, then build a
GCC that does not target a libc; otherwise, target that libc."
- (package (inherit gcc-4.8)
+ (package (inherit gcc-4.9)
(name (string-append "gcc-cross-"
(if libc "" "sans-libc-")
target))
- (source (origin (inherit (package-source gcc-4.8))
+ (source (origin (inherit (package-source gcc-4.9))
(patches
(append
- (origin-patches (package-source gcc-4.8))
+ (origin-patches (package-source gcc-4.9))
(cons (search-patch "gcc-cross-environment-variables.patch")
(cross-gcc-patches target))))))
@@ -231,7 +237,7 @@ GCC that does not target a libc; otherwise, target that libc."
("libc-native" ,@(assoc-ref %final-inputs "libc"))
;; Remaining inputs.
- ,@(let ((inputs (append (package-inputs gcc-4.8)
+ ,@(let ((inputs (append (package-inputs gcc-4.9)
(alist-delete "libc" %final-inputs))))
(if libc
`(("libc" ,libc)
diff --git a/gnu/packages/flex.scm b/gnu/packages/flex.scm
index e76535cc17..7988e930e7 100644
--- a/gnu/packages/flex.scm
+++ b/gnu/packages/flex.scm
@@ -60,6 +60,8 @@
(inputs (alist-delete "flex" (package-inputs bison))))))
`(("bison" ,bison-for-tests)
("indent" ,indent))))
+ ;; m4 is not present in PATH when cross-building
+ (native-inputs `(("m4" ,m4)))
(propagated-inputs `(("m4" ,m4)))
(home-page "http://flex.sourceforge.net/")
(synopsis "Fast lexical analyser generator")
diff --git a/gnu/packages/gawk.scm b/gnu/packages/gawk.scm
index 06ecf6a064..d2639a32a3 100644
--- a/gnu/packages/gawk.scm
+++ b/gnu/packages/gawk.scm
@@ -28,13 +28,13 @@
(define-public gawk
(package
(name "gawk")
- (version "4.1.1")
+ (version "4.1.3")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/gawk/gawk-" version
".tar.xz"))
(sha256
- (base32 "1nz83vpss8xv7m475sv4qhhj40g74nvcw0y9kwq9ds8wzfmcdm7g"))))
+ (base32 "09d6pmx6h3i2glafm0jd1v1iyrs03vcyv2rkz12jisii3vlmbkz3"))))
(build-system gnu-build-system)
(arguments
`(#:parallel-tests? #f ; test suite fails in parallel
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index b652521bb8..414f31cb3c 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -64,15 +64,7 @@ where the OS part is overloaded to denote a specific ABI---into GCC
'())))
(define-public gcc-4.7
- (let* ((stripped? #t) ; TODO: make this a parameter
- (install-target
- (lambda ()
- ;; The 'install-strip' rule uses the native 'strip' instead of
- ;; 'TARGET-strip' when cross-compiling. Thus, use 'install' in that
- ;; case.
- (if (and stripped? (not (%current-target-system)))
- "install-strip"
- "install")))
+ (let* ((stripped? #t) ;whether to strip the compiler, not the libraries
(maybe-target-tools
(lambda ()
;; Return the `_FOR_TARGET' variables that are needed when
@@ -144,8 +136,9 @@ where the OS part is overloaded to denote a specific ABI---into GCC
;; Separate out the run-time support libraries because all the
;; dynamic-linked objects depend on it.
- (outputs '("out" ; commands, etc. (60+ MiB)
- "lib")) ; libgcc_s, libgomp, etc. (15+ MiB)
+ (outputs '("out" ;commands, etc. (60+ MiB)
+ "lib" ;libgcc_s, libgomp, etc. (15+ MiB)
+ "debug")) ;debug symbols of run-time libraries
(inputs `(("gmp" ,gmp)
("mpfr" ,mpfr)
@@ -160,7 +153,6 @@ where the OS part is overloaded to denote a specific ABI---into GCC
(arguments
`(#:out-of-source? #t
- #:strip-binaries? ,stripped?
#:configure-flags ,(configure-flags)
#:make-flags
;; None of the flags below are needed when doing a Canadian cross.
@@ -235,8 +227,8 @@ where the OS part is overloaded to denote a specific ABI---into GCC
;; below, make sure to update the relevant code in
;; %gcc-static package as needed.
(format #f "#define GNU_USER_TARGET_LIB_SPEC \
-\"-L~a/lib %{!static:-rpath=~a/lib %{!static-libgcc:-rpath=~a/lib64 -rpath=~a/lib -lgcc_s}} \" ~a"
- libc libc libdir libdir suffix))
+\"-L~a/lib %{!static:-rpath=~a/lib %{!static-libgcc:-rpath=~a/lib -lgcc_s}} \" ~a"
+ libc libc libdir suffix))
(("#define GNU_USER_TARGET_STARTFILE_SPEC.*$" line)
(format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib\"
#define STANDARD_STARTFILE_PREFIX_2 \"\"
@@ -248,6 +240,14 @@ where the OS part is overloaded to denote a specific ABI---into GCC
(("static char const sed_cmd_z\\[\\] =.*;")
"static char const sed_cmd_z[] = \"sed\";"))
+ (when (file-exists? "libbacktrace")
+ ;; GCC 4.8+ comes with libbacktrace. By default it builds
+ ;; with -Werror, which fails with a -Wcast-qual error in glibc
+ ;; 2.21's stdlib-bsearch.h. Remove -Werror.
+ (substitute* "libbacktrace/configure"
+ (("WARN_FLAGS=(.*)-Werror" _ flags)
+ (string-append "WARN_FLAGS=" flags))))
+
;; Add a RUNPATH to libstdc++.so so that it finds libgcc_s.
;; See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32354>
;; and <http://bugs.gnu.org/20358>.
@@ -280,11 +280,7 @@ where the OS part is overloaded to denote a specific ABI---into GCC
(substitute* "Makefile"
(("^TOPLEVEL_CONFIGURE_ARGUMENTS=(.*)$" _ rest)
"TOPLEVEL_CONFIGURE_ARGUMENTS=\n")))
- (alist-replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (zero?
- (system* "make" ,(install-target))))
- %standard-phases)))))
+ %standard-phases))))
(native-search-paths
(list (search-path-specification
@@ -313,10 +309,6 @@ Go. It also includes runtime support libraries for these languages.")
(sha256
(base32
"15c6gwm6dzsaagamxkak5smdkf1rdfbqqjs9jdbrp3lbg4ism02a"))
-
- ;; ARM 'link' spec issue reported at
- ;; <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65711> and
- ;; <https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01387.html>.
(patches (list (search-patch "gcc-arm-link-spec-fix.patch")))))))
(define-public gcc-4.9
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index f636b91bf0..1b220c4e32 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -108,12 +108,21 @@
(and (zero? (system* "make"
(string-append "INSTALL_HDR_PATH=" out)
"headers_install"))
- (mkdir (string-append out "/include/config"))
- (call-with-output-file
- (string-append out
- "/include/config/kernel.release")
- (lambda (p)
- (format p "~a-default~%" ,version))))))))
+ (begin
+ (mkdir (string-append out "/include/config"))
+ (call-with-output-file
+ (string-append out
+ "/include/config/kernel.release")
+ (lambda (p)
+ (format p "~a-default~%" ,version)))
+
+ ;; Remove the '.install' and '..install.cmd' files; the
+ ;; latter contains store paths, which pulls in bootstrap
+ ;; binaries in the build environment, and prevents bit
+ ;; reproducibility for the bootstrap binaries.
+ (for-each delete-file (find-files out "\\.install"))
+
+ #t))))))
(package
(name "linux-libre-headers")
(version version)
@@ -135,6 +144,7 @@
(alist-replace
'install ,install-phase
(alist-delete 'configure %standard-phases)))
+ #:allowed-references ()
#:tests? #f))
(synopsis "GNU Linux-Libre kernel headers")
(description "Headers of the Linux-Libre kernel.")
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index 88fad0e604..9eb868a118 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -374,10 +374,6 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(copy-recursively (string-append linux "/include/asm-generic")
(string-append incdir "/asm-generic"))
- ;; Remove the '.install' and '..install.cmd' files; the latter
- ;; contains store paths, which prevents bit reproducibility.
- (for-each delete-file (find-files incdir "\\.install"))
-
#t))))
(inputs `(("libc" ,(let ((target (%current-target-system)))
(if target
diff --git a/gnu/packages/nettle.scm b/gnu/packages/nettle.scm
index ed140d43c0..77c5080c0a 100644
--- a/gnu/packages/nettle.scm
+++ b/gnu/packages/nettle.scm
@@ -56,17 +56,17 @@ themselves.")
(license gpl2+)))
(define-public nettle
- ;; This version is not API-compatible with version 2. In particular GnuTLS
+ ;; This version is not API-compatible with version 2. In particular, lsh
;; cannot use it yet. So keep it separate.
(package (inherit nettle-2)
- (version "3.1")
+ (version "3.1.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/nettle/nettle-"
version ".tar.gz"))
(sha256
(base32
- "1ly9kz5fgc8ilykz07crqwgjsfn4p2s6565gj1aq0w4fr179v1gn"))))
+ "0k1x57zviysvi91lkk66cg8v819vywm5g5yqs22wppfqcifx5m2z"))))
(arguments
(substitute-keyword-arguments (package-arguments nettle-2)
((#:configure-flags flags)
diff --git a/gnu/packages/patches/findutils-localstatedir.patch b/gnu/packages/patches/findutils-localstatedir.patch
new file mode 100644
index 0000000000..c774303cf1
--- /dev/null
+++ b/gnu/packages/patches/findutils-localstatedir.patch
@@ -0,0 +1,14 @@
+Do not try to create $localstatedir (aka. /var) since we don't have
+write access.
+
+--- findutils-4.4.2/locate/Makefile.in 2015-06-04 12:40:52.690935795 +0200
++++ findutils-4.4.2/locate/Makefile.in 2015-06-04 12:41:32.087286685 +0200
+@@ -1212,7 +1212,7 @@ updatedb: updatedb.sh Makefile
+ chmod +x $@
+
+ install-data-hook:
+- $(top_srcdir)/build-aux/mkinstalldirs $(DESTDIR)$(localstatedir)
++ true
+
+ dblocation.texi: Makefile
+ echo '@set LOCATE_DB $(LOCATE_DB)' > $@
diff --git a/gnu/packages/patches/gawk-shell.patch b/gnu/packages/patches/gawk-shell.patch
index 89b8540a8d..80e9c65475 100644
--- a/gnu/packages/patches/gawk-shell.patch
+++ b/gnu/packages/patches/gawk-shell.patch
@@ -2,9 +2,9 @@ As for libc's `system', change Awk to look for `sh' in $PATH. This patch is
only meant to be used during bootstrapping, where we don't know in advance the
absolute file name of `sh'.
---- gawk-4.0.0/io.c 2011-05-18 20:47:29.000000000 +0200
-+++ gawk-4.0.0/io.c 2012-12-18 15:56:06.000000000 +0100
-@@ -1759,7 +1759,7 @@ two_way_open(const char *str, struct red
+--- gawk-4.1.3/io.c 2015-05-19 15:37:20.000000000 +0200
++++ gawk-4.1.3/io.c 2015-06-09 18:39:36.918414881 +0200
+@@ -1945,7 +1945,7 @@ two_way_open(const char *str, struct red
signal(SIGPIPE, SIG_DFL);
@@ -13,22 +13,22 @@ absolute file name of `sh'.
_exit(errno == ENOENT ? 127 : 126);
case -1:
-@@ -1924,7 +1924,7 @@ use_pipes:
- || close(ctop[0]) == -1 || close(ctop[1]) == -1)
+@@ -2129,7 +2129,7 @@ use_pipes:
fatal(_("close of pipe failed (%s)"), strerror(errno));
/* stderr does NOT get dup'ed onto child's stdout */
+ signal(SIGPIPE, SIG_DFL);
- execl("/bin/sh", "sh", "-c", str, NULL);
+ execlp("sh", "sh", "-c", str, NULL);
_exit(errno == ENOENT ? 127 : 126);
}
- #endif /* NOT __EMX__ */
-@@ -2074,7 +2074,7 @@ gawk_popen(const char *cmd, struct redir
- fatal(_("moving pipe to stdout in child failed (dup: %s)"), strerror(errno));
+ #endif /* NOT __EMX__, NOT __MINGW32__ */
+@@ -2323,7 +2323,7 @@ gawk_popen(const char *cmd, struct redir
if (close(p[0]) == -1 || close(p[1]) == -1)
fatal(_("close of pipe failed (%s)"), strerror(errno));
+ signal(SIGPIPE, SIG_DFL);
- execl("/bin/sh", "sh", "-c", cmd, NULL);
+ execlp("sh", "sh", "-c", cmd, NULL);
_exit(errno == ENOENT ? 127 : 126);
}
- #endif /* NOT __EMX__ */
+ #endif /* NOT __EMX__, NOT __MINGW32__ */
diff --git a/gnu/packages/patches/gcc-arm-link-spec-fix.patch b/gnu/packages/patches/gcc-arm-link-spec-fix.patch
index 0ffe8a1810..e00ed1bac0 100644
--- a/gnu/packages/patches/gcc-arm-link-spec-fix.patch
+++ b/gnu/packages/patches/gcc-arm-link-spec-fix.patch
@@ -1,6 +1,10 @@
Do not pass -dynamic-linker to linker when !shared.
Fixes <http://bugs.gnu.org/20102>.
+ARM 'link' spec issue reported at
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65711 and
+https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01387.html.
+
Patch by Ludovic Courtès <ludo@gnu.org>.
--- gcc-4.8.4/gcc/config/arm/linux-elf.h.orig 2015-04-08 20:31:20.376900478 +0200
diff --git a/gnu/packages/patches/guile-linux-syscalls.patch b/gnu/packages/patches/guile-linux-syscalls.patch
index 57c7f2589d..25a5e90e35 100644
--- a/gnu/packages/patches/guile-linux-syscalls.patch
+++ b/gnu/packages/patches/guile-linux-syscalls.patch
@@ -7,12 +7,13 @@ diff --git a/libguile/posix.c b/libguile/posix.c
index 324f21b..cbee94d 100644
--- a/libguile/posix.c
+++ b/libguile/posix.c
-@@ -2286,6 +2286,261 @@ scm_init_popen (void)
+@@ -2245,6 +2245,263 @@ scm_init_popen (void)
}
#endif
+
+/* Linux! */
++#ifdef __linux__
+
+#include <sys/mount.h>
+#include "libguile/foreign.h"
@@ -265,7 +266,10 @@ index 324f21b..cbee94d 100644
+ return scm_from_short (ifr.ifr_flags);
+}
+#undef FUNC_NAME
++#endif
+
void
scm_init_posix ()
{
+--
+2.4.1
diff --git a/gnu/packages/patches/sed-hurd-path-max.patch b/gnu/packages/patches/sed-hurd-path-max.patch
new file mode 100644
index 0000000000..5226cba4cb
--- /dev/null
+++ b/gnu/packages/patches/sed-hurd-path-max.patch
@@ -0,0 +1,34 @@
+7bb8d35d0330161a5af5341471d0c183a067e8c2
+Author: Jose E. Marchesi <jemarch@gnu.org>
+Date: Sun Oct 6 14:43:38 2013 +0200
+
+ Set PATH_MAX to some constant in case it is not defined in system
+ headers.
+
+ 2013-10-06 Jose E. Marchesi <jemarch@gnu.org>
+
+ * basicdefs.h (PATH_MAX): Defined to some constant in case it is
+ not defined by system headers.
+ * sed/utils.c: Do not include pathmax.h anymore.
+ * bootstrap.conf (gnulib_modules): Do not use the gnulib module
+ pathmax.
+
+diff --git a/basicdefs.h b/basicdefs.h
+index 0d28a97..09f5beb 100644
+--- a/basicdefs.h
++++ b/basicdefs.h
+@@ -40,6 +41,13 @@ typedef unsigned long countT;
+ #define obstack_chunk_alloc ck_malloc
+ #define obstack_chunk_free free
+
++/* MAX_PATH is not defined in some platforms, most notably GNU/Hurd.
++ In that case we define it here to some constant. Note however that
++ this relies in the fact that sed does reallocation if a buffer
++ needs to be larger than PATH_MAX. */
++#ifndef PATH_MAX
++# define PATH_MAX 200
++#endif
+
+ /* handle misdesigned <ctype.h> macros (snarfed from lib/regex.c) */
+ /* Jim Meyering writes:
+
diff --git a/gnu/packages/patches/tar-d_ino_in_dirent-fix.patch b/gnu/packages/patches/tar-d_ino_in_dirent-fix.patch
new file mode 100644
index 0000000000..39d8e2b20a
--- /dev/null
+++ b/gnu/packages/patches/tar-d_ino_in_dirent-fix.patch
@@ -0,0 +1,33 @@
+commit e9ddc08da0982f36581ae5a8c7763453ff41cfe8
+Author: Sergey Poznyakoff <gray@gnu.org>
+Date: Thu Sep 25 00:22:16 2014 +0300
+
+ Bugfixes.
+
+ * doc/tar.1: Fix typo in font spec.
+ * src/tar.c (sort_mode_arg, sort_mode_flag): Protect "inode"
+ (SAVEDIR_SORT_INODE) with D_INO_IN_DIRENT
+
+diff --git a/src/tar.c b/src/tar.c
+index 225c624..f8102e0 100644
+--- a/src/tar.c
++++ b/src/tar.c
+@@ -1341,14 +1341,18 @@ static char filename_terminator;
+ static char const *const sort_mode_arg[] = {
+ "none",
+ "name",
++#if D_INO_IN_DIRENT
+ "inode",
++#endif
+ NULL
+ };
+
+ static int sort_mode_flag[] = {
+ SAVEDIR_SORT_NONE,
+ SAVEDIR_SORT_NAME,
++#if D_INO_IN_DIRENT
+ SAVEDIR_SORT_INODE
++#endif
+ };
+
+ ARGMATCH_VERIFY (sort_mode_arg, sort_mode_flag); \ No newline at end of file
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index e5ec25e418..45ca94b279 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -51,28 +51,39 @@
(arguments
'(#:tests? #f
#:phases
- (alist-replace
- 'configure
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (libc (assoc-ref inputs "libc")))
- ;; Use the right path for `pwd'.
- (substitute* "dist/Cwd/Cwd.pm"
- (("/bin/pwd")
- (which "pwd")))
-
- (zero?
- (system* "./Configure"
- (string-append "-Dprefix=" out)
- (string-append "-Dman1dir=" out "/share/man/man1")
- (string-append "-Dman3dir=" out "/share/man/man3")
- "-de" "-Dcc=gcc"
- "-Uinstallusrbinperl"
- "-Dinstallstyle=lib/perl5"
- "-Duseshrplib"
- (string-append "-Dlocincpth=" libc "/include")
- (string-append "-Dloclibpth=" libc "/lib")))))
- %standard-phases)))
+ (modify-phases %standard-phases
+ (replace
+ 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (libc (assoc-ref inputs "libc")))
+ ;; Use the right path for `pwd'.
+ (substitute* "dist/Cwd/Cwd.pm"
+ (("/bin/pwd")
+ (which "pwd")))
+
+ (zero?
+ (system* "./Configure"
+ (string-append "-Dprefix=" out)
+ (string-append "-Dman1dir=" out "/share/man/man1")
+ (string-append "-Dman3dir=" out "/share/man/man3")
+ "-de" "-Dcc=gcc"
+ "-Uinstallusrbinperl"
+ "-Dinstallstyle=lib/perl5"
+ "-Duseshrplib"
+ (string-append "-Dlocincpth=" libc "/include")
+ (string-append "-Dloclibpth=" libc "/lib"))))))
+
+ (add-before
+ 'strip 'make-shared-objects-writable
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; The 'lib/perl5' directory contains ~50 MiB of .so. Make them
+ ;; writable so that 'strip' actually strips them.
+ (let* ((out (assoc-ref outputs "out"))
+ (lib (string-append out "/lib")))
+ (for-each (lambda (dso)
+ (chmod dso #o755))
+ (find-files lib "\\.so$"))))))))
(native-search-paths (list (search-path-specification
(variable "PERL5LIB")
(files '("lib/perl5/site_perl")))))
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 8a4d2fbb5b..59b73d2aa5 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -32,6 +33,7 @@
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system perl)
+ #:use-module (guix build-system python)
#:use-module (gnu packages linux))
(define-public expat
@@ -57,22 +59,19 @@ things the parser might find in the XML document (like start tags).")
(define-public libxml2
(package
(name "libxml2")
- (version "2.9.0")
+ (version "2.9.2")
(source (origin
(method url-fetch)
(uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-"
version ".tar.gz"))
(sha256
(base32
- "10ib8bpar2pl68aqksfinvfmqknwnk7i35ibq6yjl8dpb0cxj9dd"))))
+ "1g6mf03xcabmk5ing1lwqmasr803616gb2xhn7pll10x2l5w6y2i"))))
(build-system gnu-build-system)
(home-page "http://www.xmlsoft.org/")
(synopsis "C parser for XML")
(propagated-inputs `(("zlib" ,zlib))) ; libxml2.la says '-lz'.
- (native-inputs `(("perl" ,perl)
- ("python" ,python-2))) ; incompatible with Python 3 (print syntax)
-
-
+ (native-inputs `(("perl" ,perl)))
;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml'
;; sub-directory of any given package.
(native-search-paths (list (search-path-specification
@@ -82,29 +81,40 @@ things the parser might find in the XML document (like start tags).")
(file-pattern "^catalog\\.xml$")
(file-type 'regular))))
(search-paths native-search-paths)
-
- (arguments
- `(#:phases
- (alist-replace
- 'install
- (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
- (let ((install (assoc-ref %standard-phases 'install))
- (glibc (assoc-ref inputs ,(if (%current-target-system)
- "cross-libc" "libc")))
- (out (assoc-ref outputs "out")))
- (apply install args)
- (chdir "python")
- (substitute* "setup.py"
- (("/opt/include")
- (string-append glibc "/include")))
- (system* "python" "setup.py" "install"
- (string-append "--prefix=" out))))
- %standard-phases)))
(description
"Libxml2 is the XML C parser and toolkit developed for the Gnome project
(but it is usable outside of the Gnome platform).")
(license license:x11)))
+(define-public python-libxml2
+ (package (inherit libxml2)
+ (name "python-libxml2")
+ (build-system python-build-system)
+ (arguments
+ `(;; XXX: Tests are specified in 'Makefile.am', but not in 'setup.py'.
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-before
+ 'build 'configure
+ (lambda* (#:key inputs #:allow-other-keys)
+ (chdir "python")
+ (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
+ "cross-libc" "libc")))
+ (libxml2 (assoc-ref inputs "libxml2")))
+ (substitute* "setup.py"
+ ;; For 'libxml2/libxml/tree.h'.
+ (("ROOT = r'/usr'")
+ (format #f "ROOT = r'~a'" libxml2))
+ ;; For 'iconv.h'.
+ (("/opt/include")
+ (string-append glibc "/include")))))))))
+ (inputs `(("libxml2" ,libxml2)))
+ (synopsis "Python bindings for the libxml2 library")))
+
+(define-public python2-libxml2
+ (package-with-python2 python-libxml2))
+
(define-public libxslt
(package
(name "libxslt")
diff --git a/guix/packages.scm b/guix/packages.scm
index c955b35155..cbe6127f28 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -315,8 +315,11 @@ representation."
(string-append (package-name package) "-" (package-version package)))
(define (%standard-patch-inputs)
- (let ((ref (lambda (module var)
- (module-ref (resolve-interface module) var))))
+ (let* ((canonical (module-ref (resolve-interface '(gnu packages base))
+ 'canonical-package))
+ (ref (lambda (module var)
+ (canonical
+ (module-ref (resolve-interface module) var)))))
`(("tar" ,(ref '(gnu packages base) 'tar))
("xz" ,(ref '(gnu packages compression) 'xz))
("bzip2" ,(ref '(gnu packages compression) 'bzip2))
@@ -324,8 +327,7 @@ representation."
("lzip" ,(ref '(gnu packages compression) 'lzip))
("unzip" ,(ref '(gnu packages zip) 'unzip))
("patch" ,(ref '(gnu packages base) 'patch))
- ("locales" ,(ref '(gnu packages commencement)
- 'glibc-utf8-locales-final)))))
+ ("locales" ,(ref '(gnu packages base) 'glibc-utf8-locales)))))
(define (default-guile)
"Return the default Guile package used to run the build code of
@@ -445,7 +447,7 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET."
;; SOURCE may be either a directory or a tarball.
(and (if (file-is-directory? #+source)
- (let* ((store (or (getenv "NIX_STORE") "/gnu/store"))
+ (let* ((store (%store-directory))
(len (+ 1 (string-length store)))
(base (string-drop #+source len))
(dash (string-index base #\-))