public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* egcs 971016 build problems under sco v5.0.0
@ 1997-10-17 20:51 William Bader
  1997-10-17 23:35 ` Jeffrey A Law
  1997-10-19 20:10 ` Robert Lipe
  0 siblings, 2 replies; 3+ messages in thread
From: William Bader @ 1997-10-17 20:51 UTC (permalink / raw)
  To: a144, egcs, robertl, william

[ cplus-dem.c in egcs-971008 ]

> 	stage1/xgcc -Bstage1/ -c  -DIN_GCC    -O2 -g   -DHAVE_CONFIG_H     -I. -I. -I./config cplus-dem.c
> xgcc: Internal compiler error: program as got fatal signal 11

as dies consistently on this module, a c++ demangler program.
Last week, I thought that this was my old 486 flaking out, but I now
believe this is a gcc problem, not a hardware problem on my system.

[ 971016 egcs ]

I am trying the 971016 egcs.
The patches mostly fiddle with Alpha optimization and still do not contain
your Intel x86 patches.

The patches do include a change to cplus-dem.c that seems to have fixed the
as problem.

But it has new problems:

It looks like the lines below in gcc/Makefile.in

>LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED \
>	@inhibit_libc@
>
># Additional options to use when compiling libgcc2.a.

becomes the lines below in gcc/Makefile

>LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED \
>	
>
># Additional options to use when compiling libgcc2.a.

which causes a sco make bug to produce

>	  ./xgcc -B./ -O2   -DIN_GCC    -g -I./include   -g1 -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  # Additional options to use when compiling libgcc2.a.  -I. -I. -I./config -c -DL${name} \
>	      ./libgcc2.c -o ${name}.o; \

which fails with

>xgcc: No input files

gmake-3.76.1 dies with

>Bootstrapping the compiler
>gmake[1]: Entering directory `/u/william/egcs-971016/gcc'
>gmake CC="cc" libdir=/usr/local/lib LANGUAGES="c "
>gmake[2]: Entering directory `/u/william/egcs-971016/gcc'
>cd . && autoheader
>/bin/sh: autoheader: not found

I changed gcc/Makefile.in to combine the lines and avoid the sco make
problems with an empty line following a backslash.

[ cplus-dem.c revisited ]

Compiling with -O1 works.  -O2 must be generating bad code.

The next error is on tinfo.cc:

>	./xgcc -B./ -O1   -DIN_GCC    -O1 -g -I./include   -g1 -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED   -fPIC -I. -I. -I./config \
>	  -c ./cp/tinfo.cc
>xgcc: Internal compiler error: program as got fatal signal 11

Compiling with -O0 produces

>(EOF):undefined name: .L_T105

Could this problem and the one with cplus-dem.c be related to elf/coff
problems?

I will be out of town next week.
The patches I am using (mostly by Robert Lipe) are below.

William

------------------------------------------------------------

*** ./gcc/config/i386/sco5.h-	Mon Sep 22 13:31:44 1997
--- ./gcc/config/i386/sco5.h	Thu Oct  9 12:53:55 1997
***************
*** 76,81 ****
--- 76,92 ----
  #undef GLOBAL_ASM_OP
  #define GLOBAL_ASM_OP			"\t.globl"
  
+ #undef EH_FRAME_SECTION_ASM_OP
+ #define EH_FRAME_SECTION_ASM_OP_COFF	"\t.section\t.ehfram, \"x\""
+ #define EH_FRAME_SECTION_ASM_OP_ELF	"\t.section\t.eh_frame, \"aw\""
+ #define EH_FRAME_SECTION_ASM_OP	\
+   ((TARGET_ELF) ? EH_FRAME_SECTION_ASM_OP_ELF : EH_FRAME_SECTION_ASM_OP_COFF)
+ 
+ /* Avoid problems (long sectino names, forward assembler refs) with DWARF
+    exception unwinding when we're generating COFF */
+ #define DWARF2_UNWIND_INFO	\
+   ((TARGET_ELF) ? 1 : 0 )  
+ 
  #undef CONST_SECTION_ASM_OP
  #define CONST_SECTION_ASM_OP_COFF	"\t.section\t.rodata, \"x\""
  #define CONST_SECTION_ASM_OP_ELF	"\t.section\t.rodata"
