From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 29 17:27:52 2017 Received: (at submit) by debbugs.gnu.org; 29 Aug 2017 21:27:52 +0000 Received: from localhost ([127.0.0.1]:32950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmo36-0005Cc-44 for submit@debbugs.gnu.org; Tue, 29 Aug 2017 17:27:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38755) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmo35-0005CO-2T for submit@debbugs.gnu.org; Tue, 29 Aug 2017 17:27:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmo2z-0006Sg-44 for submit@debbugs.gnu.org; Tue, 29 Aug 2017 17:27:45 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:37191) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dmo2z-0006Sc-1w for submit@debbugs.gnu.org; Tue, 29 Aug 2017 17:27:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmo2x-0001WR-Ly for bug-guix@gnu.org; Tue, 29 Aug 2017 17:27:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmo2t-0006P2-Oj for bug-guix@gnu.org; Tue, 29 Aug 2017 17:27:43 -0400 Received: from world.peace.net ([50.252.239.5]:49836) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dmo2t-0006OL-Kg for bug-guix@gnu.org; Tue, 29 Aug 2017 17:27:39 -0400 Received: from [72.93.31.49] (helo=jojen) by world.peace.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dmo2r-0007Uu-Fl; Tue, 29 Aug 2017 17:27:37 -0400 From: Mark H Weaver To: bug-guix@gnu.org Subject: GCC 4.7.4 fails to build since April 2017 Date: Tue, 29 Aug 2017 17:26:59 -0400 Message-ID: <87h8wqgj4s.fsf@netris.org> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) GCC 4.7.4 fails to build since April 2017: https://hydra.gnu.org/job/gnu/master/gcc-4.7.4.x86_64-linux https://hydra.gnu.org/job/gnu/master/gcc-4.7.4.i686-linux Mark From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 06 16:59:17 2017 Received: (at 28284) by debbugs.gnu.org; 6 Nov 2017 21:59:17 +0000 Received: from localhost ([127.0.0.1]:54730 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBpQG-0000Ju-V6 for submit@debbugs.gnu.org; Mon, 06 Nov 2017 16:59:17 -0500 Received: from eggs.gnu.org ([208.118.235.92]:33972) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBpQD-0000J0-31 for 28284@debbugs.gnu.org; Mon, 06 Nov 2017 16:59:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eBpPz-0002Tf-2c for 28284@debbugs.gnu.org; Mon, 06 Nov 2017 16:58:59 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52927) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eBpPh-0002O3-Qa; Mon, 06 Nov 2017 16:58:37 -0500 Received: from peder.onsbrabantnet.nl ([88.159.206.46]:53248 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eBpPh-0003nT-Dq; Mon, 06 Nov 2017 16:58:37 -0500 From: Jan Nieuwenhuizen To: Mark H Weaver Subject: Re: bug#28284: GCC 4.7.4 fails to build since April 2017 References: <87h8wqgj4s.fsf@netris.org> Date: Mon, 06 Nov 2017 22:58:28 +0100 In-Reply-To: <87h8wqgj4s.fsf@netris.org> (Mark H. Weaver's message of "Tue, 29 Aug 2017 17:26:59 -0400") Message-ID: <874lq75at7.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28284 Cc: 28284@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain Mark H Weaver writes: > GCC 4.7.4 fails to build since April 2017: > > https://hydra.gnu.org/job/gnu/master/gcc-4.7.4.x86_64-linux > https://hydra.gnu.org/job/gnu/master/gcc-4.7.4.i686-linux The attached patch should fix this. I tested it on an inherited package like this below, while attempting to create diverse double compilation (define-public repro-gcc-4.7 (package (inherit gcc-4.7-$ORIGIN) (source (origin (inherit (package-source gcc-4.7-$ORIGIN)) (patches (append ((compose origin-patches package-source) gcc-4.7) (search-patches "gcc-5-reproducibility-drop-profile.patch" "gcc-4-cfns-fix-mismatch-in-gnu_inline-attributes.patch" "gcc-4-build-path-prefix-map.patch"))))) (name "repro-gcc") (version "4.7.4") (arguments (substitute-keyword-arguments (package-arguments gcc-4.7-$ORIGIN) ((#:phases original-phases) `(modify-phases ,original-phases (add-before 'configure 'build-prefix-path (lambda* (#:key inputs #:allow-other-keys) (setenv "BUILD_PATH_PREFIX_MAP" (string-append "gcc" "-" ,version "=" (getcwd))) (format (current-error-port) "BUILD_PATH_PREFIX_MAP=~s\n" (getenv "BUILD_PATH_PREFIX_MAP")))))))))) Greetings, janneke --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-gcc-4.7-Resurrect-building-with-gcc-5.4.0.patch Content-Transfer-Encoding: quoted-printable >From b2fb0adc3e0de7194493a0c5f1f9bbdbcd0a4087 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 6 Nov 2017 22:50:05 +0100 Subject: [PATCH] gnu: gcc-4.7: Resurrect building with gcc-5.4.0. * gnu/packages/patches/gcc-4-cfns-fix-mismatch-in-gnu_inline-attributes.pat= ch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/gcc.scm (gcc-4.7): Use it. --- gnu/local.mk | 1 + gnu/packages/gcc.scm | 3 + ...fns-fix-mismatch-in-gnu_inline-attributes.patch | 65 ++++++++++++++++++= ++++ 3 files changed, 69 insertions(+) create mode 100644 gnu/packages/patches/gcc-4-cfns-fix-mismatch-in-gnu_inl= ine-attributes.patch diff --git a/gnu/local.mk b/gnu/local.mk index 5dfcf497b..76aef903a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -637,6 +637,7 @@ dist_patch_DATA =3D \ %D%/packages/patches/gcc-cross-environment-variables.patch \ %D%/packages/patches/gcc-libvtv-runpath.patch \ %D%/packages/patches/gcc-strmov-store-file-names.patch \ + %D%/packages/patches/gcc-4-cfns-fix-mismatch-in-gnu_inline-attributes.pa= tch \ %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.0-libvtv-runpath.patch \ diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 7870d4513..2991cbd0b 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -136,6 +136,9 @@ where the OS part is overloaded to denote a specific AB= I---into GCC (method url-fetch) (uri (string-append "mirror://gnu/gcc/gcc-" version "/gcc-" version ".tar.bz2")) + (patches + (search-patches + "gcc-4-cfns-fix-mismatch-in-gnu_inline-attributes.patch")) (sha256 (base32 "10k2k71kxgay283ylbbhhs51cl55zn2q38vj5pk4k950qdnirrlj")))) diff --git a/gnu/packages/patches/gcc-4-cfns-fix-mismatch-in-gnu_inline-att= ributes.patch b/gnu/packages/patches/gcc-4-cfns-fix-mismatch-in-gnu_inline-= attributes.patch new file mode 100644 index 000000000..861cd4857 --- /dev/null +++ b/gnu/packages/patches/gcc-4-cfns-fix-mismatch-in-gnu_inline-attributes= .patch @@ -0,0 +1,65 @@ +Taken from https://gcc.gnu.org/cgi-bin/get-raw-msg?listname=3Dgcc-patches= &date=3D2016-01&msgid=3D1451802493-17406-1-git-send-email-vapier%40gentoo.o= rg + +Since the 3.0.3 release of gperf (made in May 2007), the generated func +has had the gnu_inline attribute applied to it. The gcc source however +has not been updated to include that which has lead to a mismatch. + +In practice, this hasn't been an issue for two reasons: +(1) Before gcc-5, the default standard was (gnu) C89, and gcc does not +warn or throw an error in this mode. +(2) Starting with gcc-4.8, the compiler driver used to build gcc was +changed to C++, and g++ does not warn or throw an error in this mode. + +This error does show up though when using gcc-5 to build gcc-4.7 or +older as then the default is (gnu) C11 and the C compiler driver is +used. That failure looks like: +In file included from .../gcc-4.7.4/gcc/cp/except.c:990:0: +cfns.gperf: At top level: +cfns.gperf:101:1: error: 'gnu_inline' attribute present on 'libc_name_p' +cfns.gperf:26:14: error: but not here + +Whether the compiler should always emit this error regardless of the +active standard or compiler driver is debatable (I think it should be +consistent -- either always do it or never do it). + +2015-08-06 Mike Frysinger + + * cfns.gperf [__GNUC__, __GNUC_STDC_INLINE__]: Apply the + __gnu_inline__ attribute. + * cfns.h: Regenerated. +--- + gcc/cp/cfns.gperf | 3 +++ + gcc/cp/cfns.h | 3 +++ + 2 files changed, 6 insertions(+) + +diff --git a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf +index 68acd3d..953262f 100644 +--- a/gcc/cp/cfns.gperf ++++ b/gcc/cp/cfns.gperf +@@ -22,6 +22,9 @@ __inline + static unsigned int hash (const char *, unsigned int); + #ifdef __GNUC__ + __inline ++#ifdef __GNUC_STDC_INLINE__ ++__attribute__ ((__gnu_inline__)) ++#endif + #endif + const char * libc_name_p (const char *, unsigned int); + %} +diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h +index 1c6665d..6d00c0e 100644 +--- a/gcc/cp/cfns.h ++++ b/gcc/cp/cfns.h +@@ -53,6 +53,9 @@ __inline + static unsigned int hash (const char *, unsigned int); + #ifdef __GNUC__ + __inline ++#ifdef __GNUC_STDC_INLINE__ ++__attribute__ ((__gnu_inline__)) ++#endif + #endif + const char * libc_name_p (const char *, unsigned int); + /* maximum key range =3D 391, duplicates =3D 0 */ +--=20 +2.6.2 + --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 07 05:25:34 2017 Received: (at 28284) by debbugs.gnu.org; 7 Nov 2017 10:25:34 +0000 Received: from localhost ([127.0.0.1]:55212 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eC14Y-0002vS-L0 for submit@debbugs.gnu.org; Tue, 07 Nov 2017 05:25:34 -0500 Received: from hera.aquilenet.fr ([141.255.128.1]:37392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eC14T-0002vE-MQ for 28284@debbugs.gnu.org; Tue, 07 Nov 2017 05:25:33 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id C028BF6B0; Tue, 7 Nov 2017 11:25:30 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EaaaNFVk7nKD; Tue, 7 Nov 2017 11:25:27 +0100 (CET) Received: from ribbon (unknown [193.50.110.150]) by hera.aquilenet.fr (Postfix) with ESMTPSA id CC90DF6AD; Tue, 7 Nov 2017 11:25:26 +0100 (CET) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Jan Nieuwenhuizen Subject: Re: bug#28284: GCC 4.7.4 fails to build since April 2017 References: <87h8wqgj4s.fsf@netris.org> <874lq75at7.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 17 Brumaire an 226 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 07 Nov 2017 11:25:24 +0100 In-Reply-To: <874lq75at7.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Mon, 06 Nov 2017 22:58:28 +0100") Message-ID: <87lgji9yi3.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 28284 Cc: Mark H Weaver , 28284@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Hello! Jan Nieuwenhuizen skribis: > From b2fb0adc3e0de7194493a0c5f1f9bbdbcd0a4087 Mon Sep 17 00:00:00 2001 > From: Jan Nieuwenhuizen > Date: Mon, 6 Nov 2017 22:50:05 +0100 > Subject: [PATCH] gnu: gcc-4.7: Resurrect building with gcc-5.4.0. > > * gnu/packages/patches/gcc-4-cfns-fix-mismatch-in-gnu_inline-attributes.p= atch: > New file. Could you use a shorter file name, so we don't hit tar=E2=80=99s limit on f= ile name length? > * gnu/local.mk (dist_patch_DATA): Add it. > * gnu/packages/gcc.scm (gcc-4.7): Use it. I think this can actually go to master, though please double-check that the world isn=E2=80=99t getting rebuilt. :-) Thank you! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 07 12:30:59 2017 Received: (at 28284) by debbugs.gnu.org; 7 Nov 2017 17:30:59 +0000 Received: from localhost ([127.0.0.1]:56859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eC7i8-0007aa-Nq for submit@debbugs.gnu.org; Tue, 07 Nov 2017 12:30:58 -0500 Received: from eggs.gnu.org ([208.118.235.92]:37069) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eC7i4-0007aK-Dk for 28284@debbugs.gnu.org; Tue, 07 Nov 2017 12:30:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eC7hv-0007id-Eq for 28284@debbugs.gnu.org; Tue, 07 Nov 2017 12:30:43 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54149) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eC7hN-0007Po-Br; Tue, 07 Nov 2017 12:30:05 -0500 Received: from peder.onsbrabantnet.nl ([88.159.206.46]:47178 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eC7hK-000669-Ju; Tue, 07 Nov 2017 12:30:03 -0500 From: Jan Nieuwenhuizen To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: bug#28284: GCC 4.7.4 fails to build since April 2017 References: <87h8wqgj4s.fsf@netris.org> <874lq75at7.fsf@gnu.org> <87lgji9yi3.fsf@gnu.org> Date: Tue, 07 Nov 2017 18:29:51 +0100 In-Reply-To: <87lgji9yi3.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 07 Nov 2017 11:25:24 +0100") Message-ID: <87d14um1yo.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28284 Cc: Mark H Weaver , 28284@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: >> * gnu/packages/patches/gcc-4-cfns-fix-mismatch-in-gnu_inline-attributes.= patch: >> New file. > > Could you use a shorter file name, so we don't hit tar=E2=80=99s limit on= file > name length? I chose: gcc-4-compile-with-gcc-5.patch. New patch attached. >> * gnu/local.mk (dist_patch_DATA): Add it. >> * gnu/packages/gcc.scm (gcc-4.7): Use it. > > I think this can actually go to master, though please double-check that > the world isn=E2=80=99t getting rebuilt. :-) Here is what I did 18:25:50 janneke@dundal:~/src/guix-master [env] $ ./pre-inst-env guix refresh -l gcc@4.7.4 No dependents other than itself: gcc@4.7.4 18:25:55 janneke@dundal:~/src/guix-master [env] $ ./pre-inst-env guix build hello /gnu/store/lr8c1yswvrgckkaa6nzdi7q0d618bazs-hello-2.10 18:26:01 janneke@dundal:~/src/guix-master [env] so indeed, it looks fine; and it makes sense. I was working on the $ORIGIN stuff inside (a copy of) the gcc-4.7.4 builder -- that code is of course (re)used by all other gcc packages. Greetings, janneke --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-gcc-4.7-Resurrect-building-with-gcc-5.4.0.patch Content-Transfer-Encoding: quoted-printable >From 22d5353991784409e3a8e671611c5ccff3ff7b68 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 6 Nov 2017 22:50:05 +0100 Subject: [PATCH] gnu: gcc-4.7: Resurrect building with gcc-5.4.0. * gnu/packages/patches/gcc-4-compile-with-gcc-5.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/gcc.scm (gcc-4.7): Use it. --- gnu/local.mk | 2 + gnu/packages/gcc.scm | 1 + .../patches/gcc-4-compile-with-gcc-5.patch | 65 ++++++++++++++++++= ++++ 3 files changed, 68 insertions(+) create mode 100644 gnu/packages/patches/gcc-4-compile-with-gcc-5.patch diff --git a/gnu/local.mk b/gnu/local.mk index 630d8187f..c77c4d8ed 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -11,6 +11,7 @@ # Copyright =C2=A9 2016 Ben Woodcroft # Copyright =C2=A9 2016, 2017 Alex Vong # Copyright =C2=A9 2016, 2017 Efraim Flashner +# Copyright =C2=A9 2016, 2017 Jan Nieuwenhuizen # Copyright =C2=A9 2017 Tobias Geerinckx-Rice # Copyright =C2=A9 2017 Cl=C3=A9ment Lassieur # Copyright =C2=A9 2017 Mathieu Othacehe @@ -637,6 +638,7 @@ dist_patch_DATA =3D \ %D%/packages/patches/gcc-cross-environment-variables.patch \ %D%/packages/patches/gcc-libvtv-runpath.patch \ %D%/packages/patches/gcc-strmov-store-file-names.patch \ + %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.0-libvtv-runpath.patch \ diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 7870d4513..79e159f1a 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -136,6 +136,7 @@ where the OS part is overloaded to denote a specific AB= I---into GCC (method url-fetch) (uri (string-append "mirror://gnu/gcc/gcc-" version "/gcc-" version ".tar.bz2")) + (patches (search-patches "gcc-4-compile-with-gcc-5.patch")) (sha256 (base32 "10k2k71kxgay283ylbbhhs51cl55zn2q38vj5pk4k950qdnirrlj")))) diff --git a/gnu/packages/patches/gcc-4-compile-with-gcc-5.patch b/gnu/pack= ages/patches/gcc-4-compile-with-gcc-5.patch new file mode 100644 index 000000000..861cd4857 --- /dev/null +++ b/gnu/packages/patches/gcc-4-compile-with-gcc-5.patch @@ -0,0 +1,65 @@ +Taken from https://gcc.gnu.org/cgi-bin/get-raw-msg?listname=3Dgcc-patches= &date=3D2016-01&msgid=3D1451802493-17406-1-git-send-email-vapier%40gentoo.o= rg + +Since the 3.0.3 release of gperf (made in May 2007), the generated func +has had the gnu_inline attribute applied to it. The gcc source however +has not been updated to include that which has lead to a mismatch. + +In practice, this hasn't been an issue for two reasons: +(1) Before gcc-5, the default standard was (gnu) C89, and gcc does not +warn or throw an error in this mode. +(2) Starting with gcc-4.8, the compiler driver used to build gcc was +changed to C++, and g++ does not warn or throw an error in this mode. + +This error does show up though when using gcc-5 to build gcc-4.7 or +older as then the default is (gnu) C11 and the C compiler driver is +used. That failure looks like: +In file included from .../gcc-4.7.4/gcc/cp/except.c:990:0: +cfns.gperf: At top level: +cfns.gperf:101:1: error: 'gnu_inline' attribute present on 'libc_name_p' +cfns.gperf:26:14: error: but not here + +Whether the compiler should always emit this error regardless of the +active standard or compiler driver is debatable (I think it should be +consistent -- either always do it or never do it). + +2015-08-06 Mike Frysinger + + * cfns.gperf [__GNUC__, __GNUC_STDC_INLINE__]: Apply the + __gnu_inline__ attribute. + * cfns.h: Regenerated. +--- + gcc/cp/cfns.gperf | 3 +++ + gcc/cp/cfns.h | 3 +++ + 2 files changed, 6 insertions(+) + +diff --git a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf +index 68acd3d..953262f 100644 +--- a/gcc/cp/cfns.gperf ++++ b/gcc/cp/cfns.gperf +@@ -22,6 +22,9 @@ __inline + static unsigned int hash (const char *, unsigned int); + #ifdef __GNUC__ + __inline ++#ifdef __GNUC_STDC_INLINE__ ++__attribute__ ((__gnu_inline__)) ++#endif + #endif + const char * libc_name_p (const char *, unsigned int); + %} +diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h +index 1c6665d..6d00c0e 100644 +--- a/gcc/cp/cfns.h ++++ b/gcc/cp/cfns.h +@@ -53,6 +53,9 @@ __inline + static unsigned int hash (const char *, unsigned int); + #ifdef __GNUC__ + __inline ++#ifdef __GNUC_STDC_INLINE__ ++__attribute__ ((__gnu_inline__)) ++#endif + #endif + const char * libc_name_p (const char *, unsigned int); + /* maximum key range =3D 391, duplicates =3D 0 */ +--=20 +2.6.2 + --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 07 15:58:54 2017 Received: (at 28284) by debbugs.gnu.org; 7 Nov 2017 20:58:54 +0000 Received: from localhost ([127.0.0.1]:57100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eCAxS-000888-JI for submit@debbugs.gnu.org; Tue, 07 Nov 2017 15:58:54 -0500 Received: from hera.aquilenet.fr ([141.255.128.1]:39114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eCAxN-00087t-Ry for 28284@debbugs.gnu.org; Tue, 07 Nov 2017 15:58:53 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 23466F78D; Tue, 7 Nov 2017 21:58:50 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NbOlRLPb3UX6; Tue, 7 Nov 2017 21:58:48 +0100 (CET) Received: from ribbon (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 1D1CDF78B; Tue, 7 Nov 2017 21:58:48 +0100 (CET) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Jan Nieuwenhuizen Subject: Re: bug#28284: GCC 4.7.4 fails to build since April 2017 References: <87h8wqgj4s.fsf@netris.org> <874lq75at7.fsf@gnu.org> <87lgji9yi3.fsf@gnu.org> <87d14um1yo.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 17 Brumaire an 226 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 07 Nov 2017 21:58:45 +0100 In-Reply-To: <87d14um1yo.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Tue, 07 Nov 2017 18:29:51 +0100") Message-ID: <87mv3xztyy.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 28284 Cc: Mark H Weaver , 28284@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Jan Nieuwenhuizen skribis: > Here is what I did > > 18:25:50 janneke@dundal:~/src/guix-master [env] > $ ./pre-inst-env guix refresh -l gcc@4.7.4 > No dependents other than itself: gcc@4.7.4 > 18:25:55 janneke@dundal:~/src/guix-master [env] > $ ./pre-inst-env guix build hello > /gnu/store/lr8c1yswvrgckkaa6nzdi7q0d618bazs-hello-2.10 > 18:26:01 janneke@dundal:~/src/guix-master [env] > > so indeed, it looks fine; and it makes sense. Sounds good. > I was working on the $ORIGIN stuff inside (a copy of) the gcc-4.7.4 > builder -- that code is of course (re)used by all other gcc packages. Though the $ORIGIN stuff is separate, right? Will be nice to have. > From 22d5353991784409e3a8e671611c5ccff3ff7b68 Mon Sep 17 00:00:00 2001 > From: Jan Nieuwenhuizen > Date: Mon, 6 Nov 2017 22:50:05 +0100 > Subject: [PATCH] gnu: gcc-4.7: Resurrect building with gcc-5.4.0. > > * gnu/packages/patches/gcc-4-compile-with-gcc-5.patch: New file. > * gnu/local.mk (dist_patch_DATA): Add it. > * gnu/packages/gcc.scm (gcc-4.7): Use it. Go for it! Thank you, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 07 16:08:55 2017 Received: (at 28284-done) by debbugs.gnu.org; 7 Nov 2017 21:08:56 +0000 Received: from localhost ([127.0.0.1]:57133 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eCB76-0008P3-Gf for submit@debbugs.gnu.org; Tue, 07 Nov 2017 16:08:55 -0500 Received: from eggs.gnu.org ([208.118.235.92]:47509) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eCB72-0008Om-02 for 28284-done@debbugs.gnu.org; Tue, 07 Nov 2017 16:08:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eCB6t-0008U5-Na for 28284-done@debbugs.gnu.org; Tue, 07 Nov 2017 16:08:42 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59132) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eCB6P-00089X-7S; Tue, 07 Nov 2017 16:08:09 -0500 Received: from peder.onsbrabantnet.nl ([88.159.206.46]:47636 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eCB6O-00070N-QH; Tue, 07 Nov 2017 16:08:09 -0500 From: Jan Nieuwenhuizen To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: bug#28284: GCC 4.7.4 fails to build since April 2017 Organization: AvatarAcademy.nl References: <87h8wqgj4s.fsf@netris.org> <874lq75at7.fsf@gnu.org> <87lgji9yi3.fsf@gnu.org> <87d14um1yo.fsf@gnu.org> <87mv3xztyy.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Tue, 07 Nov 2017 22:07:53 +0100 In-Reply-To: <87mv3xztyy.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 07 Nov 2017 21:58:45 +0100") Message-ID: <874lq5lrva.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28284-done Cc: Mark H Weaver , 28284-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Ludovic Court=C3=A8s writes: >> I was working on the $ORIGIN stuff inside (a copy of) the gcc-4.7.4 >> builder -- that code is of course (re)used by all other gcc packages. > > Though the $ORIGIN stuff is separate, right? Will be nice to have. Sure, i figure this will take some time to get in if at all. We'll have to see what the pros and cons are. Different story/thread. >> From 22d5353991784409e3a8e671611c5ccff3ff7b68 Mon Sep 17 00:00:00 2001 >> From: Jan Nieuwenhuizen >> Date: Mon, 6 Nov 2017 22:50:05 +0100 >> Subject: [PATCH] gnu: gcc-4.7: Resurrect building with gcc-5.4.0. >> >> * gnu/packages/patches/gcc-4-compile-with-gcc-5.patch: New file. >> * gnu/local.mk (dist_patch_DATA): Add it. >> * gnu/packages/gcc.scm (gcc-4.7): Use it. > > Go for it! Pushed to master as 625492ee1a5a8e515b97d4b76734584c1b420243 janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com From unknown Sat Aug 16 18:31:46 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 06 Dec 2017 12:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator