Bug 21481 - crtstuff.c should not include auto-host.h
Summary: crtstuff.c should not include auto-host.h
Status: ASSIGNED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.1.0
: P2 normal
Target Milestone: ---
Assignee: Nathan Sidwell
URL:
Keywords: build
Depends on:
Blocks: 18469
  Show dependency treegraph
 
Reported: 2005-05-10 00:33 UTC by kargl
Modified: 2013-12-26 22:47 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2013-12-26 00:00:00


Attachments
preprocessed crtstuff.c (12.78 KB, text/plain)
2005-05-10 00:35 UTC, kargl
Details
something in auto-host.h is needed to compile crtstuff.c (5.22 KB, text/plain)
2005-05-10 17:51 UTC, kargl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kargl 2005-05-10 00:33:52 UTC
Last working build gives

troutmask:sgk[236] ~/work/41/bin/gcc --version
gcc (GCC) 4.1.0 20050425 (experimental)

./xgcc -B./ -B/usr/home/sgk/work/41/amd64-unknown-freebsd6.0/bin/ -isystem
/usr/home/sgk/work/41/amd64-unknown-freebsd6.0/include -isystem
/usr/home/sgk/work/41/amd64-unknown-freebsd6.0/sys-include
-L/usr/home/sgk/gcc/obj41/gcc/../ld -O2  -save-temps -DIN_GCC    -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
 -isystem ./include  -I. -I. -I../../gcc41/gcc -I../../gcc41/gcc/.
-I../../gcc41/gcc/../include -I./../intl -I../../gcc41/gcc/../libcpp/include
-I/usr/local/include   -g0 -finhibit-size-directive -fno-inline-functions
-fno-exceptions -fno-zero-initialized-in-bss -fno-unit-at-a-time  \
   -c ../../gcc41/gcc/crtstuff.c -DCRT_BEGIN \
  -o crtbegin.o
../../gcc41/gcc/crtstuff.c:332: internal compiler error: in named_section_real,
at varasm.c:425

Probable cause:

2005-05-08  Nathan Sidwell  <nathan@codesourcery.com>
            Paolo Bonzini  <bonzini@gnu.org>

        * Makefile.in (cs-tconfig.h): Pass USED_FOR_TARGET to mkconfig.sh
        * aclocal.m4 (GCC_TARGET_TEMPLATE, AH_TEMPLATE): New.
        * configure.ac (enable_checking): Fix typos in runtime_checking.
        (ENABLE_RUNTIME_CHECKING): Mark as target template.
        (xm_file): Prepend auto-host.h
        (HAVE_GAS_HIDDEN, HAVE_LD_EH_FRAME_HDR): Mark as target template.
        * mkconfig.sh: Do not automatically define USED_FOR_TARGET in
        tconfig.h.
        * crtstuff.c: Do not include auto-host.h.
Comment 1 kargl 2005-05-10 00:35:24 UTC
Created attachment 8848 [details]
preprocessed crtstuff.c

Preprocessed data.
Comment 2 Andrew Pinski 2005-05-10 17:28:55 UTC
Is this fixed now?
Comment 3 Steve Kargl 2005-05-10 17:45:27 UTC
Subject: Re:  [4.1 Regression] Bootstrap is broken of FreeBSD by changes to crtstuff.c

On Tue, May 10, 2005 at 05:28:57PM -0000, pinskia at gcc dot gnu dot org wrote:
> 
> ------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-10 17:28 -------
> Is this fixed now?
> 

No!  The correct fix is to revert Nathan's commit to crtstuff.c
In fact, my bootstrap with the following patch just completed.

Index: crtstuff.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/crtstuff.c,v
retrieving revision 1.74
diff -c -p -r1.74 crtstuff.c
*** crtstuff.c  10 May 2005 10:27:40 -0000      1.74
--- crtstuff.c  10 May 2005 17:44:06 -0000
*************** Software Foundation, 59 Temple Place - S
*** 54,59 ****
--- 54,60 ----
  /* Target machine header files require this define. */
  #define IN_LIBGCC2
  
+ #include "auto-host.h"
  #include "tconfig.h"
  #include "tsystem.h"
  #include "coretypes.h"

Comment 4 kargl 2005-05-10 17:51:30 UTC
Created attachment 8855 [details]
something in auto-host.h is needed to compile crtstuff.c

Here is the auto-host.h file that GCC generates.  Something in this
file is needed to avoid the ICE
Comment 5 wanderer 2005-05-10 20:57:12 UTC
Hm...

I bootstrap GCC day ago (2005.05.09) using FreeBSD system compiler at FreeBSD 
5.3 withou problems. It installed and work (gcc version 4.1.0 20050509 
(experimental))
Comment 6 Steve Kargl 2005-05-10 21:06:04 UTC
Subject: Re:  [4.1 Regression] Bootstrap is broken of FreeBSD by changes to crtstuff.c

On Tue, May 10, 2005 at 08:57:12PM -0000, wanderer at rsu dot ru wrote:
> 
> ------- Additional Comments From wanderer at rsu dot ru  2005-05-10 20:57 -------
> Hm...
> 
> I bootstrap GCC day ago (2005.05.09) using FreeBSD system compiler at FreeBSD 
> 5.3 withou problems. It installed and work (gcc version 4.1.0 20050509 
> (experimental))
> 

i386 or amd64?  My failure is on amd64-*-freebsd6.0.

Comment 7 wanderer 2005-05-10 21:10:44 UTC
i386
Comment 8 Andrew Pinski 2005-05-10 23:19:48 UTC
I hear from a person this patch also fixes powerp64-linux-gnu bootstrap too.
Comment 9 Janis Johnson 2005-05-11 00:05:57 UTC
I can confirm that the patch in comment #3 fixes bootstrap on powerpc64-linux.
Comment 10 Nathan Sidwell 2005-05-11 10:55:16 UTC
Hm, this means there are more configure defines that need propagating to the
target side.
Comment 11 CVS Commits 2005-05-11 13:41:31 UTC
Subject: Bug 21481

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	nathan@gcc.gnu.org	2005-05-11 13:40:14

Modified files:
	gcc            : ChangeLog crtstuff.c 

Log message:
	PR bootstrap/21481
	* crtstuff.c: Include auto-host.h again, for now.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.8731&r2=2.8732
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/crtstuff.c.diff?cvsroot=gcc&r1=1.74&r2=1.75

Comment 12 Andrew Pinski 2005-05-11 14:07:32 UTC
Fixed.
Comment 13 Nathan Sidwell 2005-05-11 14:19:42 UTC
not fixed properly. just patched around
Comment 14 Andrew Pinski 2005-06-13 03:35:06 UTC
Then lets remove the regression markers as it is no longer a regression and change the summary to 
refect reality.