head	1.4;
access;
symbols
	gcc-2_8_1-990325:1.4
	gcc-2_8_1-990319:1.4
	gcc-2_8_1-990302:1.4
	gcc_2_8_1-990302:1.4
	gcc_2_8_1-990222:1.4
	gcc-2_8_1-990109:1.4
	gcc-2_8_1-981210:1.4
	gcc-2_8_1-981208:1.4
	gcc-2_8_1-980929:1.4
	gcc_2_8_1-980929:1.4
	gcc-2_8_1-980928:1.4
	gcc-2_8_1-980813:1.4
	gcc-2_8_1-980811:1.4
	gcc-2_8_1-980718:1.4
	gcc-2_8_1-980705:1.4
	gcc-2_8_1-980627:1.4
	gcc-2_8_1-980609:1.4
	gcc-2_8_1-980608:1.4
	gcc-2_8_1-980529:1.4
	gcc-2_8_1-980525:1.4
	gcc-2_8_1-980513:1.4
	gcc-2_8_1-980502:1.4
	gcc-2_8_1-980402:1.4
	gcc-2_8_1-980426:1.4
	gcc-2_8_1-980419:1.4
	gcc-2_8_1-980413:1.4
	gcc-2_8_1-980412:1.4
	gcc-2_8_1-980407:1.4
	gcc-2_8_1-980401:1.4
	gcc_2_8_1-980315:1.4
	gcc-2_8_1-RELEASE:1.4;
locks; strict;
comment	@# @;


1.4
date	97.09.22.22.26.24;	author kenner;	state Exp;
branches;
next	1.3;

1.3
date	97.08.07.10.13.18;	author kenner;	state Exp;
branches;
next	1.2;

1.2
date	97.02.14.20.41.12;	author coxs;	state Exp;
branches;
next	1.1;

1.1
date	96.01.16.01.57.08;	author kenner;	state Exp;
branches;
next	;


desc
@@


1.4
log
@(CRTSTUFF_T_CFLAGS): Add -fPIC.
(CRTSTUFF_T_CFLAGS_S): Tweak for COFF.
(EXTRA_PARTS, TAROUTOPTS): Delete.
(libgcc1-elf, libgcc2-elf, libgcc-elf targets): Delete.
(MULTILIB_OPTIONS): Define.
(MULTILIB_DIRNAMES, MULTILIB_EXCEPTIONS): Likewise.
(MULTILIB_MATCHE, MULTILIB_EXTRA_OPTS): Likewise.
@
text
@# The pushl in CTOR initialization interferes with frame pointer elimination.
CRTSTUFF_T_CFLAGS   = -fPIC -fno-omit-frame-pointer
CRTSTUFF_T_CFLAGS_S = -mcoff -fno-omit-frame-pointer

