This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: current: arm codegen severely broken


> Since about 6/21 snapshot, possibly prior, the arm codegen is broken to the
> point that egcs cannot compile itself.
> 
> This is seen on arm-netbsd, but the errors are /very/ likely the codegen
> engine as any compiler generated by gcc 2.7.2.2 (NetBSD's current compiler)
> will run fine.  However, if a 'make bootstrap' (or its equivalent of bulding
> a gcc, installing, and building another one from that) is done, you get the
> lovely specific error of:
> 
> xgcc: Internal compiler error: program cc1 got fatal signal 11
> 
> What's actually happening is that cc1 is coredumping, which I can cause
> simply by running cc1 with no arguments.  It happens before stdin is even
> read.
> 
> Backtrace:
> 
> #0  0xe9958 in init_emit_once (line_numbers=2708776) at ../emit-rtl.c:3462
> 3462              const_tiny_rtx[i][(int) mode] = tem;
> #1  0x48858 in compile_file (name=0xdf1c "stdin") at ../toplev.c:2548
> #2  0x4e5dc in main (argc=1, argv=0xefbfd838, envp=0xefbfd840)
>     at ../toplev.c:4838
> #3  0x10d0 in start ()

First of all, my apologies for the delay replying to this, I've been 
trying to get my own shark board up and running.

My guess is that this is the stage2 compiler that is crashing, and I would 
imagine this is the first time floating point gets used in gcc.  You are 
probably running into a mis-configuration problem, since the stage1 
compiler will build a stage2 compiler with hardware floating point.  
However, unless your kernel has an FPE in it, this will promptly crash.

Try the following patch (there is also a patch to your recent 
ASM_WEAKEN_LABEL change to put a new-line between the two statements).

Jeff, can this go in egcs 1.1?

Richard.

<date>  Richard Earnshaw (rearnsha@arm.com)

	* netbsd.h (ASM_WEAKEN_LABEL): Insert newline between .globl and .weak
	directives.

	* arm/netbsd.h (TARGET_DEFAULT): Default includes software floating 
	point.
	(CPP_FLOAT_DEFAULT_SPEC): Re-define accordingly.


Index: netbsd.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/netbsd.h,v
retrieving revision 1.1.1.2.4.1
diff -p -r1.1.1.2.4.1 netbsd.h
*** netbsd.h	1998/07/29 22:54:57	1.1.1.2.4.1
--- netbsd.h	1998/08/10 12:54:16
***************
*** 101,107 ****
  #undef ASM_WEAKEN_LABEL
  #define ASM_WEAKEN_LABEL(FILE,NAME) \
    do { fputs ("\t.globl\t", FILE); assemble_name (FILE, NAME); \
!        fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
         fputc ('\n', FILE); } while (0)
  
  /* The following macro defines the format used to output the second
--- 101,107 ----
  #undef ASM_WEAKEN_LABEL
  #define ASM_WEAKEN_LABEL(FILE,NAME) \
    do { fputs ("\t.globl\t", FILE); assemble_name (FILE, NAME); \
!        fputs ("\n\t.weak\t", FILE); assemble_name (FILE, NAME); \
         fputc ('\n', FILE); } while (0)
  
  /* The following macro defines the format used to output the second
Index: arm/netbsd.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/arm/netbsd.h,v
retrieving revision 1.4
diff -p -r1.4 netbsd.h
*** netbsd.h	1998/05/19 15:13:23	1.4
--- netbsd.h	1998/08/10 12:54:20
*************** the Free Software Foundation, 675 Mass A
*** 36,42 ****
  #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
  
  /* Default is to use APCS-32 mode.  */
! #define TARGET_DEFAULT ARM_FLAG_APCS_32
  
  #include "arm/aout.h"
  
--- 36,42 ----
  #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
  
  /* Default is to use APCS-32 mode.  */
! #define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_SOFT_FLOAT)
  
  #include "arm/aout.h"
  
*************** the Free Software Foundation, 675 Mass A
*** 66,71 ****
--- 66,75 ----
  /* Because TARGET_DEFAULT sets ARM_FLAG_APCS_32 */
  #undef CPP_APCS_PC_DEFAULT_SPEC
  #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
+ 
+ /* Because TARGET_DEFAULT sets ARM_FLAG_SOFT_FLOAT */
+ #undef CPP_FLOAT_DEFAULT_SPEC
+ #define CPP_FLOAT_DEFAULT_SPEC "-D__SOFTFP__"
  
  /* Pass -X to the linker so that it will strip symbols starting with 'L' */
  #undef LINK_SPEC

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]