1 LIB1ASMSRC = arc/lib1funcs.asm
2 LIB1ASMFUNCS = _mulsi3 _umulsidi3 _udivsi3 _divsi3 _umodsi3 _modsi3 _divmod_tools
4 # We need libgcc routines to be mangled according to which cpu they
6 # ??? -mmangle-cpu passed by default for now.
7 #LIBGCC2_CFLAGS = -g1 -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) -mmangle-cpu
9 # We want fine grained libraries, so use the new code to build the
10 # floating point emulation libraries.
14 dp-bit.c: $(srcdir)/config/fp-bit.c
15 echo '#ifndef __big_endian__' > dp-bit.c
16 echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c
17 echo '#endif' >> dp-bit.c
18 cat $(srcdir)/config/fp-bit.c >> dp-bit.c
20 fp-bit.c: $(srcdir)/config/fp-bit.c
21 echo '#define FLOAT' > fp-bit.c
22 echo '#ifndef __big_endian__' >> fp-bit.c
23 echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c
24 echo '#endif' >> fp-bit.c
25 cat $(srcdir)/config/fp-bit.c >> fp-bit.c
27 # .init/.fini section routines
29 x-crtinit.o: $(srcdir)/config/arc/initfini.c $(GCC_PASSES) $(CONFIG_H)
30 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \
31 -DCRT_INIT -finhibit-size-directive -fno-inline-functions \
32 -g0 -c $(srcdir)/config/arc/initfini.c -o $(dir)/crtinit.o
34 x-crtfini.o: $(srcdir)/config/arc/initfini.c $(GCC_PASSES) $(CONFIG_H)
35 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \
36 -DCRT_FINI -finhibit-size-directive -fno-inline-functions \
37 -g0 -c $(srcdir)/config/arc/initfini.c -o $(dir)/crtfini.o
40 MULTILIB_DIRNAMES = be
42 # We need our own versions to build multiple copies of crt*.o.
43 # ??? Use new support in Makefile.
45 LIBGCC = stmp-multilib-arc
46 INSTALL_LIBGCC = install-multilib-arc
48 stmp-multilib-arc: stmp-multilib
49 for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
50 dir=`echo $$i | sed -e 's/;.*$$//'`; \
51 flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
52 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
53 CC="$(CC)" CFLAGS="$(CFLAGS)" \
54 BUILD_PREFIX="$(BUILD_PREFIX)" BUILD_PREFIX_1="$(BUILD_PREFIX_1)" \
55 GCC_CFLAGS="$(GCC_CFLAGS) $${flags}" \
56 INCLUDES="$(INCLUDES)" CRTSTUFF_T_CFLAGS=$(CRTSTUFF_T_CFLAGS) \
57 dir="$${dir}" x-crtinit.o x-crtfini.o; \
58 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
60 touch stmp-multilib-arc
62 install-multilib-arc: install-multilib
63 for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
64 dir=`echo $$i | sed -e 's/;.*$$//'`; \
65 rm -f $(libsubdir)/$${dir}/crtinit.o; \
66 $(INSTALL_DATA) $${dir}/crtinit.o $(libsubdir)/$${dir}/crtinit.o; \
67 chmod a-x $(libsubdir)/$${dir}/crtinit.o; \
68 rm -f $(libsubdir)/$${dir}/crtfini.o; \
69 $(INSTALL_DATA) $${dir}/crtfini.o $(libsubdir)/$${dir}/crtfini.o; \
70 chmod a-x $(libsubdir)/$${dir}/crtfini.o; \