aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Evans <dje@gnu.org>1994-07-11 22:36:14 +0000
committerDoug Evans <dje@gnu.org>1994-07-11 22:36:14 +0000
commit44d65d8450722d05e0f183b95ae396319a3190b6 (patch)
treeab4ef16941fc5235c465755cf9c000c6215d8d42
parent012a47cb77ff762418af8c1150637235b447b42a (diff)
downloadgcc-44d65d8450722d05e0f183b95ae396319a3190b6.zip
gcc-44d65d8450722d05e0f183b95ae396319a3190b6.tar.gz
gcc-44d65d8450722d05e0f183b95ae396319a3190b6.tar.bz2
(libgcc1-asm.a): New target for building libgcc1.a in cross compilers.
From-SVN: r7724
-rw-r--r--gcc/Makefile.in26
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 023d423..65e3e85 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -740,6 +740,32 @@ libgcc1.a: libgcc1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status
done
mv tmplibgcc1.a libgcc1.a
+# Build libgcc1.a from assembler source. LIB1ASMFUNCS is the list of
+# functions. LIB1ASMSRC is the name of the source file in the config
+# subdirectory.
+libgcc1-asm.a: libgcc2.ready config.status $(srcdir)/config/$(LIB1ASMSRC)
+ -rm -f tmplibgcc1.a libgcc1.S
+ cp $(srcdir)/config/$(LIB1ASMSRC) libgcc1.S
+# Actually build it in tmplibgcc1.a, then rename at end,
+# so that libgcc1-asm.a itself remains nonexistent if compilation is aborted.
+# -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 $(LIB1ASMFUNCS); \
+ do \
+ echo $${name}; \
+ $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} libgcc1.S; \
+ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
+ mv libgcc1.o $${name}.o; \
+ $(AR) $(AR_FLAGS) tmplibgcc1.a $${name}.o; \
+ rm -f $${name}.o; \
+ done
+ -rm -f libgcc1.S
+ mv tmplibgcc1.a libgcc1-asm.a
+
# Compiling libgcc2.a requires making sure that cc1, etc. have been compiled.
# But recompiling cc1 should not force recompilation of libgcc2.a.
# If you want to force recompilation, delete libgcc2.a.