4 CROSS_LIBGCC1 = libgcc1-aof.a
5 LIBGCC2 = libgcc2-aof.a
7 TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer
8 LIBGCC2_DEBUG_CFLAGS = -g0
10 LIBGCC1_TEST = #libgcc1-atest
11 EXTRA_PARTS = crtbegin.o crtend.o
14 # Rule to build libgcc1.a and libgcc2.a and libgcc.a, since the librarian
15 # for the ARM tools is somewhat quirky, and needs a special rule to use it.
16 libgcc1-aof.a: libgcc1.c $(CONFIG_H) config.status
17 -rm -rf tmplib libgcc1.a libgcc1-aof.a tmplibgcc1.a
19 for name in $(LIB1FUNCS); \
22 rm -f $${name}$(objext); \
23 $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c -DL$${name} $(srcdir)/libgcc1.c; \
24 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
25 mv libgcc1$(objext) tmplib/$${name}$(objext); \
28 armlib -c tmplibgcc1.a *; \
30 mv tmplibgcc1.a libgcc1-aof.a
33 libgcc2-aof.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(LIB2FUNCS_EXTRA) \
34 machmode.h longlong.h gbl-ctors.h config.status
38 for name in $(LIB2FUNCS); \
41 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
42 $(srcdir)/libgcc2.c -o tmplib/$${name}$(objext); \
43 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
46 armlib -c tmplibgcc2.a *; \
48 mv tmplibgcc2.a libgcc2-aof.a
51 # Combine the various libraries into a single library, libgcc.a.
52 libgcc-aof.a: $(CROSS_LIBGCC1) $(LIBGCC2)
53 -rm -rf tmplibgcc.a libgcc.a tmpcopy libgcc-aof.a
55 (cd tmpcopy; armlib -e ../$(LIBGCC1) \*)
56 -(cd tmpcopy; chmod +w * > /dev/null 2>&1)
57 (cd tmpcopy; armlib -e ../$(LIBGCC2) \*)
58 (cd tmpcopy; armlib -co ../tmplibgcc.a *$(objext))
60 mv tmplibgcc.a libgcc.a
61 ln libgcc.a libgcc-aof.a
63 libgcc1-atest: libgcc1-test.o native $(GCC_PARTS) $(EXTRA_PARTS)
64 @echo "Testing libgcc1. Ignore linker warning messages."
65 $(GCC_FOR_TARGET) $(GCC_CFLAGS) libgcc1-test.o -o libgcc1-test \