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]

Split LIB2FUNCS



Sun ChorusOS does not support some of the libraries mentioned by 
LIB2FUNCS. I am spliiting the libraries mentioned by LIB2FUNCS according 
to category. 

Here is the patch, please let me know it is okay to apply.

Thanks
Chandra

2001-09-14  Chandrakala Chavva <cchavva@redhat.com>

        * Makefile.in (LIB2FUNCS): Split the library functions mentioned
        by LIB2FUNCS according to category wise.
        LIB2FUNCS_DI, LIB2FUNCS_CTOR, LIB2FUNCS_TRAMP, LIB2FUNCS_VSI,
        LIB2FUNCS_VDI, LIB2FUNCS_CVT new vars.
        * config/t-chorus: New file. Do not define trampoline functions
        and constructor/destructor functions.
        * config.gcc: Add t-chorus to all *-*-chorusos* target triplett.s

Index: config.gcc
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config.gcc,v
retrieving revision 1.89
diff -p -r1.89 config.gcc
*** config.gcc	2001/09/14 10:19:29	1.89
--- config.gcc	2001/09/14 17:54:21
*************** i370-*-linux*)
*** 943,949 ****
  i[34567]86-*-chorusos*)
  	xm_defines=POSIX
  	tm_file="i386/i386.h i386/att.h elfos.h i386/i386elf.h chorus.h"
! 	tmake_file=i386/t-i386elf
  	xmake_file=x-svr4
  	case x${enable_threads} in
  	  xyes | xpthreads | xposix)
--- 943,949 ----
  i[34567]86-*-chorusos*)
  	xm_defines=POSIX
  	tm_file="i386/i386.h i386/att.h elfos.h i386/i386elf.h chorus.h"
! 	tmake_file="i386/t-i386elf t-chorus"
  	xmake_file=x-svr4
  	case x${enable_threads} in
  	  xyes | xpthreads | xposix)
*************** powerpc-*-netbsd*)
*** 2624,2630 ****
  powerpc-*-chorusos*)
  	xm_defines=POSIX
  	tm_file="${tm_file} svr4.h rs6000/sysv4.h chorus.h"
! 	tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
  	extra_headers=ppc-asm.h
  	case x${enable_threads} in
  	  xyes | xpthreads | xposix)
--- 2624,2630 ----
  powerpc-*-chorusos*)
  	xm_defines=POSIX
  	tm_file="${tm_file} svr4.h rs6000/sysv4.h chorus.h"
! 	tmake_file="rs6000/t-ppcos rs6000/t-ppccomm t-chorus" 
  	extra_headers=ppc-asm.h
  	case x${enable_threads} in
  	  xyes | xpthreads | xposix)
*************** sparc-*-bsd*)
*** 2876,2882 ****
  	;;
  sparc-*-chorusos*)
  	tm_file="sparc/sol2.h sparc/elf.h chorus.h"
! 	tmake_file=sparc/t-chorus-elf
  	extra_parts="crti.o crtn.o crtbegin.o crtend.o"
  	float_format=i64
  	case x${enable_threads} in
--- 2876,2882 ----
  	;;
  sparc-*-chorusos*)
  	tm_file="sparc/sol2.h sparc/elf.h chorus.h"
! 	tmake_file="sparc/t-chorus-elf t-chorus"
  	extra_parts="crti.o crtn.o crtbegin.o crtend.o"
  	float_format=i64
  	case x${enable_threads} in
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/Makefile.in,v
retrieving revision 1.733
diff -p -r1.733 Makefile.in
*** Makefile.in	2001/09/10 12:23:06	1.733
--- Makefile.in	2001/09/14 17:54:21
*************** STAGESTUFF = *$(objext) insn-flags.h ins
*** 782,796 ****
   $(LANG_STAGESTUFF)
  
  # Library members defined in libgcc2.c.