#
# I am still a little unsure of the multilib architecture. The following
# 4 lines are based on advice from meissner@@cygnus.com.
#
MULTILIB_OPTIONS    = mcoff/fPIC
MULTILIB_DIRNAMES   = coff pic
MULTILIB_EXCEPTIONS = *mcoff*/*fPIC*
MULTILIB_MATCHES    = fPIC=fpic
MULTILIB_EXTRA_OPTS =

LIBGCC=stmp-multilib
INSTALL_LIBGCC=install-multilib
@


1.3
log
@(libgcc2-elf.a): Resync with Makefile.in.
@
text
@d2 2
a3 2
CRTSTUFF_T_CFLAGS =-fno-omit-frame-pointer
CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -melf -fPIC 
d6 2
a7 6
# Becuase we can be compiling for either elf or coff, we need to create
# special versions of libgcc.a. It IS possible for this not to be done
# and let the SCO linker transform the coff objects (which are created
# by default) into elf objects. However, this is inefficient. So,
# we create a libgcc-elf.a, which is used in the specs in sco5.h.
# These are the rules for doing that.
d9 5
a13 110
# NOTE: This is duplicated directly from Makefile.in. If you change it
# there, be sure to change things here!
#
EXTRA_PARTS = libgcc-elf.a crtbegin.o crtend.o crtbeginS.o crtendS.o
TAROUTOPTS = xpf

libgcc1-elf.a: stamp-crtS libgcc1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status
	-rm -f tmplibgcc1-elf.a
	for name in $(LIB1FUNCS); \
	do \
	  echo $${name}; \
	  rm -f $${name}$(objext); \
	  $(OLDCC) -DIN_LIBGCC1 -dy $(CCLIBFLAGS) $(INCLUDES) -c -DL$${name} $(srcdir)/libgcc1.c; \
	  if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
	  mv libgcc1$(objext) $${name}$(objext); \
	  $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1-elf.a $${name}$(objext); \
	  rm -f $${name}$(objext); \
	done
	for file in .. $(LIB1FUNCS_EXTRA); \
	do \
	  if [ x$${file} != x.. ]; then \
	    name=`echo $${file} | sed -e 's/[.][cS]$$//' -e 's/[.]asm$$//'`; \
	    echo $${name}; \
	    if [ $${name}.asm = $${file} ]; then \
	      cp $${file} $${name}.s || exit 1; file=$${name}.s; \
	    else true; fi; \
	    $(OLDCC) -DIN_LIBGCC1 -dy $(CCLIBFLAGS) $(INCLUDES) -c $${file}; \
	    if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
	    $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1-elf.a $${name}$(objext); \
	    if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
	    rm -f $${name}.s $${name}$(objext); \
	  else true; \
	  fi; \
	done
	-if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc1-elf.a; else true; fi
	mv tmplibgcc1-elf.a libgcc1-elf.a

libgcc2-elf.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(LIB2FUNCS_EXTRA) \
   $(LANG_LIB2FUNCS) machmode.h longlong.h gbl-ctors.h config.status
# Actually build it in tmplibgcc2.a, then rename at end,
# so that libgcc2.a itself remains nonexistent if compilation is aborted.
	-rm -f tmplibgcc2-elf.a
# -e causes any failing command to make this rule fail.
# -e doesn't work in certain shells, so we test $$? as well.
# lynx has a broken ar, it always complains when the initial library is
# empty, thus this command works only if we don't do -e
# There is a trailing backslash (\) deleted from the following line.
#	set -e;
	for name in $(LIB2FUNCS); \
	do \
	  echo $${name}; \
	  $(GCC_FOR_TARGET) -melf $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
	      $(srcdir)/libgcc2.c -o $${name}$(objext); \
	  if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
	  $(AR) $(AR_FLAGS) tmplibgcc2-elf.a $${name}$(objext); \
	  rm -f $${name}$(objext); \
	done
# Some shells crash when a loop has no items.
# So make sure there is always at least one--`..'.
# Then ignore it.
# We don't use -e here because there are if statements
# that should not make the command give up when the if condition is false.
# Instead, we test for failure after each command where it matters.
	for file in .. $(LIB2FUNCS_EXTRA) $(LANG_LIB2FUNCS); \
	do \
	  if [ x$${file} != x.. ]; then \
	    name=`echo $${file} | sed -e 's/[.][cSo]$$//' -e 's/[.]asm$$//' -e 's/[.]txt$$//'`; \
	    oname=` echo $${name} | sed -e 's,.*/,,'`; \
	    if [ $${name}.txt = $${file} ]; then \
	      for f in .. `cat $${file}`; do if [ x$${f} != x.. ]; then \
		$(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
	  	  AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" \
		  CFLAGS="$(CFLAGS) " HOST_PREFIX="$(HOST_PREFIX)" \
		  HOST_PREFIX_1="$(HOST_PREFIX_1)" \
		  LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS) -melf" $${f}; \
	        if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
	        $(AR) $(AR_FLAGS) tmplibgcc2-elf.a $${f}; \
	        rm -f $${f}; \
	      fi; done; \
	    else \
	      echo $${name}; \
	      if [ $${name}.asm = $${file} ]; then \
		cp $${file} $${name}.s || exit 1; file=$${name}.s; \
	      else true; fi; \
	      $(GCC_FOR_TARGET) -melf $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
	      if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
	      $(AR) $(AR_FLAGS) tmplibgcc2-elf.a $${oname}$(objext); \
	      rm -f $${name}.s $${oname}$(objext); \
	    fi; \
	  else true; \
	  fi; \
	done
	mv tmplibgcc2-elf.a libgcc2-elf.a
# These lines were deleted from above the mv command
# because ranlibing libgcc.a itself should suffice.
#	-if [ x${HPUX_GAS} = x ] ; then \
#	  if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc2.a; else true; fi; \
#	else true; fi

# Combine the various libraries into a single library, libgcc.a.
libgcc-elf.a: libgcc1-elf.a libgcc2-elf.a
	-rm -rf tmplibgcc-elf.a libgcc-elf.a tmpcopy
	mkdir tmpcopy
	-(cd tmpcopy; $(AR) x ../libgcc1-elf.a)
	-(cd tmpcopy; chmod +w * > /dev/null 2>&1)
	-(cd tmpcopy; $(AR) x ../libgcc2-elf.a)
	(cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc-elf.a *$(objext))
	rm -rf tmpcopy
	-if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc-elf.a; else true; fi
	mv tmplibgcc-elf.a libgcc-elf.a
d15 2
@


1.2
log
@(libgcc.a): Correct target dependencies
@
text
@d50 4
a53 2
libgcc2-elf.a: stamp-crtS libgcc2.c libgcc2.ready $(CONFIG_H) $(LIB2FUNCS_EXTRA) \
   machmode.h longlong.h gbl-ctors.h config.status
d55 6
d70 7
a76 1
	for file in .. $(LIB2FUNCS_EXTRA); \
d79 1
a79 1
	    name=`echo $${file} | sed -e 's/[.][cS]$$//' -e 's/[.]asm$$//'`; \
d81 21
a101 8
	    echo $${name}; \
	    if [ $${name}.asm = $${file} ]; then \
	      cp $${file} $${name}.s || exit 1; file=$${name}.s; \
	    else true; fi; \
	    $(GCC_FOR_TARGET) -melf $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
	    if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
	    $(AR) $(AR_FLAGS) tmplibgcc2-elf.a $${oname}$(objext); \
	    rm -f $${name}.s $${oname}$(objext); \
d106 5
@


1.1
log
@Initial revision
@
text
@d19 1
a19 1
libgcc1-elf.a: stamp-crtS stamp-crt libgcc1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status
d50 1
a50 1
libgcc2-elf.a: stamp-crtS stamp-crt libgcc2.c libgcc2.ready $(CONFIG_H) $(LIB2FUNCS_EXTRA) \
@
