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: Add support multilib parts for m32rx processor.


Hi Richard,

>> Approved and applied.
>
> See my message from earlier today -- no other target does
> it this way, which leads me to believe that this isn't Right.

Fair enough.  Here is a patch to make the m32r port Do The Right Thing
(tm).  Applied to the mainline.  I'll apply it to the 3.3 branch is
someone whinges enough.

Cheers
        Nick

2003-06-05  Nick Clifton  <nickc@redhat.com>

	* config.gcc (m32r-elf): Revert previous delta.
        * config/m32r/t-m32r (crtinit.o): Fix rule to work with
        multilibs.  Remove m32rx specific version.
        (crtfini.o): Likewise.
        (EXTRA_MULTILIB_PARTS): Define.
        

Index: gcc/config.gcc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.308
diff -c -3 -p -r1.308 config.gcc
*** gcc/config.gcc	3 Jun 2003 20:39:51 -0000	1.308
--- gcc/config.gcc	4 Jun 2003 17:26:09 -0000
*************** ip2k-*-elf)
*** 1260,1266 ****
  	;;
  m32r-*-elf*)
  	tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
! 	extra_parts="crtinit.o crtfini.o m32rx/crtinit.o m32rx/crtfini.o"
   	;;
  # m68hc11 and m68hc12 share the same machine description.
  m68hc11-*-*|m6811-*-*)
--- 1261,1267 ----
  	;;
  m32r-*-elf*)
  	tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
! 	extra_parts="crtinit.o crtfini.o"
   	;;
  # m68hc11 and m68hc12 share the same machine description.
  m68hc11-*-*|m6811-*-*)

Index: gcc/config/m32r/t-m32r
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m32r/t-m32r,v
retrieving revision 1.7
diff -c -3 -p -r1.7 t-m32r
*** gcc/config/m32r/t-m32r	9 Nov 2001 14:57:50 -0000	1.7
--- gcc/config/m32r/t-m32r	4 Jun 2003 17:26:09 -0000
*************** CRTSTUFF_T_CFLAGS =
*** 26,56 ****
  
  # .init/.fini section routines
  
! crtinit.o: $(srcdir)/config/m32r/initfini.c $(GCC_PASSES) $(CONFIG_H)
! 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \
! 	  -DCRT_INIT -finhibit-size-directive -fno-inline-functions \
! 	  -g0 -mmodel=medium -c $(srcdir)/config/m32r/initfini.c -o crtinit.o
! 
! crtfini.o: $(srcdir)/config/m32r/initfini.c $(GCC_PASSES) $(CONFIG_H)
! 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \
! 	  -DCRT_FINI -finhibit-size-directive -fno-inline-functions \
! 	  -g0 -mmodel=medium -c $(srcdir)/config/m32r/initfini.c -o crtfini.o
! 
  m32rx:
  	mkdir $@
  
- m32rx/crtinit.o: m32rx $(srcdir)/config/m32r/initfini.c $(GCC_PASSES) $(CONFIG_H)
- 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \
- 	-DCRT_INIT -finhibit-size-directive -fno-inline-functions \
- 	-g0 -mmodel=medium -c $(srcdir)/config/m32r/initfini.c -m32rx \
- 	-o m32rx/crtinit.o
- 
- m32rx/crtfini.o: m32rx $(srcdir)/config/m32r/initfini.c $(GCC_PASSES) $(CONFIG_H)
- 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \
- 	-DCRT_FINI -finhibit-size-directive -fno-inline-functions \
- 	-g0 -mmodel=medium -c $(srcdir)/config/m32r/initfini.c -m32rx \
- 	-o m32rx/crtfini.o
- 
  # -mmodel={small,medium} requires separate libraries.
  # We don't build libraries for the large model, instead we use the medium
  # libraries.  The only difference is that the large model can handle jumps
--- 26,47 ----
  
  # .init/.fini section routines
  
! $(T)crtinit.o: $(srcdir)/config/m32r/initfini.c $(GCC_PASSES) $(CONFIG_H)
! 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) \
! 	$(CRTSTUFF_T_CFLAGS) $(INCLUDES) -DCRT_INIT \
! 	-finhibit-size-directive -fno-inline-functions -g0 \
! 	-mmodel=medium -c $(srcdir)/config/m32r/initfini.c \
! 	-o $(T)crtinit.o 
! 
! $(T)crtfini.o: $(srcdir)/config/m32r/initfini.c $(GCC_PASSES) $(CONFIG_H)
! 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) \
! 	$(CRTSTUFF_T_CFLAGS) $(INCLUDES) -DCRT_FINI \
! 	-finhibit-size-directive -fno-inline-functions -g0 \
! 	-mmodel=medium -c $(srcdir)/config/m32r/initfini.c \
! 	-o $(T)crtfini.o 
  m32rx:
  	mkdir $@
  
  # -mmodel={small,medium} requires separate libraries.
  # We don't build libraries for the large model, instead we use the medium
  # libraries.  The only difference is that the large model can handle jumps
*************** MULTILIB_MATCHES = mmodel?medium=mmodel?
*** 64,69 ****
--- 55,62 ----
  # SHN_M32R_SCOMMON.
  # This is important for objects referenced in system header files.
  MULTILIB_EXTRA_OPTS = msdata=sdata
+ 
+ EXTRA_MULTILIB_PARTS = crtinit.o crtfini.o
  
  LIBGCC = stmp-multilib
  INSTALL_LIBGCC = install-multilib
        


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