***************
*** 563,569 ****
    ((TARGET_ELF) ? DWARF_DEBUG: SDB_DEBUG)
  
  #undef EXTRA_SECTIONS
! #define EXTRA_SECTIONS in_const, in_init, in_fini, in_ctors, in_dtors
  
  #undef EXTRA_SECTION_FUNCTIONS
  #define EXTRA_SECTION_FUNCTIONS						\
--- 574,580 ----
    ((TARGET_ELF) ? DWARF_DEBUG: SDB_DEBUG)
  
  #undef EXTRA_SECTIONS
! #define EXTRA_SECTIONS in_const, in_init, in_fini, in_ctors, in_dtors, in_eh
  
  #undef EXTRA_SECTION_FUNCTIONS
  #define EXTRA_SECTION_FUNCTIONS						\
***************
*** 901,906 ****
--- 912,918 ----
  # undef FINI_SECTION_ASM_OP
  # undef CTORS_SECTION_ASM_OP
  # undef DTORS_SECTION_ASM_OP
+ # undef EH_FRAME_SECTION_ASM_OP
  # undef CTOR_LIST_BEGIN
  # undef CTOR_LIST_END
  # undef DO_GLOBAL_CTORS_BODY
***************
*** 912,922 ****
--- 924,936 ----
  #  define FINI_SECTION_ASM_OP FINI_SECTION_ASM_OP_ELF
  #  define DTORS_SECTION_ASM_OP DTORS_SECTION_ASM_OP_ELF
  #  define CTORS_SECTION_ASM_OP CTORS_SECTION_ASM_OP_ELF
+ #  define EH_FRAME_SECTION_ASM_OP EH_FRAME_SECTION_ASM_OP_ELF
  # else /* ! _SCO_ELF */
  #  define INIT_SECTION_ASM_OP INIT_SECTION_ASM_OP_COFF
  #  define FINI_SECTION_ASM_OP FINI_SECTION_ASM_OP_COFF
  #  define DTORS_SECTION_ASM_OP DTORS_SECTION_ASM_OP_COFF
  #  define CTORS_SECTION_ASM_OP CTORS_SECTION_ASM_OP_COFF
+ #  define EH_FRAME_SECTION_ASM_OP ""
  #  define CTOR_LIST_BEGIN asm (INIT_SECTION_ASM_OP); asm ("pushl $0")
  #  define CTOR_LIST_END CTOR_LIST_BEGIN
  #  define DO_GLOBAL_CTORS_BODY						\
*** ./gcc/toplev.c-	Thu Oct  9 12:45:46 1997
--- ./gcc/toplev.c	Thu Oct  9 12:53:55 1997
***************
*** 4294,4299 ****
--- 4294,4303 ----
    OVERRIDE_OPTIONS;
  #endif
  
+ #ifdef DWARF2_UNWIND_INFO
+   exceptions_via_longjmp = !DWARF2_UNWIND_INFO ;
+ #endif
+ 
    if (profile_block_flag == 3)
      {
        warning ("`-ax' and `-a' are conflicting options. `-a' ignored.");
*** ./gcc/Makefile.in-	Fri Oct 17 11:26:43 1997
--- ./gcc/Makefile.in	Fri Oct 17 16:27:25 1997
***************
*** 58,64 ****
  XCFLAGS =
  TCFLAGS =
  CFLAGS = -g
! BOOT_CFLAGS = -O2 $(CFLAGS)
  # These exists to be overridden by the x-* and t-* files, respectively.
  X_CFLAGS =
  T_CFLAGS =
--- 58,64 ----
  XCFLAGS =
  TCFLAGS =
  CFLAGS = -g
! BOOT_CFLAGS = -O1 $(CFLAGS)
  # These exists to be overridden by the x-* and t-* files, respectively.
  X_CFLAGS =
  T_CFLAGS =
***************
*** 269,276 ****
  # we use this here because that should be enough, and also
  # so that -g1 will be tested.
  LIBGCC2_DEBUG_CFLAGS = -g1
! LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED \
! 	@inhibit_libc@
  
  # Additional options to use when compiling libgcc2.a.
  # Some targets override this to -Iinclude
--- 269,275 ----
  # we use this here because that should be enough, and also
  # so that -g1 will be tested.
  LIBGCC2_DEBUG_CFLAGS = -g1
! LIBGCC2_CFLAGS = -O1 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED @inhibit_libc@
  
  # Additional options to use when compiling libgcc2.a.
  # Some targets override this to -Iinclude
*** ./texinfo/info/termdep.h-	Thu Aug 21 18:58:04 1997
--- ./texinfo/info/termdep.h	Thu Oct  9 13:41:53 1997
***************
*** 45,50 ****
--- 45,53 ----
  
  #if defined (HAVE_TERMIOS_H)
  #  include <termios.h>
+ #  if defined (_SCO_DS) && defined(TIOCGETC)
+ #    undef TIOCGETC
+ #  endif /* _SCO_DS */
  #else
  #  if defined (HAVE_TERMIO_H)
  #    include <termio.h>




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: egcs 971016 build problems under sco v5.0.0
  1997-10-17 20:51 egcs 971016 build problems under sco v5.0.0 William Bader
@ 1997-10-17 23:35 ` Jeffrey A Law
  1997-10-19 20:10 ` Robert Lipe
  1 sibling, 0 replies; 3+ messages in thread
From: Jeffrey A Law @ 1997-10-17 23:35 UTC (permalink / raw)
  To: William Bader; +Cc: a144, egcs, robertl

  In message < 9710171946.aa19962@mip486.nscs.fast.net >you write:
  > [ cplus-dem.c in egcs-971008 ]
  > 
  > > 	stage1/xgcc -Bstage1/ -c  -DIN_GCC    -O2 -g   -DHAVE_CONFIG_H     -I. 
  > -I. -I./config cplus-dem.c
  > > xgcc: Internal compiler error: program as got fatal signal 11
  > 
  > as dies consistently on this module, a c++ demangler program.
  > Last week, I thought that this was my old 486 flaking out, but I now
  > believe this is a gcc problem, not a hardware problem on my system.
Well, there's definitely a "as" problem since it shouldn't core
dump no mater what input it was presented with.

There may also be a gcc problem which is exposing the as bug; there's
some EH stuff that I just installed that might help.  Then again, it
might not.  I don't know.  Maybe Robert can shed some light on this
problem.

  > But it has new problems:
  > 
  > It looks like the lines below in gcc/Makefile.in
I've fixed the problem.  In general it's a bad idea to have a trailing
backslash followed by an empty line -- many makes get confused about
this.

  > The next error is on tinfo.cc:
  > 
  > >	./xgcc -B./ -O1   -DIN_GCC    -O1 -g -I./include   -g1 -DIN_LIBGCC2 -D_
  > _GCC_FLOAT_NOT_NEEDED   -fPIC -I. -I. -I./config \
  > >	  -c ./cp/tinfo.cc
  > >xgcc: Internal compiler error: program as got fatal signal 11
  > 
  > Compiling with -O0 produces
  > 
  > >(EOF):undefined name: .L_T105
  > 
  > Could this problem and the one with cplus-dem.c be related to elf/coff
  > problems?
It could

  > I will be out of town next week.
  > The patches I am using (mostly by Robert Lipe) are below.
The next egcs snapshot should have the "moral equivalent" to Robert's
patches :-)

  > gmake-3.76.1 dies with

  > >Bootstrapping the compiler
  > >gmake[1]: Entering directory `/u/william/egcs-971016/gcc'
  > >gmake CC="cc" libdir=/usr/local/lib LANGUAGES="c "
  > >gmake[2]: Entering directory `/u/william/egcs-971016/gcc'
  > >cd . && autoheader
Were you building from a pure snapshot or a snapshot + diffs?

If you build from a snapshot + diffs, then its likely that you'll
need a copy of autoconf on your system.  If you build from pure
snapshots you should never need autoconf.

