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]

Committed: various CRIS fixes.


There was a bug in config/cris/linux.h where the config/svr4.h
definition of LIB_SPEC was copied while it should have been from
config/linux.h, thus missing pthreads support.  Now that the
config/ elfos.h, svr4.h and linux.h aren't intertwined and one
including the other, they could be rearranged to avoid the
duplicate definition, and CRIS could use the right definition
directly from config/linux.h.  Also gets rid of a duplicate
STARTFILE_SPEC definition.

There was also a change a few days ago causing a need to have
TREE_CODE defined to get a declaration of section functions in
output.h, so I had to move it to (at least) below the tree.h
inclusion in cris.c.

And a miniscule space fixup for cris.h.

	* config.gcc (cris-*-linux*, tm_file): Rearrange order.
	* config/cris/linux.h (LIB_SPEC, STARTFILE_SPEC): Don't redefine.

	* config/cris/cris.h (EH_RETURN_DATA_REGNO): Fix formatting.

	* config/cris/cris.c: Include output.h after tree.h but before
	target.h.

Index: config.gcc
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config.gcc,v
retrieving revision 1.99
diff -p -c -r1.99 config.gcc
*** config.gcc	2001/10/28 20:09:01	1.99
--- config.gcc	2001/10/31 19:26:37
*************** cris-*-elf | cris-*-none)
*** 679,685 ****
  	gas=yes
  	;;
  cris-*-linux*)
! 	tm_file="elfos.h svr4.h linux.h ${tm_file} cris/linux.h"
  	tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux"
  	extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
  	case x${enable_threads} in
--- 679,685 ----
  	gas=yes
  	;;
  cris-*-linux*)
! 	tm_file="elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
  	tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux"
  	extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
  	case x${enable_threads} in
Index: config/cris/cris.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/cris/cris.c,v
retrieving revision 1.6
diff -p -c -r1.6 cris.c
*** cris.c	2001/10/30 15:01:50	1.6
--- cris.c	2001/10/31 19:26:55
*************** Boston, MA 02111-1307, USA.  */
*** 27,33 ****
  #include "real.h"
  #include "insn-config.h"
  #include "conditions.h"
- #include "output.h"
  #include "insn-attr.h"
  #include "flags.h"
  #include "tree.h"
--- 27,32 ----
*************** Boston, MA 02111-1307, USA.  */
*** 38,43 ****
--- 37,43 ----
  #include "recog.h"
  #include "tm_p.h"
  #include "debug.h"
+ #include "output.h"
  #include "target.h"
  #include "target-def.h"
  
Index: config/cris/cris.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/cris/cris.h,v
retrieving revision 1.6
diff -p -c -r1.6 cris.h
*** cris.h	2001/10/30 15:01:50	1.6
--- cris.h	2001/10/31 19:27:08
*************** enum reg_class {NO_REGS, ALL_REGS, LIM_R
*** 837,843 ****
     number of __builtin_eh_return callers is limited.  For now return
     parameter registers in reverse order and hope for the best.  */
  #define EH_RETURN_DATA_REGNO(N) \
!   (IN_RANGE((N), 0, 3) ? (CRIS_FIRST_ARG_REG + 3 - (N)) : INVALID_REGNUM)
  
  /* Store the stack adjustment in the structure-return-address register.  */
  #define CRIS_STACKADJ_REG STRUCT_VALUE_REGNUM
--- 837,843 ----
     number of __builtin_eh_return callers is limited.  For now return
     parameter registers in reverse order and hope for the best.  */
  #define EH_RETURN_DATA_REGNO(N) \
!   (IN_RANGE ((N), 0, 3) ? (CRIS_FIRST_ARG_REG + 3 - (N)) : INVALID_REGNUM)
  
  /* Store the stack adjustment in the structure-return-address register.  */
  #define CRIS_STACKADJ_REG STRUCT_VALUE_REGNUM
Index: config/cris/linux.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/cris/linux.h,v
retrieving revision 1.1
diff -p -c -r1.1 linux.h
*** linux.h	2001/10/11 17:02:36	1.1
--- linux.h	2001/10/31 19:27:08
*************** Boston, MA 02111-1307, USA.  */
*** 87,100 ****
  #undef CRIS_SUBTARGET_VERSION
  #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
  
- 
- /* Redefine what was in svr4.h.  Include order madness makes it less
-    useful to include (config/)linux.h after cris.h.  (config/)linux.h
-    includes svr4.h which undef:s lots of supposedly arch-specific macros
-    carefully defined by cris.h.  */
- #undef LIB_SPEC
- #define LIB_SPEC "%{!shared:%{!symbolic:-lc}}"
- 
  /* We need an -rpath-link to ld.so.1, and presumably to each directory
     specified with -B.  */
  #undef CRIS_LINK_SUBTARGET_SPEC
--- 87,92 ----
*************** Boston, MA 02111-1307, USA.  */
*** 105,123 ****
    %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
    %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
    %{O2|O3: --gc-sections}"
- 
- #undef STARTFILE_SPEC
- #define STARTFILE_SPEC \
-  "%{!shared:\
-    %{pg:gcrt1.o%s}\
-    %{!pg:\
-     %{p:gcrt1.o%s}\
-     %{!p:\
-      %{profile:gcrt1.o%s}\
-      %{!profile:crt1.o%s}}}}\
-   crti.o%s\
-   %{!shared:crtbegin.o%s}\
-   %{shared:crtbeginS.o%s}"
  
  
  /* Node: Sections */
--- 97,102 ----

brgds, H-P


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