summaryrefslogtreecommitdiff
path: root/gnu/packages/gcc.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-11-15 00:10:10 +0100
committerLudovic Courtès <ludo@gnu.org>2013-11-16 00:48:31 +0100
commit062134985802d85066418f6ee2f327122166a567 (patch)
tree9469947d60f7c67ee063b816137052d874fa2178 /gnu/packages/gcc.scm
parent7db9608d52ab431165ab150a0a0707c686990c1c (diff)
gnu: Switch to GCC 4.8 as the default compiler.
* build-aux/download.scm (file-name->uri): Update URL to /20131110. * gnu-system.am (nodist_bootstrap_x86_64_linux_DATA, nodist_bootstrap_i686_linux_DATA): Change base name to 'guile-2.0.9.tar.xz'. (gnu/packages/bootstrap/x86_64-linux/guile-2.0.9.tar.xz, gnu/packages/bootstrap/i686-linux/guile-2.0.9.tar.xz): New targets. (gnu/packages/bootstrap/x86_64-linux/guile-2.0.7.tar.xz, gnu/packages/bootstrap/i686-linux/guile-2.0.7.tar.xz): Remove. (gnu/packages/bootstrap/mips64el-linux/guile-2.0.9.tar.xz): Update hash. * gnu/packages/base.scm (gcc-boot0): Base upon GCC-4.8. Enable C++, and add a few --disable flags. Remove MPFR workaround. (cross-gcc-wrapper): Base upon GCC-4.8. Wrap both 'gcc' and 'g++'. (libstdc++): New variable. (gcc-final): Add it as an input; pass corresponding -I and -L flags. * gnu/packages/bootstrap.scm (%bootstrap-guile): Always use "guile-2.0.9.tar.xz. (%bootstrap-coreutils&co): Update hashes. (%bootstrap-binutils): Update URL and hashes. (%bootstrap-glibc): Likewise. (%bootstrap-gcc): Likewise. * gnu/packages/gcc.scm (gcc-4.7): Add LDFLAGS. Add --disable-libstdcxx-pch. Modify the GNU_USER*_SPEC macros from gnu-user*.h instead of the raw _SPEC macros.
Diffstat (limited to 'gnu/packages/gcc.scm')
-rw-r--r--gnu/packages/gcc.scm25
1 files changed, 18 insertions, 7 deletions
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index bbc0a134d2..db1984306e 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -73,6 +73,9 @@ where the OS part is overloaded to denote a specific ABI---into GCC
"--enable-languages=c,c++"
"--disable-multilib"
+ ;; No pre-compiled libstdc++ headers, to save space.
+ "--disable-libstdcxx-pch"
+
"--with-local-prefix=/no-gcc-local-prefix"
,(let ((libc (assoc-ref %build-inputs "libc")))
@@ -115,7 +118,9 @@ where the OS part is overloaded to denote a specific ABI---into GCC
#:strip-binaries? ,stripped?
#:configure-flags ,(configure-flags)
#:make-flags
- (let ((libc (assoc-ref %build-inputs "libc")))
+ (let* ((libc (assoc-ref %build-inputs "libc"))
+ (libc-native (or (assoc-ref %build-inputs "libc-native")
+ libc)))
`(,@(if libc
(list (string-append "LDFLAGS_FOR_TARGET="
"-B" libc "/lib "
@@ -123,6 +128,12 @@ where the OS part is overloaded to denote a specific ABI---into GCC
"-Wl," libc
,(glibc-dynamic-linker)))
'())
+
+ ;; Native programs like 'genhooks' also need that right.
+ ,(string-append "LDFLAGS="
+ "-Wl,-rpath=" libc-native "/lib "
+ "-Wl,-dynamic-linker "
+ "-Wl," libc-native ,(glibc-dynamic-linker))
,(string-append "BOOT_CFLAGS=-O2 "
,(if stripped? "-g0" "-g"))))
@@ -148,18 +159,18 @@ where the OS part is overloaded to denote a specific ABI---into GCC
;; Tell where to find libstdc++, libc, and `?crt*.o', except
;; `crt{begin,end}.o', which come with GCC.
(substitute* (find-files "gcc/config"
- "^(gnu-user(64)?|linux-elf)\\.h$")
- (("#define LIB_SPEC (.*)$" _ suffix)
+ "^gnu-user.*\\.h$")
+ (("#define GNU_USER_TARGET_LIB_SPEC (.*)$" _ suffix)
;; Note that with this "lib" spec, we may still add a
;; RUNPATH to GCC even when `libgcc_s' is not NEEDED.
;; There's not much that can be done to avoid it, though.
- (format #f "#define LIB_SPEC \"-L~a/lib %{!static:-rpath=~a/lib \
-%{!static-libgcc:-rpath=~a/lib64 -rpath=~a/lib}} \" ~a"
+ (format #f "#define GNU_USER_TARGET_LIB_SPEC \
+\"-L~a/lib %{!static:-rpath=~a/lib %{!static-libgcc:-rpath=~a/lib64 -rpath=~a/lib}} \" ~a"
libc libc out out suffix))
- (("#define STARTFILE_SPEC.*$" line)
+ (("#define GNU_USER_TARGET_STARTFILE_SPEC.*$" line)
(format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib\"
#define STANDARD_STARTFILE_PREFIX_2 \"\"
-~a~%"
+~a"
libc line))))
;; Don't retain a dependency on the build-time sed.