# Target config file for Solaris without gas
# Do not build libgcc1.
LIBGCC1 =
CROSS_LIBGCC1 =

# These are really part of libgcc1, but this will cause them to be
# built correctly, so... [taken from t-sparclite]
LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c

dp-bit.c: $(srcdir)/config/fp-bit.c
	cat $(srcdir)/config/fp-bit.c > dp-bit.c

fp-bit.c: $(srcdir)/config/fp-bit.c
	echo '#define FLOAT' > fp-bit.c
	cat $(srcdir)/config/fp-bit.c >> fp-bit.c

# Build libgcc.a with different options.  If no gas support, don't build
# explicit little endian or big endian libraries, since it depends on the
# -mbig/-mlittle switches passed to gas.  The -mrelocatable support also needs
# -mrelocatable passed to gas, so don't use it either.
MULTILIB_OPTIONS	= msoft-float
MULTILIB_DIRNAMES	= nof
MULTILIB_MATCHES	=
MULTILIB_EXCEPTIONS	=

LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
EXTRA_MULTILIB_PARTS = ecrti$(objext) ecrtn$(objext) scrt0$(objext) scrti$(objext) scrtn$(objext)

# For eabigas we build {e,s}crti.o and {e,s}crtn.o which serve to add begin and
# end labels to all of the special sections used when we link using gcc.

# Assemble startup files.
ecrti.S: $(srcdir)/config/rs6000/eabi-ci.asm
	cat $(srcdir)/config/rs6000/eabi-ci.asm >ecrti.S

ecrtn.S: $(srcdir)/config/rs6000/eabi-cn.asm
	cat $(srcdir)/config/rs6000/eabi-cn.asm >ecrtn.S

scrti.S: $(srcdir)/config/rs6000/sol-ci.asm
	cat $(srcdir)/config/rs6000/sol-ci.asm >scrti.S

scrtn.S: $(srcdir)/config/rs6000/sol-cn.asm
	cat $(srcdir)/config/rs6000/sol-cn.asm >scrtn.S

scrt0.c: $(srcdir)/config/rs6000/sol-c0.c
	cat $(srcdir)/config/rs6000/sol-c0.c >scrt0.c

# Build multiple copies of ?crt{i,n}.o, one for each target switch.
$(T)ecrti$(objext): ecrti.S
	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ecrti.S -o $(T)ecrti$(objext)
								         
$(T)ecrtn$(objext): ecrtn.S					         
	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ecrtn.S -o $(T)ecrtn$(objext)
								         
$(T)scrti$(objext): scrti.S					         
	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ecrti.S -o $(T)scrti$(objext)
								         
$(T)scrtn$(objext): scrtn.S					         
	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ecrti.S -o $(T)scrtn$(objext)
								         
$(T)scrt0$(objext): scrt0.c					         
	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ecrti.S -o $(T)scrt0$(objext)
