Bug 19818 - [4.0 Regression] GCC 4.0 cannot bootstrap itself
Summary: [4.0 Regression] GCC 4.0 cannot bootstrap itself
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.0.0
: P1 normal
Target Milestone: 4.0.0
Assignee: Paolo Bonzini
URL:
Keywords: build, patch
Depends on:
Blocks:
 
Reported: 2005-02-08 09:17 UTC by Paolo Bonzini
Modified: 2005-02-14 09:12 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-02-08 09:19:11


Attachments
proposed patch (1.76 KB, patch)
2005-02-08 09:18 UTC, Paolo Bonzini
Details | Diff
updated patch (2.77 KB, patch)
2005-02-08 11:16 UTC, Paolo Bonzini
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paolo Bonzini 2005-02-08 09:17:15 UTC
Warnings in libiberty and libcpp prevent GCC 4.0 from bootstrapping itself,
because libcpp's configure uses -Werror.

The easiest way to reproduce this is to configure GCC 4.0 with
--enable-bootstrap so that libcpp is bootstrapped as well.

Severity is normal and not critical because releases do not use -Werror, but the
bug ought to be fixed before GCC branches.
Comment 1 Paolo Bonzini 2005-02-08 09:18:30 UTC
Created attachment 8139 [details]
proposed patch

Pretty obvious patch if it weren't for the hunk in macro.c.

Patch is in stage2 of a toplevel bootstrap now, will post it once it finishes.
Comment 2 Paolo Bonzini 2005-02-08 09:19:11 UTC
CCing Geoff since he wrote the hunk I modify in macro.c.  It looks like a pasto,
but I am not sure.
Comment 3 Paolo Bonzini 2005-02-08 11:16:20 UTC
Created attachment 8142 [details]
updated patch

The previous patch was not enough.  Changes to gengtype are necessary to permit
using const more liberally in GTY'd structs.
Comment 4 GCC Commits 2005-02-14 08:52:39 UTC
Subject: Bug 19818

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	bonzini@gcc.gnu.org	2005-02-14 08:52:25

Modified files:
	include        : ChangeLog ansidecl.h 
	libcpp         : ChangeLog config.in configure configure.ac 
	                 internal.h macro.c pch.c 

Log message:
	include:
	2005-02-08  Paolo Bonzini  <bonzini@gnu.org>
	
	PR bootstrap/19818
	* ansidecl.h (PARAMS): Guard from redefinition.
	
	libcpp:
	2005-02-08  Paolo Bonzini  <bonzini@gnu.org>
	
	PR bootstrap/19818
	* configure.ac: Check for declaration of basename and getopt.
	* config.in: Regenerate.
	* configure: Regenerate.
	* internal.h (ustrcspn): New.
	* macro.c (create_iso_definition): Fix allocation of memory.
	(padding_token): Add cast to remove const-ness.
	* pch.c (cpp_read_state): Use ustrcspn.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/include/ChangeLog.diff?cvsroot=gcc&r1=1.169&r2=1.170
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/include/ansidecl.h.diff?cvsroot=gcc&r1=1.19&r2=1.20
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libcpp/ChangeLog.diff?cvsroot=gcc&r1=1.51&r2=1.52
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libcpp/config.in.diff?cvsroot=gcc&r1=1.3&r2=1.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libcpp/configure.diff?cvsroot=gcc&r1=1.12&r2=1.13
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libcpp/configure.ac.diff?cvsroot=gcc&r1=1.10&r2=1.11
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libcpp/internal.h.diff?cvsroot=gcc&r1=1.11&r2=1.12
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libcpp/macro.c.diff?cvsroot=gcc&r1=1.6&r2=1.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libcpp/pch.c.diff?cvsroot=gcc&r1=1.4&r2=1.5

Comment 5 Paolo Bonzini 2005-02-14 09:12:37 UTC
Patch applied.