# This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
# It omits XCFLAGS, and specifies -B./.
# It also specifies -B$(tooldir)/ to find as and ld for a cross compiler.
-GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) -B./ -B$(tooldir)/
+GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) -B./ -B$(tooldir)/bin/
# Special flags for compiling enquire.
# We disable optimization to make floating point more reliable.
all.internal: start.encap rest.encap
# This is what to compile if making a cross-compiler.
-all.cross: native gcc-cross cross-test $(EXTRA_PARTS)
+all.cross: native gcc-cross libgcc.a cross-test $(EXTRA_PARTS)
# This is what must be made before installing GCC and converting libraries.
-start.encap: native xgcc specs $(LIBGCC1_TARGET)
+start.encap: native xgcc specs $(LIBGCC1)
# Use this to make a GCC that will be used only to recompile GCC.
for-bootstrap: start.encap libgcc.a
# These can't be made, with COFF encapsulation, until after GCC can run.
# Verify that it works to compile and link cross-test.
# If it does, then there are sufficient replacements for libgcc1.a.
-cross-test: cross-test.o native gcc-cross
+cross-test: cross-test.o native gcc-cross libgcc.a
$(GCC_FOR_TARGET) $(GCC_CFLAGS) cross-test.o -o $@
cross-test.o: cross-test.c native gcc-cross
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -c $(srcdir)/cross-test.c
$(OLDAR) $(OLDAR_FLAGS) libgcc1.null dummy.o
rm -f dummy.o dummy.c
+# This is $(LIBGCC1) for a cross-compiler.
+# We have no automatic way of building libgcc1.a,
+# so it's up to the installer to find a way to do that.
+# This rule deliberately does not depend on libgcc1.a
+# so that it will fail if the installer hasn't provided it.
+libgcc1.cross:
+ mv libgcc1.a libgcc1.cross || (echo You must find a way to make libgcc1.a; false)
+
# Compile the library of arithmetic subroutines with the native compiler.
# Don't compile it with GCC!
# (That would cause most arithmetic functions to call themselves.)
$(srcdir)/cp-parse.c $(srcdir)/cp-parse.h : $(srcdir)/cp-parse.y
@echo expect 30 shift/reduce conflicts and 14 reduce/reduce conflicts
cd $(srcdir); $(BISON) $(BISONFLAGS) -d -o cp-parse.c cp-parse.y
- cd $(srcdir); grep '^#define[ ]*YYEMPTY' cp-parse.c >>cp-parse.y
+ cd $(srcdir); grep '^#define[ ]*YYEMPTY' cp-parse.c >>cp-parse.h
cp-spew.o : cp-spew.c $(CONFIG_H) $(CPLUS_TREE_H) \
$(srcdir)/cp-parse.h flags.h
toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h input.h \
insn-attr.h xcoffout.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
- $(MAYBE_USE_COLLECT2) -c `echo $(srcdir)/toplev.c | sed 's,^\./,,'`
+ $(MAYBE_TARGET_DEFAULT) $(MAYBE_USE_COLLECT2) \
+ -c `echo $(srcdir)/toplev.c | sed 's,^\./,,'`
rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
flags.h insn-config.h insn-attr.h
final.o : final.c $(CONFIG_H) $(RTL_H) gvarargs.h flags.h regs.h \
recog.h conditions.h insn-config.h insn-attr.h real.h output.h \
- hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h
+ hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h
recog.o : recog.c $(CONFIG_H) $(RTL_H) \
regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \
insn-flags.h insn-codes.h real.h
# from the GNU Emacs distribution.
alloca.o: alloca.c
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(ALLOCA_FLAGS) \
- -Demacs `echo $(srcdir)/alloca.c | sed 's,^\./,,'`
+ -Demacs -c `echo $(srcdir)/alloca.c | sed 's,^\./,,'`
$(ALLOCA_FINISH)
\f
# Generate header and source files from the machine description,