This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: ppc-eabisim is broken in mainline


> Some experimentation shows that the assembler from the two dates behaves 
> the same,
> and eabi.S is identical, but the preprocessed source files differ.  cc1 
> used to define
> _RELOCATABLE, but it does not any more.

The problem is that target_flags_explicit was not being set on the
options that set additional masks.  Silly me for not understanding
how c-opt.c worked.

The patch below fixes your problem.  I'm testing on ppc-linux right now,
but a preliminary test shows your problem being resolved.  Could you
please test on your configuration?

David/Geoff, could you take a peek at this?

Thanks.

	* config/rs6000/rs6000.c (rs6000_handle_option): Set
	target_flags_explicit when appropriate.

Index: config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.823
diff -c -p -r1.823 rs6000.c
*** config/rs6000/rs6000.c	7 May 2005 18:51:46 -0000	1.823
--- config/rs6000/rs6000.c	11 May 2005 17:22:25 -0000
*************** rs6000_handle_option (size_t code, const
*** 1553,1570 ****
--- 1553,1577 ----
      case OPT_mno_power:
        target_flags &= ~(MASK_POWER | MASK_POWER2
  			| MASK_MULTIPLE | MASK_STRING);
+       target_flags_explicit |= (MASK_POWER | MASK_POWER2
+ 				| MASK_MULTIPLE | MASK_STRING);
        break;
      case OPT_mno_powerpc:
        target_flags &= ~(MASK_POWERPC | MASK_PPC_GPOPT
  			| MASK_PPC_GFXOPT | MASK_POWERPC64);
+       target_flags_explicit |= (MASK_POWERPC | MASK_PPC_GPOPT
+ 				| MASK_PPC_GFXOPT | MASK_POWERPC64);
        break;
      case OPT_mfull_toc:
        target_flags &= ~(MASK_MINIMAL_TOC | MASK_NO_FP_IN_TOC
  			| MASK_NO_SUM_IN_TOC);
+       target_flags_explicit |= (MASK_MINIMAL_TOC | MASK_NO_FP_IN_TOC
+ 				| MASK_NO_SUM_IN_TOC);
  #ifdef TARGET_USES_SYSV4_OPT
        /* Note, V.4 no longer uses a normal TOC, so make -mfull-toc, be
  	 just the same as -mminimal-toc.  */
        target_flags |= MASK_MINIMAL_TOC;
+       target_flags_explicit |= MASK_MINIMAL_TOC;
  #endif
        break;
  
*************** rs6000_handle_option (size_t code, const
*** 1572,1577 ****
--- 1579,1585 ----
      case OPT_mtoc:
        /* Make -mtoc behave like -mminimal-toc.  */
        target_flags |= MASK_MINIMAL_TOC;
+       target_flags_explicit |= MASK_MINIMAL_TOC;
        break;
  #endif
  
*************** rs6000_handle_option (size_t code, const
*** 1581,1586 ****
--- 1589,1596 ----
      case OPT_m64:
  #endif
        target_flags |= MASK_POWERPC64 | MASK_POWERPC | MASK_PPC_GFXOPT;
+       target_flags_explicit |= MASK_POWERPC64 | MASK_POWERPC
+ 	| MASK_PPC_GFXOPT;
        break;
  
  #ifdef TARGET_USES_AIX64_OPT
*************** rs6000_handle_option (size_t code, const
*** 1589,1594 ****
--- 1599,1605 ----
      case OPT_m32:
  #endif
        target_flags &= ~MASK_POWERPC64;
+       target_flags_explicit |= MASK_POWERPC64;
        break;
  
      case OPT_minsert_sched_nops_:
*************** rs6000_handle_option (size_t code, const
*** 1598,1622 ****
      case OPT_mminimal_toc:
        if (value == 1)
  	{
! 	  target_flags &= ~MASK_NO_FP_IN_TOC;
! 	  target_flags &= ~MASK_NO_SUM_IN_TOC;
  	}
        break;
  
      case OPT_mpower:
        if (value == 1)
! 	target_flags |= (MASK_MULTIPLE | MASK_STRING);
        break;
  
      case OPT_mpower2:
        if (value == 1)
! 	target_flags |= (MASK_POWER | MASK_MULTIPLE | MASK_STRING);
        break;
  
      case OPT_mpowerpc_gpopt:
      case OPT_mpowerpc_gfxopt:
        if (value == 1)
! 	target_flags |= MASK_POWERPC;
        break;
  
  #if TARGET_ALTIVEC_VRSAVE != 0
--- 1609,1642 ----
      case OPT_mminimal_toc:
        if (value == 1)
  	{
! 	  target_flags &= ~(MASK_NO_FP_IN_TOC | MASK_NO_SUM_IN_TOC);
! 	  target_flags_explicit |= (MASK_NO_FP_IN_TOC | MASK_NO_SUM_IN_TOC);
  	}
        break;
  
      case OPT_mpower:
        if (value == 1)
! 	{
! 	  target_flags |= (MASK_MULTIPLE | MASK_STRING);
! 	  target_flags_explicit |= (MASK_MULTIPLE | MASK_STRING);
! 	}
        break;
  
      case OPT_mpower2:
        if (value == 1)
! 	{
! 	  target_flags |= (MASK_POWER | MASK_MULTIPLE | MASK_STRING);
! 	  target_flags_explicit |= (MASK_POWER | MASK_MULTIPLE | MASK_STRING);
! 	}
        break;
  
      case OPT_mpowerpc_gpopt:
      case OPT_mpowerpc_gfxopt:
        if (value == 1)
! 	{
! 	  target_flags |= MASK_POWERPC;
! 	  target_flags_explicit |= MASK_POWERPC;
! 	}
        break;
  
  #if TARGET_ALTIVEC_VRSAVE != 0
*************** rs6000_handle_option (size_t code, const
*** 1657,1671 ****
  
      case OPT_mrelocatable:
        if (value == 1)
! 	target_flags |= MASK_MINIMAL_TOC | MASK_NO_FP_IN_TOC;
        break;
  
      case OPT_mrelocatable_lib:
        if (value == 1)
! 	target_flags |= MASK_RELOCATABLE | MASK_MINIMAL_TOC
! 	  | MASK_NO_FP_IN_TOC;
        else
! 	target_flags &= ~MASK_RELOCATABLE;
        break;
  #endif
  
--- 1677,1701 ----
  
      case OPT_mrelocatable:
        if (value == 1)
! 	{
! 	  target_flags |= MASK_MINIMAL_TOC | MASK_NO_FP_IN_TOC;
! 	  target_flags_explicit |= MASK_MINIMAL_TOC | MASK_NO_FP_IN_TOC;
! 	}
        break;
  
      case OPT_mrelocatable_lib:
        if (value == 1)
! 	{
! 	  target_flags |= MASK_RELOCATABLE | MASK_MINIMAL_TOC
! 	    | MASK_NO_FP_IN_TOC;
! 	  target_flags_explicit |= MASK_RELOCATABLE | MASK_MINIMAL_TOC
! 	    | MASK_NO_FP_IN_TOC;
! 	}
        else
! 	{
! 	  target_flags &= ~MASK_RELOCATABLE;
! 	  target_flags_explicit |= MASK_RELOCATABLE;
! 	}
        break;
  #endif
  


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