Only build eabi crtx in eabi dirs; ditto for solaris; fix multilib solaris/linux
From-SVN: r12668
This commit is contained in:
parent
deeeee8cd3
commit
ce59619c01
|
@ -33,11 +33,9 @@ MULTILIB_DIRNAMES = nof \
|
|||
|
||||
MULTILIB_MATCHES = mlittle=mlittle-endian \
|
||||
mbig=mbig-endian \
|
||||
mbig=mcall-linux \
|
||||
msoft-float=mcpu?403 \
|
||||
msoft-float=mcpu?821 \
|
||||
msoft-float=mcpu?860 \
|
||||
mcall-sysv=mcall-solaris \
|
||||
mcall-sysv=mcall-sysv-eabi \
|
||||
mcall-sysv=mcall-sysv-noeabi
|
||||
|
||||
|
@ -71,34 +69,57 @@ scrtn.S: $(srcdir)/config/rs6000/sol-cn.asm
|
|||
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.
|
||||
stmp-crt: ecrti.S ecrtn.S scrti.S scrtn.S scrt0.c $(GCC_PASSES) $(EXTRA_HEADERS) stmp-multilib config.status
|
||||
# Build multiple copies of ?crt{i,n}.o, one for each target switch.
|
||||
stmp-crt: ecrti.S ecrtn.S scrt0.c scrti.S scrtn.S libgcc2.ready config.status
|
||||
for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
|
||||
dir=`echo $$i | sed -e 's/;.*$$//'`; \
|
||||
flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
|
||||
$(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
|
||||
LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS) $${flags}" \
|
||||
dir="$${dir}" stmp-crt-sub; \
|
||||
if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
|
||||
case "$$flags" in \
|
||||
*-mcall-solaris*) \
|
||||
$(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
|
||||
LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS) $${flags}" \
|
||||
dir="$${dir}" stmp-crt-sub2; \
|
||||
if [ $$? -eq 0 ] ; then true; else exit 1; fi;; \
|
||||
*-mcall-linux*) \
|
||||
true;; \
|
||||
*) \
|
||||
$(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
|
||||
LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS) $${flags}" \
|
||||
dir="$${dir}" stmp-crt-sub; \
|
||||
if [ $$? -eq 0 ] ; then true; else exit 1; fi;; \
|
||||
esac; \
|
||||
done
|
||||
touch stmp-crt
|
||||
|
||||
# Subroutine of stmp-crt so make -n works.
|
||||
stmp-crt-sub:
|
||||
if [ -d $(dir) ]; then true; else mkdir $(dir); fi
|
||||
$(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -c -o $(dir)/ecrti.o ecrti.S
|
||||
$(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -c -o $(dir)/ecrtn.o ecrtn.S
|
||||
|
||||
# Subroutine of stmp-crt so make -n works.
|
||||
stmp-crt-sub2:
|
||||
if [ -d $(dir) ]; then true; else mkdir $(dir); fi
|
||||
$(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -c -o $(dir)/scrti.o scrti.S
|
||||
$(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -c -o $(dir)/scrtn.o scrtn.S
|
||||
$(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -c -o $(dir)/scrt0.o scrt0.c
|
||||
|
||||
# Install multiple versions of crt[in].o
|
||||
# Install multiple versions of ?crt[in].o
|
||||
install-crt: stmp-crt install-dir install-multilib
|
||||
for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
|
||||
dir=`echo $$i | sed -e 's/;.*$$//'`; \
|
||||
rm -f $(libsubdir)/$${dir}/[es]crt[in0].o; \
|
||||
$(INSTALL_DATA) $${dir}/ecrti.o $(libsubdir)/$${dir}/ecrti.o; \
|
||||
$(INSTALL_DATA) $${dir}/ecrtn.o $(libsubdir)/$${dir}/ecrtn.o; \
|
||||
$(INSTALL_DATA) $${dir}/scrti.o $(libsubdir)/$${dir}/scrti.o; \
|
||||
$(INSTALL_DATA) $${dir}/scrtn.o $(libsubdir)/$${dir}/scrtn.o; \
|
||||
$(INSTALL_DATA) $${dir}/scrt0.o $(libsubdir)/$${dir}/scrt0.o; \
|
||||
flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
|
||||
case "$$flags" in \
|
||||
*-mcall-solaris*) \
|
||||
rm -f $(libsubdir)/$${dir}/scrt[in0].o; \
|
||||
$(INSTALL_DATA) $${dir}/scrti.o $(libsubdir)/$${dir}/scrti.o; \
|
||||
$(INSTALL_DATA) $${dir}/scrtn.o $(libsubdir)/$${dir}/scrtn.o; \
|
||||
$(INSTALL_DATA) $${dir}/scrt0.o $(libsubdir)/$${dir}/scrt0.o;; \
|
||||
*-mcall-linux*) \
|
||||
true;; \
|
||||
*) \
|
||||
rm -f $(libsubdir)/$${dir}/ecrt[in].o; \
|
||||
$(INSTALL_DATA) $${dir}/ecrti.o $(libsubdir)/$${dir}/ecrti.o; \
|
||||
$(INSTALL_DATA) $${dir}/ecrtn.o $(libsubdir)/$${dir}/ecrtn.o; \
|
||||
esac; \
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue