From 868c13c53a9788f8f27e77d8c8f99df14be512ba Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 24 Apr 2016 21:55:37 +0200 Subject: gnu: gcc-5: Remove dependency on Texinfo. * gnu/packages/gcc.scm (gcc-5): Set 'native-inputs' to '(). --- gnu/packages/gcc.scm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'gnu/packages/gcc.scm') diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 1df5150ab3..1c9bd7dad6 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès +;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès ;;; Copyright © 2014, 2015 Mark H Weaver ;;; Copyright © 2014, 2015, 2016 Ricardo Wurmus ;;; Copyright © 2015 Andreas Enge @@ -153,7 +153,7 @@ where the OS part is overloaded to denote a specific ABI---into GCC ("libelf" ,libelf) ("zlib" ,zlib))) - ;; GCC is one of the few packages that doesn't ship .info files. + ;; GCC < 5 is one of the few packages that doesn't ship .info files. (native-inputs `(("texinfo" ,texinfo))) (arguments @@ -352,7 +352,10 @@ Go. It also includes runtime support libraries for these languages.") (sha256 (base32 "1ny4smkp5bzs3cp8ss7pl6lk8yss0d9m4av1mvdp72r1x695akxq")) - (patches (list (search-patch "gcc-5.0-libvtv-runpath.patch"))))))) + (patches (list (search-patch "gcc-5.0-libvtv-runpath.patch"))))) + + ;; GCC 5 ships with .info files, so no need for Texinfo. + (native-inputs '()))) ;; Note: When changing the default gcc version, update ;; the gcc-toolchain-* definitions accordingly. -- cgit 1.4.1 From e3d0fcbf7e55e8cbe8d0a1c5a24d73f341d7243b Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 24 Apr 2016 22:41:45 +0200 Subject: gnu: Default to GCC 5. * gnu/packages/patches/gcc-libiberty-printf-decl.patch: New file. * gnu/packages/gcc.scm (gcc-5)[source]: Use it. (gcc): Switch to GCC-5. * gnu/packages/commencement.scm (libstdc++-boot0): New variable. (gcc-boot0)[inputs]: Add it. [native-inputs]: Remove. (gcc-toolchain-4.9): Switch to GCC-4.9. (gcc-toolchain-5): Switch to GCC-FINAL. * gnu-system.am (dist_patch_DATA): Add 'gcc-libiberty-printf-decl.patch'. --- gnu-system.am | 1 + gnu/packages/commencement.scm | 33 +++++++++++++++++----- gnu/packages/gcc.scm | 6 ++-- .../patches/gcc-libiberty-printf-decl.patch | 28 ++++++++++++++++++ 4 files changed, 59 insertions(+), 9 deletions(-) create mode 100644 gnu/packages/patches/gcc-libiberty-printf-decl.patch (limited to 'gnu/packages/gcc.scm') diff --git a/gnu-system.am b/gnu-system.am index 03d034c031..c8dc524579 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -478,6 +478,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-libiberty-printf-decl.patch \ gnu/packages/patches/gcc-libvtv-runpath.patch \ gnu/packages/patches/gcc-5.0-libvtv-runpath.patch \ gnu/packages/patches/geoclue-config.patch \ diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 0d9133fb9c..463f42537c 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -170,6 +170,26 @@ ,cf))))) (inputs %boot0-inputs)))) +(define libstdc++-boot0 + ;; GCC's libcc1 is always built as a shared library (the top-level + ;; 'Makefile.def' forcefully adds --enable-shared) and thus needs to refer + ;; to libstdc++.so. We cannot build libstdc++-5.3 because it relies on + ;; C++14 features missing in our bootstrap compiler. + (let ((lib (package-with-bootstrap-guile (make-libstdc++ gcc-4.9)))) + (package + (inherit lib) + (name "libstdc++-boot0") + (arguments + `(#:guile ,%bootstrap-guile + #:implicit-inputs? #f + + ;; XXX: libstdc++.so NEEDs ld.so for some reason. + #:validate-runpath? #f + + ,@(package-arguments lib))) + (inputs %boot0-inputs) + (native-inputs '())))) + (define gcc-boot0 (package-with-bootstrap-guile (package (inherit gcc) @@ -255,14 +275,13 @@ ("mpc-source" ,(package-source mpc)) ("binutils-cross" ,binutils-boot0) + ;; The libstdc++ that libcc1 links against. + ("libstdc++" ,libstdc++-boot0) + ;; Call it differently so that the builder can check whether ;; the "libc" input is #f. ("libc-native" ,@(assoc-ref %boot0-inputs "libc")) - ,@(alist-delete "libc" %boot0-inputs))) - - ;; No need for Texinfo at this stage. - (native-inputs (alist-delete "texinfo" - (package-native-inputs gcc)))))) + ,@(alist-delete "libc" %boot0-inputs)))))) (define perl-boot0 (let ((perl (package @@ -882,9 +901,9 @@ and binaries, plus debugging symbols in the 'debug' output), and Binutils.") (gcc-toolchain gcc-4.8)) (define-public gcc-toolchain-4.9 - (gcc-toolchain gcc-final)) + (gcc-toolchain gcc-4.9)) (define-public gcc-toolchain-5 - (gcc-toolchain gcc-5)) + (gcc-toolchain gcc-final)) ;;; commencement.scm ends here diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 1c9bd7dad6..8b3c891c52 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -352,14 +352,16 @@ Go. It also includes runtime support libraries for these languages.") (sha256 (base32 "1ny4smkp5bzs3cp8ss7pl6lk8yss0d9m4av1mvdp72r1x695akxq")) - (patches (list (search-patch "gcc-5.0-libvtv-runpath.patch"))))) + (patches (list (search-patch "gcc-5.0-libvtv-runpath.patch") + (search-patch + "gcc-libiberty-printf-decl.patch"))))) ;; GCC 5 ships with .info files, so no need for Texinfo. (native-inputs '()))) ;; Note: When changing the default gcc version, update ;; the gcc-toolchain-* definitions accordingly. -(define-public gcc gcc-4.9) +(define-public gcc gcc-5) (define-public (make-libstdc++ gcc) "Return a libstdc++ package based on GCC. The primary use case is when diff --git a/gnu/packages/patches/gcc-libiberty-printf-decl.patch b/gnu/packages/patches/gcc-libiberty-printf-decl.patch new file mode 100644 index 0000000000..a612c9e00e --- /dev/null +++ b/gnu/packages/patches/gcc-libiberty-printf-decl.patch @@ -0,0 +1,28 @@ +This patch makes the exeception specifier of libiberty's 'asprintf' +and 'vasprintf' declarations match those of glibc to work around the +problem described at . + +The problem in part stems from the fact that libiberty is configured +without _GNU_SOURCE (thus, it sets HAVE_DECL_ASPRINTF to 0), whereas libcc1 +is configured and built with _GNU_SOURCE, hence the conflicting declarations. + +--- gcc-5.3.0/include/libiberty.h 2016-04-23 22:45:46.262709079 +0200 ++++ gcc-5.3.0/include/libiberty.h 2016-04-23 22:45:37.110635439 +0200 +@@ -625,7 +625,7 @@ extern int pwait (int, int *, int); + /* Like sprintf but provides a pointer to malloc'd storage, which must + be freed by the caller. */ + +-extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2; ++extern int asprintf (char **, const char *, ...) __THROWNL ATTRIBUTE_PRINTF_2; + #endif + + /* Like asprintf but allocates memory without fail. This works like +@@ -637,7 +637,7 @@ extern char *xasprintf (const char *, .. + /* Like vsprintf but provides a pointer to malloc'd storage, which + must be freed by the caller. */ + +-extern int vasprintf (char **, const char *, va_list) ATTRIBUTE_PRINTF(2,0); ++extern int vasprintf (char **, const char *, va_list) __THROWNL ATTRIBUTE_PRINTF(2,0); + #endif + + /* Like vasprintf but allocates memory without fail. This works like -- cgit 1.4.1 From 9dee9e8ffe4650949bd3ad2edf559cf4a33e9e6e Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 7 Jun 2016 10:52:04 +0200 Subject: Revert "gnu: Default to GCC 5." This reverts commit e3d0fcbf7e55e8cbe8d0a1c5a24d73f341d7243b. This is a temporary measure until GCC 5 builds on ARM, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71399 --- gnu/local.mk | 1 - gnu/packages/commencement.scm | 33 +++++----------------- gnu/packages/gcc.scm | 5 ++-- .../patches/gcc-libiberty-printf-decl.patch | 28 ------------------ 4 files changed, 9 insertions(+), 58 deletions(-) delete mode 100644 gnu/packages/patches/gcc-libiberty-printf-decl.patch (limited to 'gnu/packages/gcc.scm') diff --git a/gnu/local.mk b/gnu/local.mk index 641963daf2..9121b1df40 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -492,7 +492,6 @@ 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-libiberty-printf-decl.patch \ gnu/packages/patches/gcc-libvtv-runpath.patch \ gnu/packages/patches/gcc-5.0-libvtv-runpath.patch \ gnu/packages/patches/gd-CVE-2016-3074.patch \ diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 5f3faad105..8c82644cc6 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -170,26 +170,6 @@ ,cf))))) (inputs %boot0-inputs)))) -(define libstdc++-boot0 - ;; GCC's libcc1 is always built as a shared library (the top-level - ;; 'Makefile.def' forcefully adds --enable-shared) and thus needs to refer - ;; to libstdc++.so. We cannot build libstdc++-5.3 because it relies on - ;; C++14 features missing in our bootstrap compiler. - (let ((lib (package-with-bootstrap-guile (make-libstdc++ gcc-4.9)))) - (package - (inherit lib) - (name "libstdc++-boot0") - (arguments - `(#:guile ,%bootstrap-guile - #:implicit-inputs? #f - - ;; XXX: libstdc++.so NEEDs ld.so for some reason. - #:validate-runpath? #f - - ,@(package-arguments lib))) - (inputs %boot0-inputs) - (native-inputs '())))) - (define gcc-boot0 (package-with-bootstrap-guile (package (inherit gcc) @@ -275,13 +255,14 @@ ("mpc-source" ,(package-source mpc)) ("binutils-cross" ,binutils-boot0) - ;; The libstdc++ that libcc1 links against. - ("libstdc++" ,libstdc++-boot0) - ;; Call it differently so that the builder can check whether ;; the "libc" input is #f. ("libc-native" ,@(assoc-ref %boot0-inputs "libc")) - ,@(alist-delete "libc" %boot0-inputs)))))) + ,@(alist-delete "libc" %boot0-inputs))) + + ;; No need for Texinfo at this stage. + (native-inputs (alist-delete "texinfo" + (package-native-inputs gcc)))))) (define perl-boot0 (let ((perl (package @@ -901,10 +882,10 @@ and binaries, plus debugging symbols in the 'debug' output), and Binutils.") (gcc-toolchain gcc-4.8)) (define-public gcc-toolchain-4.9 - (gcc-toolchain gcc-4.9)) + (gcc-toolchain gcc-final)) (define-public gcc-toolchain-5 - (gcc-toolchain gcc-final)) + (gcc-toolchain gcc-5)) (define-public gcc-toolchain-6 (gcc-toolchain gcc-6)) diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index b8e13f3f8e..1ca8ca0d59 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -352,8 +352,7 @@ Go. It also includes runtime support libraries for these languages.") (sha256 (base32 "1ny4smkp5bzs3cp8ss7pl6lk8yss0d9m4av1mvdp72r1x695akxq")) - (patches (search-patches "gcc-5.0-libvtv-runpath.patch" - "gcc-libiberty-printf-decl.patch")))) + (patches (search-patches "gcc-5.0-libvtv-runpath.patch")))) ;; GCC 5 ships with .info files, so no need for Texinfo. (native-inputs '()))) @@ -372,7 +371,7 @@ Go. It also includes runtime support libraries for these languages.") ;; Note: When changing the default gcc version, update ;; the gcc-toolchain-* definitions accordingly. -(define-public gcc gcc-5) +(define-public gcc gcc-4.9) (define-public (make-libstdc++ gcc) "Return a libstdc++ package based on GCC. The primary use case is when diff --git a/gnu/packages/patches/gcc-libiberty-printf-decl.patch b/gnu/packages/patches/gcc-libiberty-printf-decl.patch deleted file mode 100644 index a612c9e00e..0000000000 --- a/gnu/packages/patches/gcc-libiberty-printf-decl.patch +++ /dev/null @@ -1,28 +0,0 @@ -This patch makes the exeception specifier of libiberty's 'asprintf' -and 'vasprintf' declarations match those of glibc to work around the -problem described at . - -The problem in part stems from the fact that libiberty is configured -without _GNU_SOURCE (thus, it sets HAVE_DECL_ASPRINTF to 0), whereas libcc1 -is configured and built with _GNU_SOURCE, hence the conflicting declarations. - ---- gcc-5.3.0/include/libiberty.h 2016-04-23 22:45:46.262709079 +0200 -+++ gcc-5.3.0/include/libiberty.h 2016-04-23 22:45:37.110635439 +0200 -@@ -625,7 +625,7 @@ extern int pwait (int, int *, int); - /* Like sprintf but provides a pointer to malloc'd storage, which must - be freed by the caller. */ - --extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2; -+extern int asprintf (char **, const char *, ...) __THROWNL ATTRIBUTE_PRINTF_2; - #endif - - /* Like asprintf but allocates memory without fail. This works like -@@ -637,7 +637,7 @@ extern char *xasprintf (const char *, .. - /* Like vsprintf but provides a pointer to malloc'd storage, which - must be freed by the caller. */ - --extern int vasprintf (char **, const char *, va_list) ATTRIBUTE_PRINTF(2,0); -+extern int vasprintf (char **, const char *, va_list) __THROWNL ATTRIBUTE_PRINTF(2,0); - #endif - - /* Like vasprintf but allocates memory without fail. This works like -- cgit 1.4.1