aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorJan Nieuwenhuizen <janneke@gnu.org>2020-03-12 10:58:44 +0100
committerJan Nieuwenhuizen <janneke@gnu.org>2020-03-24 23:31:34 +0100
commit25bc0f34c6c059394f546f29a203c2cb9b7cdcf6 (patch)
tree09e5feae38f497d06c382391cbc6975b7b5e40a3 /gnu
parenteef44fea17a735d2f4048a747d16af478d4b9dbc (diff)
downloadpatches-25bc0f34c6c059394f546f29a203c2cb9b7cdcf6.tar
patches-25bc0f34c6c059394f546f29a203c2cb9b7cdcf6.tar.gz
gnu: bootstrap: gcc-static: Use gcc-5.
* gnu/packages/make-bootstrap.scm (gcc-static): Use gcc-5. This fixes building libstdc++-boot0 with a newly built %bootstrap-gcc. (%gcc-stripped): Likewise. (gcc-for-bootstrap): Likewise. * gnu/packages/patches/gcc-5-hurd.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/gcc.scm (gcc-5): Use it.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/gcc.scm3
-rw-r--r--gnu/packages/make-bootstrap.scm20
-rw-r--r--gnu/packages/patches/gcc-5-hurd.patch63
4 files changed, 76 insertions, 11 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index aed50d4d1a..1b268fd1c7 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -909,6 +909,7 @@ dist_patch_DATA = \
%D%/packages/patches/gcc-4-compile-with-gcc-5.patch \
%D%/packages/patches/gcc-4.6-gnu-inline.patch \
%D%/packages/patches/gcc-4.9.3-mingw-gthr-default.patch \
+ %D%/packages/patches/gcc-5-hurd.patch \
%D%/packages/patches/gcc-5.0-libvtv-runpath.patch \
%D%/packages/patches/gcc-5-source-date-epoch-1.patch \
%D%/packages/patches/gcc-5-source-date-epoch-2.patch \
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 5c5c51a0ad..6221a123d8 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -471,7 +471,8 @@ Go. It also includes runtime support libraries for these languages.")
"gcc-5-source-date-epoch-1.patch"
"gcc-5-source-date-epoch-2.patch"
"gcc-6-libsanitizer-mode-size.patch"
- "gcc-fix-texi2pod.patch"))
+ "gcc-fix-texi2pod.patch"
+ "gcc-5-hurd.patch"))
(modules '((guix build utils)))
(snippet
;; Fix 'libcc1/configure' error when cross-compiling GCC.
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index 709fb39e43..f8d782f5ab 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -93,13 +93,13 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(mlambdaq (glibc)
"Return a variant of GCC that uses the bootstrap variant of GLIBC."
(package
- (inherit gcc)
+ (inherit gcc-5)
(outputs '("out")) ;all in one so libgcc_s is easily found
(inputs
`( ;; Distinguish the name so we can refer to it below.
("bootstrap-libc" ,(glibc-for-bootstrap glibc))
("libc:static" ,(glibc-for-bootstrap glibc) "static")
- ,@(package-inputs gcc))))))
+ ,@(package-inputs gcc-5))))))
(define (package-with-relocatable-glibc p)
"Return a variant of P that uses the libc as defined by
@@ -138,7 +138,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(cons (search-path-specification
(variable "CROSS_CPLUS_INCLUDE_PATH")
(files '("include")))
- (package-search-paths gcc)))))
+ (package-search-paths gcc-5)))))
("cross-binutils" ,(cross-binutils target))
,@(%final-inputs)))
`(("libc" ,(glibc-for-bootstrap glibc))
@@ -459,7 +459,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(define %gcc-static
;; A statically-linked GCC, with stripped-down functionality.
(package-with-relocatable-glibc
- (package (inherit gcc)
+ (package (inherit gcc-5)
(name "gcc-static")
(outputs '("out")) ; all in one
(arguments
@@ -468,7 +468,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(srfi srfi-1)
(srfi srfi-26)
(ice-9 regex))
- ,@(substitute-keyword-arguments (package-arguments gcc)
+ ,@(substitute-keyword-arguments (package-arguments gcc-5)
((#:guile _) #f)
((#:implicit-inputs? _) #t)
((#:configure-flags flags)
@@ -513,8 +513,8 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
#t)))))))
(inputs
`(("zlib:static" ,zlib "static")
- ("isl:static" ,isl "static")
- ,@(package-inputs gcc)))
+ ("isl:static" ,isl-0.18 "static")
+ ,@(package-inputs gcc-5)))
(native-inputs
(if (%current-target-system)
`(;; When doing a Canadian cross, we need GMP/MPFR/MPC both
@@ -527,12 +527,12 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
("gmp-native" ,gmp)
("mpfr-native" ,mpfr)
("mpc-native" ,mpc)
- ,@(package-native-inputs gcc))
- (package-native-inputs gcc))))))
+ ,@(package-native-inputs gcc-5))
+ (package-native-inputs gcc-5))))))
(define %gcc-stripped
;; The subset of GCC files needed for bootstrap.
- (package (inherit gcc)
+ (package (inherit gcc-5)
(name "gcc-stripped")
(build-system trivial-build-system)
(source #f)
diff --git a/gnu/packages/patches/gcc-5-hurd.patch b/gnu/packages/patches/gcc-5-hurd.patch
new file mode 100644
index 0000000000..ae66424243
--- /dev/null
+++ b/gnu/packages/patches/gcc-5-hurd.patch
@@ -0,0 +1,63 @@
+This patch is needed to build gcc-5.5.0 on the Hurd.
+
+Backported from upstream: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=6cd9cb89ebdc1e1394b81c4a418c2b3b0eb86c57
+
+commit b590b96ebc3f5b42a4829170e069722dd940e2543
+Author: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Sat May 9 04:50:23 2015 +0000
+
+ * src/c++98/Makefile.am (AM_CXXFLAGS): Add -std=gnu++98.
+ * src/c++98/Makefile.in: Regenerate.
+ * src/Makefile.am (AM_CXXFLAGS): Add -std=gnu++98.
+ * src/Makefile.in: Regenerate.
+
+ git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222964 138bc75d-0d04-0410-961f-82ee72b054a4
+
+diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am
+index a5f48b22c6d..cd07ccd81bc 100644
+--- a/libstdc++-v3/src/Makefile.am
++++ b/libstdc++-v3/src/Makefile.am
+@@ -168,6 +168,7 @@ compatibility-condvar.o: compatibility-condvar.cc
+ # OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
+ # as the occasion calls for it.
+ AM_CXXFLAGS = \
++ -std=gnu++98 \
+ $(glibcxx_compiler_pic_flag) \
+ $(XTEMPLATE_FLAGS) $(VTV_CXXFLAGS) \
+ $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS)
+diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in
+index 433f9ea121a..31b56282e26 100644
+--- a/libstdc++-v3/src/Makefile.in
++++ b/libstdc++-v3/src/Makefile.in
+@@ -429,6 +429,7 @@ libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS)
+ # OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
+ # as the occasion calls for it.
+ AM_CXXFLAGS = \
++ -std=gnu++98 \
+ $(glibcxx_compiler_pic_flag) \
+ $(XTEMPLATE_FLAGS) $(VTV_CXXFLAGS) \
+ $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS)
+diff --git a/libstdc++-v3/src/c++98/Makefile.am b/libstdc++-v3/src/c++98/Makefile.am
+index e348dfb1205..a5b68a19a8b 100644
+--- a/libstdc++-v3/src/c++98/Makefile.am
++++ b/libstdc++-v3/src/c++98/Makefile.am
+@@ -215,6 +215,7 @@ parallel_settings.o: parallel_settings.cc
+ # OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
+ # as the occasion calls for it.
+ AM_CXXFLAGS = \
++ -std=gnu++98 \
+ $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
+ $(XTEMPLATE_FLAGS) $(VTV_CXXFLAGS) \
+ $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS)
+diff --git a/libstdc++-v3/src/c++98/Makefile.in b/libstdc++-v3/src/c++98/Makefile.in
+index 3c69791bb66..ce86136906b 100644
+--- a/libstdc++-v3/src/c++98/Makefile.in
++++ b/libstdc++-v3/src/c++98/Makefile.in
+@@ -421,6 +421,7 @@ PARALLEL_FLAGS = -D_GLIBCXX_PARALLEL
+ # OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
+ # as the occasion calls for it.
+ AM_CXXFLAGS = \
++ -std=gnu++98 \
+ $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
+ $(XTEMPLATE_FLAGS) $(VTV_CXXFLAGS) \
+ $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS)