egcs 971016 build problems under sco v5.0.0

William Bader william@nscs.fast.net
Fri Oct 17 20:51:00 GMT 1997


[ 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>






More information about the Gcc mailing list