- LIB2FUNCS = _muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 _clz \
-     _cmpdi2 _ucmpdi2 _floatdidf _floatdisf _fixunsdfsi _fixunssfsi \
-     _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
-     _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi _fixtfdi _fixunstfdi \
-     _floatditf \
-     _clear_cache _trampoline __main _exit \
-     _absvsi2 _absvdi2 _addvsi3 _addvdi3 _subvsi3 _subvdi3 \
-     _mulvsi3 _mulvdi3 _negvsi2 _negvdi2 _ctors
  
  # Defined in libgcc2.c, included only in the static library.
  LIB2FUNCS_ST = _eprintf _bb __gcc_bcmp
  
--- 782,804 ----
   $(LANG_STAGESTUFF)
  
  # Library members defined in libgcc2.c.
  
+ # DI support functions
+ LIB2FUNCS_DI = _muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 _clz \
+     _cmpdi2  _ucmpdi2
+ 
+ # The conversion functions
+ LIB2FUNCS_CVT = _floatdidf _floatdisf _fixunsdfsi _fixunssfsi \
+     _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi _fixxfdi _fixunsxfdi \
+     _floatdixf _fixunsxfsi _fixtfdi  _fixunstfdi _floatditf
+ 
+ # The trampoline functions, constructor/destructor support functions,
+ # the vector SImode functions and the vector DImode functions.
+ LIB2FUNCS_TRAMP = _clear_cache _trampoline
+ LIB2FUNCS_CTOR = __main _exit _ctors
+ LIB2FUNCS_VSI = _absvsi2 _addvsi3 _subvsi3 _mulvsi3 _negvsi2
+ LIB2FUNCS_VDI = _absvdi2 _addvdi3 _subvdi3 _mulvdi3 _negvdi2
+ 
  # Defined in libgcc2.c, included only in the static library.
  LIB2FUNCS_ST = _eprintf _bb __gcc_bcmp
  
*************** LIB2ADD_ST = $(LIB2FUNCS_STATIC_EXTRA)
*** 1012,1018 ****
  libgcc.mk: config.status Makefile mklibgcc $(LIB2ADD) $(LIB2ADD_ST) xgcc$(exeext)
  	objext='$(objext)' \
  	LIB1ASMFUNCS='$(LIB1ASMFUNCS)' \
! 	LIB2FUNCS='$(LIB2FUNCS)' \
  	LIB2FUNCS_ST='$(LIB2FUNCS_ST)' \
  	LIB2ADD='$(LIB2ADD)' \
  	LIB2ADD_ST='$(LIB2ADD_ST)' \
--- 1020,1031 ----
  libgcc.mk: config.status Makefile mklibgcc $(LIB2ADD) $(LIB2ADD_ST) xgcc$(exeext)
  	objext='$(objext)' \
  	LIB1ASMFUNCS='$(LIB1ASMFUNCS)' \
! 	LIB2FUNCS_DI='$(LIB2FUNCS_DI)' \
! 	LIB2FUNCS_CVT='$(LIB2FUNCS_CVT)' \
! 	LIB2FUNCS_TRAMP='$(LIB2FUNCS_TRAMP)' \
! 	LIB2FUNCS_CTOR='$(LIB2FUNCS_CTOR)' \
! 	LIB2FUNCS_VSI='$(LIB2FUNCS_VSI)' \
! 	LIB2FUNCS_VDI='$(LIB2FUNCS_VDI)' \
  	LIB2FUNCS_ST='$(LIB2FUNCS_ST)' \
  	LIB2ADD='$(LIB2ADD)' \
  	LIB2ADD_ST='$(LIB2ADD_ST)' \
Index: config/t-chorus
===================================================================
RCS file: t-chorus
diff -N t-chorus
*** /dev/null	Tue May  5 13:32:27 1998
--- t-chorus	Fri Sep 14 10:54:53 2001
***************
*** 0 ****
--- 1,6 ----
+ # For ChorusOS do not generate trampoline functions, constructor/destructor
+ # functions as they are not valid and not used. A long jump to a nested
+ # functions will not work on ChorusOS due to trampoline removal (requires
+ # stack execution).
+ LIB2FUNCS_TRAMP =
+ LIB2FUNCS_CTOR =




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