From 7e3c9f741b8a5ee3551be6ba5fe1721b4fb30e8a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 2 Apr 2015 10:26:15 +0200 Subject: gnu: gcc: Fix libgcc_s directory in RUNPATH for cross-compiled binaries. * gnu/packages/gcc.scm (gcc-4.7): Add 'libdir' procedure. Use it to determine the right libdir, including when cross-compiling. This fixes a bug whereby the RUNPATH of cross-compiled binaries would be set to $crossgcc/lib instead of $crossgcc/$triplet/lib. See for an example. --- gnu/packages/gcc.scm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'gnu/packages/gcc.scm') diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 27e40f2f66..68c9e98762 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -85,6 +85,14 @@ (define-public gcc-4.7 '("CC" "CXX" "LD" "AR" "NM" "RANLIB" "STRIP") '("gcc" "g++" "ld" "ar" "nm" "ranlib" "strip")) '())))) + (libdir + (let ((base '(or (assoc-ref outputs "lib") + (assoc-ref outputs "out")))) + (lambda () + ;; Return the directory that contains lib/libgcc_s.so et al. + (if (%current-target-system) + `(string-append ,base "/" ,(%current-target-system)) + base)))) (configure-flags (lambda () ;; This is terrible. Since we have two levels of quasiquotation, @@ -185,8 +193,7 @@ (define-public gcc-4.7 (alist-cons-before 'configure 'pre-configure (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((libdir (or (assoc-ref outputs "lib") - (assoc-ref outputs "out"))) + (let ((libdir ,(libdir)) (libc (assoc-ref inputs "libc"))) (when libc ;; The following is not performed for `--without-headers' -- cgit v1.2.3 From dfc8bb207104cb3c25c0922508acf6d3c27b69fc Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 7 Apr 2015 21:24:37 +0200 Subject: gnu: gcc: Disable RUNPATH validation for native builds. * gnu/packages/gcc.scm (gcc-4.7)[arguments]: Pass #:validate-runpath? #f. * gnu/packages/commencement.scm (gcc-boot0)[arguments]: Override #:validate-runpath? with 'substitute-keyword-arguments'. (gcc-final)[arguments]: Likewise. * gnu/packages/cross-base.scm (cross-gcc-arguments): Likewise. --- gnu/packages/commencement.scm | 12 +++++++----- gnu/packages/cross-base.scm | 2 ++ gnu/packages/gcc.scm | 5 +++++ 3 files changed, 14 insertions(+), 5 deletions(-) (limited to 'gnu/packages/gcc.scm') diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 766aea4bfd..14af246e99 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -158,6 +158,8 @@ (define gcc-boot0 (srfi srfi-1) (srfi srfi-26)) ,@(substitute-keyword-arguments (package-arguments gcc-4.8) + ((#:validate-runpath? _) + #t) ((#:configure-flags flags) `(append (list ,(string-append "--target=" (boot-triplet)) @@ -500,11 +502,6 @@ (define-public gcc-final #:allowed-references ("out" "lib" ,glibc-final) - ;; Things like libasan.so and libstdc++.so NEED ld.so and/or - ;; libgcc_s.so but RUNPATH is empty. This is a false positive, so turn - ;; it off. - #:validate-runpath? #f - ;; Build again GMP & co. within GCC's build process, because it's hard ;; to do outside (because GCC-BOOT0 is a cross-compiler, and thus ;; doesn't honor $LIBRARY_PATH, which breaks `gnu-build-system'.) @@ -529,6 +526,11 @@ (define-public gcc-final "/lib") flag)) ,flags))) + ((#:validate-runpath? _) + ;; Things like libasan.so and libstdc++.so NEED ld.so and/or + ;; libgcc_s.so but RUNPATH is empty. This is a false positive, so + ;; turn it off. + #f) ((#:phases phases) `(alist-delete 'symlink-libgcc_eh ,phases))))) diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 565a4a8220..0f15a0aaec 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -175,6 +175,8 @@ (define (cross? x) #t))) ,phases) phases))) + ((#:validate-runpath? _) + #t) ((#:strip-binaries? _) ;; Disable stripping as this can break binaries, with object files of ;; libgcc.a showing up as having an unknown architecture. See diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 68c9e98762..4c06f84155 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -189,6 +189,11 @@ (define-public gcc-4.7 ,(if stripped? "-g0" "-g"))))) #:tests? #f + + ;; libstdc++.so NEEDs libgcc_s.so but somehow it doesn't get + ;; $(libdir) in its RUNPATH, so turn it off. + #:validate-runpath? #f + #:phases (alist-cons-before 'configure 'pre-configure -- cgit v1.2.3 From 1421afa94a825d413a5609ef0d89b878e1ba458c Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Thu, 9 Apr 2015 01:48:05 -0400 Subject: gnu: gcc: Do not pass -dynamic-linker to linker when !shared on arm. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes . * gnu/packages/patches/gcc-arm-link-spec-fix.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/gcc.scm (gcc-4.8, gcc-4.9): Add patch. * gnu/packages/cross-base.scm (cross-gcc): Preserve patches from gcc-4.8. Co-Authored-By: Ludovic Courtès --- gnu-system.am | 1 + gnu/packages/cross-base.scm | 6 ++++-- gnu/packages/gcc.scm | 6 ++++-- gnu/packages/patches/gcc-arm-link-spec-fix.patch | 16 ++++++++++++++++ 4 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 gnu/packages/patches/gcc-arm-link-spec-fix.patch (limited to 'gnu/packages/gcc.scm') diff --git a/gnu-system.am b/gnu-system.am index f9b58ddaa7..e09ea333f1 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -412,6 +412,7 @@ dist_patch_DATA = \ gnu/packages/patches/flashrom-use-libftdi1.patch \ gnu/packages/patches/flex-bison-tests.patch \ gnu/packages/patches/gawk-shell.patch \ + gnu/packages/patches/gcc-arm-link-spec-fix.patch \ gnu/packages/patches/gcc-cross-environment-variables.patch \ gnu/packages/patches/geoclue-config.patch \ gnu/packages/patches/ghostscript-runpath.patch \ diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 0f15a0aaec..01cfdf73e8 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -202,8 +202,10 @@ (define* (cross-gcc target target)) (source (origin (inherit (package-source gcc-4.8)) (patches - (cons (search-patch "gcc-cross-environment-variables.patch") - (cross-gcc-patches target))))) + (append + (origin-patches (package-source gcc-4.8)) + (cons (search-patch "gcc-cross-environment-variables.patch") + (cross-gcc-patches target)))))) ;; For simplicity, use a single output. Otherwise libgcc_s & co. are not ;; found by default, etc. diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 4c06f84155..2a3749fb5c 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -309,7 +309,8 @@ (define-public gcc-4.8 version "/gcc-" version ".tar.bz2")) (sha256 (base32 - "15c6gwm6dzsaagamxkak5smdkf1rdfbqqjs9jdbrp3lbg4ism02a")))))) + "15c6gwm6dzsaagamxkak5smdkf1rdfbqqjs9jdbrp3lbg4ism02a")) + (patches (list (search-patch "gcc-arm-link-spec-fix.patch"))))))) (define-public gcc-4.9 (package (inherit gcc-4.7) @@ -320,7 +321,8 @@ (define-public gcc-4.9 version "/gcc-" version ".tar.bz2")) (sha256 (base32 - "1pbjp4blk2ycaa6r3jmw4ky5f1s9ji3klbqgv8zs2sl5jn1cj810")))))) + "1pbjp4blk2ycaa6r3jmw4ky5f1s9ji3klbqgv8zs2sl5jn1cj810")) + (patches (list (search-patch "gcc-arm-link-spec-fix.patch"))))))) (define* (custom-gcc gcc name languages #:key (separate-lib-output? #t)) "Return a custom version of GCC that supports LANGUAGES." diff --git a/gnu/packages/patches/gcc-arm-link-spec-fix.patch b/gnu/packages/patches/gcc-arm-link-spec-fix.patch new file mode 100644 index 0000000000..0ffe8a1810 --- /dev/null +++ b/gnu/packages/patches/gcc-arm-link-spec-fix.patch @@ -0,0 +1,16 @@ +Do not pass -dynamic-linker to linker when !shared. +Fixes . + +Patch by Ludovic Courtès . + +--- gcc-4.8.4/gcc/config/arm/linux-elf.h.orig 2015-04-08 20:31:20.376900478 +0200 ++++ gcc-4.8.4/gcc/config/arm/linux-elf.h 2015-04-08 20:31:36.437014437 +0200 +@@ -65,7 +65,7 @@ + %{symbolic:-Bsymbolic} \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +- -dynamic-linker " GNU_USER_DYNAMIC_LINKER "} \ ++ %{!shared:-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} \ + -X \ + %{mbig-endian:-EB} %{mlittle-endian:-EL}" \ + SUBTARGET_EXTRA_LINK_SPEC -- cgit v1.2.3 From 38cf2ba084881a4c8fca0ee2888b5fd5724e9104 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 20 Apr 2015 15:50:59 +0200 Subject: gnu: Remove all #:select from (gnu packages ...) modules. This works around Guile bug . Reported by Andreas Enge . * gnu/packages/engineering.scm: Don't #:select from (gnu packages ...). * gnu/packages/gcc.scm: Likewise. * gnu/packages/package-management.scm: Likewise. * gnu/packages/photo.scm: Likewise. * gnu/packages/pulseaudio.scm: Likewise. * gnu/packages/moe.scm: Likewise, and #:select from (guix licenses) instead. --- gnu/packages/engineering.scm | 2 +- gnu/packages/gcc.scm | 2 +- gnu/packages/moe.scm | 4 ++-- gnu/packages/package-management.scm | 2 +- gnu/packages/photo.scm | 2 +- gnu/packages/pulseaudio.scm | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) (limited to 'gnu/packages/gcc.scm') diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 88b462c232..b0e37f701b 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -35,7 +35,7 @@ (define-module (gnu packages engineering) #:use-module (gnu packages gnome) #:use-module (gnu packages gtk) #:use-module (gnu packages guile) - #:use-module ((gnu packages linux) #:select (eudev)) ; FIXME: for pcb + #:use-module (gnu packages linux) ;FIXME: for pcb #:use-module (gnu packages maths) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 2a3749fb5c..cd6fc3b2fd 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -28,7 +28,7 @@ (define-module (gnu packages gcc) #:use-module (gnu packages multiprecision) #:use-module (gnu packages texinfo) #:use-module (gnu packages elf) - #:use-module ((gnu packages perl) #:select (perl)) + #:use-module (gnu packages perl) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) diff --git a/gnu/packages/moe.scm b/gnu/packages/moe.scm index bd7c2a6d49..6708d72913 100644 --- a/gnu/packages/moe.scm +++ b/gnu/packages/moe.scm @@ -17,9 +17,9 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages moe) - #:use-module (guix licenses) + #:use-module ((guix licenses) #:select (gpl3+)) #:use-module (gnu packages ncurses) - #:use-module ((gnu packages compression) #:select (lzip)) + #:use-module (gnu packages compression) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu)) diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index b056bd09e3..131cbcd9a7 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -26,7 +26,7 @@ (define-module (gnu packages package-management) #:use-module ((guix licenses) #:select (gpl2+ gpl3+ lgpl2.1+)) #:use-module (gnu packages) #:use-module (gnu packages guile) - #:use-module ((gnu packages compression) #:select (bzip2 gzip)) + #:use-module (gnu packages compression) #:use-module (gnu packages gnupg) #:use-module (gnu packages databases) #:use-module (gnu packages graphviz) diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm index 164f6e27ea..bf3c76c51e 100644 --- a/gnu/packages/photo.scm +++ b/gnu/packages/photo.scm @@ -28,7 +28,7 @@ (define-module (gnu packages photo) #:use-module (gnu packages readline) #:use-module (gnu packages popt) #:use-module (gnu packages perl) - #:use-module ((gnu packages base) #:select (tzdata))) + #:use-module (gnu packages base)) (define-public libexif (package diff --git a/gnu/packages/pulseaudio.scm b/gnu/packages/pulseaudio.scm index edf01e59fa..c7c5611eb5 100644 --- a/gnu/packages/pulseaudio.scm +++ b/gnu/packages/pulseaudio.scm @@ -24,7 +24,7 @@ (define-module (gnu packages pulseaudio) #:use-module (guix build-system gnu) #:use-module (gnu packages) #:use-module (gnu packages algebra) - #:use-module ((gnu packages autotools) #:select (libltdl)) + #:use-module (gnu packages autotools) #:use-module (gnu packages avahi) #:use-module (gnu packages check) #:use-module (gnu packages gdbm) -- cgit v1.2.3 From 21e583def33ecf9e9bae3a18df875cd3380e14ec Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 23 Apr 2015 00:03:34 +0200 Subject: gnu: gcc: Add a RUNPATH to libstdc++.so so that it finds libgcc_s.so. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes . Reported by 宋文武 . * gnu/packages/gcc.scm (gcc-4.7)[arguments]: Add 'substitute*' form for "libstdc++-v3/src/Makefile.in". --- gnu/packages/gcc.scm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gnu/packages/gcc.scm') diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index cd6fc3b2fd..442ea9874e 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -252,6 +252,13 @@ (define-public gcc-4.7 (("static char const sed_cmd_z\\[\\] =.*;") "static char const sed_cmd_z[] = \"sed\";")) + ;; Add a RUNPATH to libstdc++.so so that it finds libgcc_s. + ;; See + ;; and . + (substitute* "libstdc++-v3/src/Makefile.in" + (("^OPT_LDFLAGS = ") + "OPT_LDFLAGS = -Wl,-rpath=$(libdir) ")) + ;; Move libstdc++*-gdb.py to the "lib" output to avoid a ;; circularity between "out" and "lib". (Note: ;; --with-python-dir is useless because it imposes $(prefix) as -- cgit v1.2.3 From d485ebba428cc4125b6b9fd282507eda3f860cfe Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 23 Apr 2015 00:01:59 +0200 Subject: gnu: gcc: Do not always disable RUNPATH validation. * gnu/packages/gcc.scm (gcc-4.7)[arguments]: Remove explicit #:validate-runpath? #f. * gnu/packages/commencement.scm (gcc-boot0)[arguments]: Remove case for #:validate-runpath?. (gcc-final)[arguments]: Add literal #:validate-runpath? #f. * gnu/packages/cross-base.scm (cross-gcc-arguments): Remove case for #:validate-runpath?. --- gnu/packages/commencement.scm | 12 +++++------- gnu/packages/cross-base.scm | 2 -- gnu/packages/gcc.scm | 4 ---- 3 files changed, 5 insertions(+), 13 deletions(-) (limited to 'gnu/packages/gcc.scm') diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 351ef3e2c4..65524091a9 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -158,8 +158,6 @@ (define gcc-boot0 (srfi srfi-1) (srfi srfi-26)) ,@(substitute-keyword-arguments (package-arguments gcc-4.8) - ((#:validate-runpath? _) - #t) ((#:configure-flags flags) `(append (list ,(string-append "--target=" (boot-triplet)) @@ -540,6 +538,11 @@ (define-public gcc-final #:allowed-references ("out" "lib" ,glibc-final) + ;; Things like libasan.so and libstdc++.so NEED ld.so for some + ;; reason, but it is not in their RUNPATH. This is a false + ;; positive, so turn it off. + #:validate-runpath? #f + ;; Build again GMP & co. within GCC's build process, because it's hard ;; to do outside (because GCC-BOOT0 is a cross-compiler, and thus ;; doesn't honor $LIBRARY_PATH, which breaks `gnu-build-system'.) @@ -564,11 +567,6 @@ (define-public gcc-final "/lib") flag)) ,flags))) - ((#:validate-runpath? _) - ;; Things like libasan.so and libstdc++.so NEED ld.so and/or - ;; libgcc_s.so but RUNPATH is empty. This is a false positive, so - ;; turn it off. - #f) ((#:phases phases) `(alist-delete 'symlink-libgcc_eh ,phases))))) diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 01cfdf73e8..9a459400e8 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -175,8 +175,6 @@ (define (cross? x) #t))) ,phases) phases))) - ((#:validate-runpath? _) - #t) ((#:strip-binaries? _) ;; Disable stripping as this can break binaries, with object files of ;; libgcc.a showing up as having an unknown architecture. See diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 442ea9874e..ca85073ea4 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -190,10 +190,6 @@ (define-public gcc-4.7 #:tests? #f - ;; libstdc++.so NEEDs libgcc_s.so but somehow it doesn't get - ;; $(libdir) in its RUNPATH, so turn it off. - #:validate-runpath? #f - #:phases (alist-cons-before 'configure 'pre-configure -- cgit v1.2.3 From 60e2d5fe822160b333acbb8597501cb3b487692d Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Thu, 23 Apr 2015 01:05:36 -0400 Subject: gnu: Add gcc-5.1.0 and gcc-toolchain-5.1.0. * gnu/packages/gcc.scm (gcc-5.1): New variable. * gnu/packages/commencement.scm (gcc-toolchain-5.1): New variable. --- gnu/packages/commencement.scm | 5 ++++- gnu/packages/gcc.scm | 12 ++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'gnu/packages/gcc.scm') diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 22da2e0fb3..4a9fc5b205 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès ;;; Copyright © 2014 Andreas Enge ;;; Copyright © 2012 Nikita Karetnikov -;;; Copyright © 2014 Mark H Weaver +;;; Copyright © 2014, 2015 Mark H Weaver ;;; ;;; This file is part of GNU Guix. ;;; @@ -770,4 +770,7 @@ (define-public gcc-toolchain-4.8 (define-public gcc-toolchain-4.9 (gcc-toolchain gcc-4.9)) +(define-public gcc-toolchain-5.1 + (gcc-toolchain gcc-5.1)) + ;;; commencement.scm ends here diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index cd6fc3b2fd..e712e43b1f 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -324,6 +324,18 @@ (define-public gcc-4.9 "1pbjp4blk2ycaa6r3jmw4ky5f1s9ji3klbqgv8zs2sl5jn1cj810")) (patches (list (search-patch "gcc-arm-link-spec-fix.patch"))))))) +(define-public gcc-5.1 + (package (inherit gcc-4.7) + (version "5.1.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/gcc/gcc-" + version "/gcc-" version ".tar.bz2")) + (sha256 + (base32 + "1bd5vj4px3s8nlakbgrh38ynxq4s654m6nxz7lrj03mvkkwgvnmp")) + (patches (list (search-patch "gcc-arm-link-spec-fix.patch"))))))) + (define* (custom-gcc gcc name languages #:key (separate-lib-output? #t)) "Return a custom version of GCC that supports LANGUAGES." (package (inherit gcc) -- cgit v1.2.3 From 7e35b9dd3ddb6ec4b9bed3c01a99fe1638e96c66 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 30 Apr 2015 13:31:59 +0200 Subject: gnu: gcc: Add $libdir to the RUNPATH of libvtv.so. * gnu/packages/gcc.scm (gcc-4.9): Inherit from GCC-4.8. [source]: Add 'gcc-libvtv-runpath.patch'. (gcc-5.1): Inherit from GCC-4.9. [source]: Use patches from GCC-4.9. * gnu/packages/patches/gcc-libvtv-runpath.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. --- gnu-system.am | 1 + gnu/packages/gcc.scm | 48 ++++++++++++++------------- gnu/packages/patches/gcc-libvtv-runpath.patch | 15 +++++++++ 3 files changed, 41 insertions(+), 23 deletions(-) create mode 100644 gnu/packages/patches/gcc-libvtv-runpath.patch (limited to 'gnu/packages/gcc.scm') diff --git a/gnu-system.am b/gnu-system.am index 820e1e1e79..b2f5bbe833 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -420,6 +420,7 @@ dist_patch_DATA = \ gnu/packages/patches/gawk-shell.patch \ gnu/packages/patches/gcc-arm-link-spec-fix.patch \ gnu/packages/patches/gcc-cross-environment-variables.patch \ + gnu/packages/patches/gcc-libvtv-runpath.patch \ gnu/packages/patches/geoclue-config.patch \ gnu/packages/patches/ghostscript-runpath.patch \ gnu/packages/patches/gitolite-openssh-6.8-compat.patch \ diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index dbce52e2f2..8804f3b12a 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -307,37 +307,39 @@ (define-public gcc-4.8 (package (inherit gcc-4.7) (version "4.8.4") (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/gcc/gcc-" - version "/gcc-" version ".tar.bz2")) - (sha256 - (base32 - "15c6gwm6dzsaagamxkak5smdkf1rdfbqqjs9jdbrp3lbg4ism02a")) - (patches (list (search-patch "gcc-arm-link-spec-fix.patch"))))))) + (method url-fetch) + (uri (string-append "mirror://gnu/gcc/gcc-" + version "/gcc-" version ".tar.bz2")) + (sha256 + (base32 + "15c6gwm6dzsaagamxkak5smdkf1rdfbqqjs9jdbrp3lbg4ism02a")) + (patches (list (search-patch "gcc-arm-link-spec-fix.patch"))))))) (define-public gcc-4.9 - (package (inherit gcc-4.7) + (package (inherit gcc-4.8) (version "4.9.2") (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/gcc/gcc-" - version "/gcc-" version ".tar.bz2")) - (sha256 - (base32 - "1pbjp4blk2ycaa6r3jmw4ky5f1s9ji3klbqgv8zs2sl5jn1cj810")) - (patches (list (search-patch "gcc-arm-link-spec-fix.patch"))))))) + (method url-fetch) + (uri (string-append "mirror://gnu/gcc/gcc-" + version "/gcc-" version ".tar.bz2")) + (sha256 + (base32 + "1pbjp4blk2ycaa6r3jmw4ky5f1s9ji3klbqgv8zs2sl5jn1cj810")) + (patches (map search-patch + '("gcc-arm-link-spec-fix.patch" + "gcc-libvtv-runpath.patch"))))))) (define-public gcc-5.1 - (package (inherit gcc-4.7) + (package (inherit gcc-4.9) (version "5.1.0") (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/gcc/gcc-" - version "/gcc-" version ".tar.bz2")) - (sha256 - (base32 - "1bd5vj4px3s8nlakbgrh38ynxq4s654m6nxz7lrj03mvkkwgvnmp")) - (patches (list (search-patch "gcc-arm-link-spec-fix.patch"))))))) + (method url-fetch) + (uri (string-append "mirror://gnu/gcc/gcc-" + version "/gcc-" version ".tar.bz2")) + (sha256 + (base32 + "1bd5vj4px3s8nlakbgrh38ynxq4s654m6nxz7lrj03mvkkwgvnmp")) + (patches (origin-patches (package-source gcc-4.9))))))) (define* (custom-gcc gcc name languages #:key (separate-lib-output? #t)) "Return a custom version of GCC that supports LANGUAGES." diff --git a/gnu/packages/patches/gcc-libvtv-runpath.patch b/gnu/packages/patches/gcc-libvtv-runpath.patch new file mode 100644 index 0000000000..df74363c83 --- /dev/null +++ b/gnu/packages/patches/gcc-libvtv-runpath.patch @@ -0,0 +1,15 @@ +GCC 4.9 and later have libvtv and, just like libstdc++ (see +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32354), it doesn't +have $libdir in its RUNPATH, but it NEEDs libgcc_s. This patch +fixes that. + +--- gcc-4.9.2/libvtv/Makefile.in 2014-10-30 09:28:58.000000000 +0100 ++++ gcc-4.9.2/libvtv/Makefile.in 2015-04-30 09:51:04.161129705 +0200 +@@ -15,6 +15,7 @@ + + @SET_MAKE@ + ++AM_LDFLAGS = -Wl,-rpath=$(libdir) + + VPATH = @srcdir@ + pkgdatadir = $(datadir)/@PACKAGE@ -- cgit v1.2.3 From 9e7594027d1b876248f75c01d1c06abc3b64ac57 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 30 Apr 2015 13:43:55 +0200 Subject: gnu: gcc: Add link to upstream bug report. * gnu/packages/gcc.scm (gcc-4.8): Add link to bug report in comment. --- gnu/packages/gcc.scm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gnu/packages/gcc.scm') diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 8804f3b12a..c368b7df97 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -313,6 +313,10 @@ (define-public gcc-4.8 (sha256 (base32 "15c6gwm6dzsaagamxkak5smdkf1rdfbqqjs9jdbrp3lbg4ism02a")) + + ;; ARM 'link' spec issue reported at + ;; and + ;; . (patches (list (search-patch "gcc-arm-link-spec-fix.patch"))))))) (define-public gcc-4.9 -- cgit v1.2.3 From 5f6887e839c10f0c905969d07baca4e03f453e82 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 30 Apr 2015 17:11:39 +0200 Subject: gnu: gcj: Remove broken symlink and conflicting files. * gnu/packages/gcc.scm (gcj)[arguments]: Add a build phase to remove a broken symlink and generic stump binaries. --- gnu/packages/gcc.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'gnu/packages/gcc.scm') diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index c368b7df97..957917bf0b 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -444,7 +444,18 @@ (define-public gcj-4.8 (string-append jvm "/lib/tools.jar"))) (chmod target #o755) #t)) - ,phases)))))) + (alist-cons-after + 'install 'remove-broken-or-conflicting-files + (lambda _ + (let ((out (assoc-ref %outputs "out"))) + (for-each + delete-file + (append (find-files (string-append out "/lib/jvm/jre/lib") + "libjawt.so") + (find-files (string-append out "/bin") + ".*(c\\+\\+|cpp|g\\+\\+|gcc.*)")))) + #t) + ,phases))))))) (define ecj-bootstrap-4.8 (origin -- cgit v1.2.3 From 167a05aabc229d48d62545ef218d8b0577e6e8f3 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 4 May 2015 00:23:55 +0200 Subject: gnu: gcc-5.1: Add specific libvtv patch. * gnu/packages/patches/gcc-5.0-libvtv-runpath.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/gcc.scm (gcc-5.1)[source]: Use it. --- gnu-system.am | 1 + gnu/packages/gcc.scm | 4 +++- gnu/packages/patches/gcc-5.0-libvtv-runpath.patch | 15 +++++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/gcc-5.0-libvtv-runpath.patch (limited to 'gnu/packages/gcc.scm') diff --git a/gnu-system.am b/gnu-system.am index 95eefdcbf5..3223dc8afd 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -422,6 +422,7 @@ dist_patch_DATA = \ gnu/packages/patches/gcc-arm-link-spec-fix.patch \ gnu/packages/patches/gcc-cross-environment-variables.patch \ gnu/packages/patches/gcc-libvtv-runpath.patch \ + gnu/packages/patches/gcc-5.0-libvtv-runpath.patch \ gnu/packages/patches/geoclue-config.patch \ gnu/packages/patches/ghostscript-runpath.patch \ gnu/packages/patches/gitolite-openssh-6.8-compat.patch \ diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 957917bf0b..4512e54e8b 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -343,7 +343,9 @@ (define-public gcc-5.1 (sha256 (base32 "1bd5vj4px3s8nlakbgrh38ynxq4s654m6nxz7lrj03mvkkwgvnmp")) - (patches (origin-patches (package-source gcc-4.9))))))) + (patches (map search-patch + '("gcc-arm-link-spec-fix.patch" + "gcc-5.0-libvtv-runpath.patch"))))))) (define* (custom-gcc gcc name languages #:key (separate-lib-output? #t)) "Return a custom version of GCC that supports LANGUAGES." diff --git a/gnu/packages/patches/gcc-5.0-libvtv-runpath.patch b/gnu/packages/patches/gcc-5.0-libvtv-runpath.patch new file mode 100644 index 0000000000..9a9bc5ca53 --- /dev/null +++ b/gnu/packages/patches/gcc-5.0-libvtv-runpath.patch @@ -0,0 +1,15 @@ +GCC 4.9 and later have libvtv and, just like libstdc++ (see +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32354), it doesn't +have $libdir in its RUNPATH, but it NEEDs libgcc_s. This patch +fixes that. + +--- gcc-5.1.0/libvtv/Makefile.in 2014-10-30 09:28:58.000000000 +0100 ++++ gcc-5.1.0/libvtv/Makefile.in 2015-04-30 09:51:04.161129705 +0200 +@@ -15,6 +15,7 @@ + + @SET_MAKE@ + ++libvtv_la_LDFLAGS = -Wl,-rpath=$(libdir) + + VPATH = @srcdir@ + pkgdatadir = $(datadir)/@PACKAGE@ -- cgit v1.2.3 From ad12c43e972482dc9d38c7214fee751bad290ea7 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 8 May 2015 12:36:58 +0200 Subject: gnu: gcj: Add $libdir to RUNPATH. * gnu/packages/gcc.scm (gcj)[arguments]: Add build phase to add library output directory to RUNPATH. --- gnu/packages/gcc.scm | 76 +++++++++++++++++++++++++++++----------------------- 1 file changed, 42 insertions(+), 34 deletions(-) (limited to 'gnu/packages/gcc.scm') diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 4512e54e8b..b652521bb8 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -415,38 +415,47 @@ (define-public gcj-4.8 "--enable-languages=java" ,@(remove (cut string-match "--enable-languages.*" <>) ,flags)))) - ((#:phases phases) - `(alist-cons-after - 'install 'install-javac-and-javap-wrappers - (lambda _ - (let* ((javac (assoc-ref %build-inputs "javac.in")) - (ecj (assoc-ref %build-inputs "ecj-bootstrap")) - (gcj (assoc-ref %outputs "out")) - (gcjbin (string-append gcj "/bin/")) - (jvm (string-append gcj "/lib/jvm/")) - (target (string-append jvm "/bin/javac"))) - - (symlink (string-append gcjbin "jcf-dump") - (string-append jvm "/bin/javap")) - - (copy-file ecj (string-append gcj "/share/java/ecj.jar")) - - ;; Create javac wrapper from the template javac.in by - ;; replacing the @VARIABLES@ with paths. - (copy-file javac target) - (patch-shebang target) - (substitute* target - (("@JAVA@") - (string-append jvm "/bin/java")) - (("@ECJ_JAR@") - (string-append gcj "/share/java/ecj.jar")) - (("@RT_JAR@") - (string-append jvm "/jre/lib/rt.jar")) - (("@TOOLS_JAR@") - (string-append jvm "/lib/tools.jar"))) - (chmod target #o755) - #t)) - (alist-cons-after + ((#:phases phases) + `(modify-phases ,phases + (add-after + 'unpack 'add-lib-output-to-rpath + (lambda _ + (substitute* "libjava/Makefile.in" + (("libgcj_bc_dummy_LINK = .* -shared" line) + (string-append line " -Wl,-rpath=$(libdir)")) + (("libgcj(_bc)?_la_LDFLAGS =" ldflags _) + (string-append ldflags " -Wl,-rpath=$(libdir)"))))) + (add-after + 'install 'install-javac-and-javap-wrappers + (lambda _ + (let* ((javac (assoc-ref %build-inputs "javac.in")) + (ecj (assoc-ref %build-inputs "ecj-bootstrap")) + (gcj (assoc-ref %outputs "out")) + (gcjbin (string-append gcj "/bin/")) + (jvm (string-append gcj "/lib/jvm/")) + (target (string-append jvm "/bin/javac"))) + + (symlink (string-append gcjbin "jcf-dump") + (string-append jvm "/bin/javap")) + + (copy-file ecj (string-append gcj "/share/java/ecj.jar")) + + ;; Create javac wrapper from the template javac.in by + ;; replacing the @VARIABLES@ with paths. + (copy-file javac target) + (patch-shebang target) + (substitute* target + (("@JAVA@") + (string-append jvm "/bin/java")) + (("@ECJ_JAR@") + (string-append gcj "/share/java/ecj.jar")) + (("@RT_JAR@") + (string-append jvm "/jre/lib/rt.jar")) + (("@TOOLS_JAR@") + (string-append jvm "/lib/tools.jar"))) + (chmod target #o755) + #t))) + (add-after 'install 'remove-broken-or-conflicting-files (lambda _ (let ((out (assoc-ref %outputs "out"))) @@ -456,8 +465,7 @@ (define-public gcj-4.8 "libjawt.so") (find-files (string-append out "/bin") ".*(c\\+\\+|cpp|g\\+\\+|gcc.*)")))) - #t) - ,phases))))))) + #t)))))))) (define ecj-bootstrap-4.8 (origin -- cgit v1.2.3