For reference, if you use a diff and want to make sure all the
timestamps are reasonable (to avoid needing autoconf/autoheader
bison/yacc, etc etc) you can use the following to touch all
the generated files.

touch `find egcs-$date -name configure -print`
touch egcs-$date/gcc/{cstamp-h.in,bi-parser.c,bi-parser.h,c-gperf.h,c-parse.c,c-
parse.h,cexp.c}
touch egcs-$date/gcc/cp/{parse.c,parse.h}
touch egcs-$date/gcc/objc/objc-parse.c

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: egcs 971016 build problems under sco v5.0.0
  1997-10-17 20:51 egcs 971016 build problems under sco v5.0.0 William Bader
  1997-10-17 23:35 ` Jeffrey A Law
@ 1997-10-19 20:10 ` Robert Lipe
  1 sibling, 0 replies; 3+ messages in thread
From: Robert Lipe @ 1997-10-19 20:10 UTC (permalink / raw)
  To: William Bader; +Cc: a144, egcs

William Bader wrote:
> [ cplus-dem.c in egcs-971008 ]
> 
> > 	stage1/xgcc -Bstage1/ -c  -DIN_GCC    -O2 -g   -DHAVE_CONFIG_H     -I. -I. -I./config cplus-dem.c
> > xgcc: Internal compiler error: program as got fatal signal 11
> 
> as dies consistently on this module, a c++ demangler program.
> Last week, I thought that this was my old 486 flaking out, but I now
> believe this is a gcc problem, not a hardware problem on my system.

I didn't stop at 1008, instead patching directly to 1016.   If you want
to pursue this, send me the compiler output that killed the assembler.
I'll try to reduce it and submit it to SCO.

I didn't see the problem, but you later said that 1016 didn't have it,
so that probably explains that.


> [ cplus-dem.c revisited ]
> Compiling with -O1 works.  -O2 must be generating bad code.

My make bootstrap worked just fine.

> The next error is on tinfo.cc:
> 
> >	./xgcc -B./ -O1   -DIN_GCC    -O1 -g -I./include   -g1 -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED   -fPIC -I. -I. -I./config \
> >	  -c ./cp/tinfo.cc
> >xgcc: Internal compiler error: program as got fatal signal 11
> Compiling with -O0 produces
> >(EOF):undefined name: .L_T105


I don't see this, either.   I tried two machines running 5.0.0 and 5.0.4.
I wonder if you have a misapplied patch somewhere.   'brik -C' will help.

Strangely, that bug does have a familiar ring to it.   Wasn't that the
thing that Jim Wilson fixed in about August or so in the dwarfout module?

Perhaps it's worth waiting for the next snapshot just to be sure we're 
working from the same code base.   Jeff has acknowledged that my sco5.h 
fixes have been applied.

> The patches I am using (mostly by Robert Lipe) are below.

I didn't carefully pick through these patches, but several of them
do look familiar.

This one in particular troubles me as unsightly.

TIOCGETC is indeed defined in OpenServer, but there isn't a struct tchars
defined anywhere.   Perhaps this should be autoconfiscated instead of 
applying this patch.


> *** ./texinfo/info/termdep.h-	Thu Aug 21 18:58:04 1997
> --- ./texinfo/info/termdep.h	Thu Oct  9 13:41:53 1997
> ***************
> *** 45,50 ****
> --- 45,53 ----
>   
>   #if defined (HAVE_TERMIOS_H)
>   #  include <termios.h>
> + #  if defined (_SCO_DS) && defined(TIOCGETC)
> + #    undef TIOCGETC
> + #  endif /* _SCO_DS */
>   #else
>   #  if defined (HAVE_TERMIO_H)
>   #    include <termio.h>
> 
> 
> 
> 
> 

-- 
Robert Lipe       http://www.dgii.com/people/robertl       robertl@dgii.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1997-10-19 20:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-17 20:51 egcs 971016 build problems under sco v5.0.0 William Bader
1997-10-17 23:35 ` Jeffrey A Law
1997-10-19 20:10 ` Robert Lipe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).