OSDN Git Service

* init.c (expand_vec_init): Fix off-by-one error.
[pf3gnuchains/gcc-fork.git] / gcc / Makefile.in
index 9f24109..c407d28 100644 (file)
@@ -145,7 +145,7 @@ USER_H = $(srcdir)/ginclude/stdarg.h $(srcdir)/ginclude/stddef.h \
     $(srcdir)/ginclude/va-m32r.h $(srcdir)/ginclude/va-sh.h \
     $(srcdir)/ginclude/va-v850.h $(srcdir)/ginclude/va-arc.h \
     $(srcdir)/ginclude/iso646.h $(srcdir)/ginclude/va-ppc.h \
-    $(EXTRA_HEADERS) $(LANG_EXTRA_HEADERS) \
+    $(srcdir)/ginclude/va-c4x.h $(EXTRA_HEADERS) $(LANG_EXTRA_HEADERS) \
     $(srcdir)/ginclude/proto.h $(srcdir)/ginclude/stdbool.h
 
 # Target to use whe installing assert.h.  Some systems may
@@ -155,7 +155,7 @@ INSTALL_ASSERT_H = install-assert-h
 # The GCC to use for compiling libgcc2.a, enquire, and libgcc1-test.
 # Usually the one we just built.
 # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
-GCC_FOR_TARGET = ./xgcc -B./
+GCC_FOR_TARGET = ./xgcc -B./ -B$(build_tooldir)/bin/
 
 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
 # It omits XCFLAGS, and specifies -B./.
@@ -291,7 +291,9 @@ build_exeext = @build_exeext@
 mandir = @mandir@/man1
 # Directory in which to find other cross-compilation tools and headers.
 # Used in install-cross.
-tooldir = $(exec_prefix)/$(target_alias)
+tooldir = $(libsubdir)/$(unlibsubdir)/../$(target_alias)
+# Since tooldir does not exist at build-time, use -B$(build_tooldir)/bin/
+build_tooldir = $(exec_prefix)/$(target_alias)
 # Dir for temp files.
 tmpdir = /tmp
 
@@ -643,7 +645,7 @@ OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
  insn-peep.o reorg.o $(SCHED_PREFIX)sched.o final.o recog.o reg-stack.o \
  insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \
  profile.o insn-attrtab.o $(out_object_file) getpwd.o $(EXTRA_OBJS) convert.o \
- mbchar.o dyn-string.o
+ mbchar.o dyn-string.o splay-tree.o
 
 # GEN files are listed separately, so they can be built before doing parallel
 #  makes for cc1 or cc1plus.  Otherwise sequent parallel make attempts to load
@@ -859,8 +861,8 @@ specs: xgcc$(exeext)
 gcc-cross: xgcc$(exeext)
        cp xgcc$(exeext) gcc-cross$(exeext)
 
-cc1$(exeext): $(P) $(C_OBJS) $(OBJS) $(LIBDEPS)
-       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) $(OBJS) $(LIBS)
+cc1$(exeext): $(P) $(OBJS) $(C_OBJS) $(LIBDEPS)
+       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(C_OBJS) $(LIBS)
 
 # Copy float.h from its source.
 gfloat.h: $(FLOAT_H)
@@ -1317,6 +1319,13 @@ vfprintf.o: $(srcdir)/../libiberty/vfprintf.c $(CONFIG_H) system.h gansidecl.h
        $(LN_S) $(srcdir)/../libiberty/vfprintf.c vfprintf.c
        $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) vfprintf.c
 
+splay-tree.o: $(srcdir)/../libiberty/splay-tree.c \
+  $(srcdir)/../include/splay-tree.h $(srcdir)/../include/libiberty.h \
+  gansidecl.h
+       rm -f splay-tree.c
+       $(LN_S) $(srcdir)/../libiberty/splay-tree.c splay-tree.c
+       $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) splay-tree.c
+
 underscore.c: s-under ; @true
 
 s-under: $(GCC_PASSES)
@@ -1335,7 +1344,7 @@ s-under: $(GCC_PASSES)
 # A file used by all variants of C.
 
 c-common.o : c-common.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-lex.h \
-       flags.h toplev.h output.h
+       flags.h toplev.h output.h c-pragma.h $(RTL_H)
 
 # Language-independent files.
 
@@ -1361,7 +1370,7 @@ gencheck : gencheck.o tree.def $(lang_tree_files) $(HOST_LIBDEPS)
        $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
         gencheck.o $(HOST_LIBS)
 
-gencheck.o : gencheck.c hconfig.h system.h
+gencheck.o : gencheck.c hconfig.h system.h gansidecl.h
        $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencheck.c
 
 dumpvers: dumpvers.c
@@ -1475,7 +1484,7 @@ loop.o : loop.c $(CONFIG_H) system.h $(RTL_H) flags.h loop.h insn-config.h \
 unroll.o : unroll.c $(CONFIG_H) system.h $(RTL_H) insn-config.h \
    integrate.h $(REGS_H) $(RECOG_H) flags.h $(EXPR_H) loop.h toplev.h
 flow.o : flow.c $(CONFIG_H) system.h $(RTL_H) flags.h insn-config.h \
-   $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h
+   $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h recog.h
 combine.o : combine.c $(CONFIG_H) system.h $(RTL_H) flags.h  \
    insn-config.h insn-flags.h insn-codes.h insn-attr.h $(REGS_H) $(EXPR_H) \
    $(BASIC_BLOCK_H) $(RECOG_H) real.h hard-reg-set.h toplev.h
@@ -1509,15 +1518,15 @@ regmove.o : regmove.c $(CONFIG_H) system.h $(RTL_H) insn-config.h \
    $(RECOG_H) output.h reload.h $(REGS_H) hard-reg-set.h flags.h \
    $(EXPR_H) insn-flags.h $(BASIC_BLOCK_H) toplev.h
 $(SCHED_PREFIX)sched.o : $(SCHED_PREFIX)sched.c $(CONFIG_H) system.h $(RTL_H) \
-   $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h insn-attr.h \
-   toplev.h
+   $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h \
+   insn-attr.h toplev.h recog.h
 final.o : final.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h $(REGS_H) \
    $(RECOG_H) conditions.h insn-config.h insn-attr.h except.h real.h output.h \
    hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h \
    toplev.h reload.h dwarfout.h dwarf2out.h sdbout.h dbxout.h
 recog.o : recog.c $(CONFIG_H) system.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
+   insn-flags.h insn-codes.h real.h toplev.h
 reg-stack.o : reg-stack.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) \
    $(REGS_H) hard-reg-set.h flags.h insn-config.h insn-flags.h toplev.h
 dyn-string.o: dyn-string.c dyn-string.h $(CONFIG_H) system.h gansidecl.h
@@ -1596,7 +1605,7 @@ s-codes : $(md_file) gencodes $(srcdir)/move-if-change
        touch s-codes
 
 insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) $(EXPR_H) real.h output.h \
-  insn-config.h insn-flags.h insn-codes.h system.h reload.h
+  insn-config.h insn-flags.h insn-codes.h system.h reload.h recog.h
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c
 
 insn-emit.c: s-emit ; @true
@@ -1625,7 +1634,8 @@ s-opinit : $(md_file) genopinit $(srcdir)/move-if-change
        $(srcdir)/move-if-change tmp-opinit.c insn-opinit.c
        touch s-opinit
 
-insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H) system.h toplev.h
+insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H) system.h toplev.h \
+  insn-config.h recog.h
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-extract.c
 
 insn-extract.c: s-extract ; @true
@@ -1634,7 +1644,8 @@ s-extract : $(md_file) genextract $(srcdir)/move-if-change
        $(srcdir)/move-if-change tmp-extract.c insn-extract.c
        touch s-extract
 
-insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) $(REGS_H) output.h real.h system.h
+insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) $(REGS_H) output.h real.h \
+       system.h insn-config.h recog.h
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-peep.c
 
 insn-peep.c: s-peep ; @true
@@ -1864,17 +1875,21 @@ cccp.o: cccp.c $(CONFIG_H) pcp.h version.c config.status system.h gansidecl.h \
            mbchar.h
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
          -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
-         -DGPLUSPLUS_INCLUDE_DIR=\"$(libsubdir)/$(unlibsubdir)/..`echo $(exec_prefix) | sed -e 's|^$(prefix)||' -e 's|/[^/]*|/..|g'`/include/g++\" \
-         -DLOCAL_INCLUDE_DIR=\"$(libsubdir)/$(unlibsubdir)/..`echo $(exec_prefix) | sed -e 's|^$(prefix)||' -e 's|/[^/]*|/..|g'`/include\" \
-         -DCROSS_INCLUDE_DIR=\"$(libsubdir)/$(unlibsubdir)/../$(target_alias)/sys-include\" \
-         -DTOOL_INCLUDE_DIR=\"$(libsubdir)/$(unlibsubdir)/../$(target_alias)/include\" \
+         -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
+         -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
+         -DCROSS_INCLUDE_DIR=\"$(tooldir)/sys-include\" \
+         -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
          -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
 
-cppmain$(exeext): cppmain.o cpplib.o cpphash.o cppalloc.o cpperror.o cppexp.o \
-  prefix.o version.o mbchar.o @extra_cpp_objs@ $(LIBDEPS)
-       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cppmain.o cpplib.o cpphash.o \
-         mbchar.o @extra_cpp_objs@ \
-         cppalloc.o cpperror.o cppexp.o prefix.o version.o $(LIBS)
+LIBCPP_OBJS =  cpplib.o cpphash.o cppalloc.o cpperror.o cppexp.o cppfiles.o \
+               cppulp.o prefix.o version.o mbchar.o @extra_cpp_objs@
+
+libcpp.a: $(LIBCPP_OBJS)
+       $(AR) $(ARFLAGS) libcpp.a $(LIBCPP_OBJS)
+
+cppmain$(exeext): cppmain.o libcpp.a $(LIBDEPS)
+       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cppmain$(exeext) cppmain.o \
+       libcpp.a $(LIBS)
 
 cppmain.o: cppmain.c $(CONFIG_H) cpplib.h system.h gansidecl.h
 
@@ -1892,6 +1907,8 @@ cpperror.o: cpperror.c $(CONFIG_H) cpplib.h system.h gansidecl.h
 
 cppexp.o: cppexp.c $(CONFIG_H) cpplib.h system.h gansidecl.h
 
+cppfiles.o: cppfiles.c $(CONFIG_H) cpplib.h system.h gansidecl.h
+
 cpphash.o: cpphash.c cpplib.h cpphash.h $(CONFIG_H) system.h gansidecl.h
 
 cppalloc.o: cppalloc.c $(CONFIG_H) cpplib.h system.h gansidecl.h
@@ -1917,7 +1934,7 @@ protoize.o: protoize.c $(srcdir)/../include/getopt.h $(CONFIG_H) system.h
        $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
           -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
          -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
-         -DCROSS_INCLUDE_DIR=\"$(libsubdir)/$(unlibsubdir)/../$(target_alias)/sys-include\" \
+         -DCROSS_INCLUDE_DIR=\"$(tooldir)/sys-include\" \
          -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
          -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
          -DSTD_PROTO_DIR=\"$(libsubdir)\" \
@@ -1927,7 +1944,7 @@ unprotoize.o: unprotoize.c protoize.c $(srcdir)/../include/getopt.h $(CONFIG_H)
        $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
           -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
          -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
-         -DCROSS_INCLUDE_DIR=\"$(libsubdir)/$(unlibsubdir)/../$(target_alias)/sys-include\" \
+         -DCROSS_INCLUDE_DIR=\"$(tooldir)/sys-include\" \
          -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
          -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
          -DSTD_PROTO_DIR=\"$(libsubdir)\" \
@@ -2043,9 +2060,12 @@ stmp-fixinc: $(FIXINCLUDES) gsyslimits.h
              $(SHELL) $(srcdir)/$(FIXINCLUDES) include $$dir; \
            else true; fi; \
          done; \
-         rm -f include/assert.h; \
-         cp $(srcdir)/assert.h include/assert.h; \
-         chmod a+r include/assert.h; \
+         if [ x$(INSTALL_ASSERT_H) != x ] ; \
+         then \
+           rm -f include/assert.h; \
+           cp $(srcdir)/assert.h include/assert.h; \
+           chmod a+r include/assert.h; \
+         fi \
        else true; \
        fi
        rm -f include/syslimits.h
@@ -2103,10 +2123,9 @@ xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h gen-protos Makefil
        rm -rf fixtmp.c
 
 fix-header: fix-header.o scan-decls.o scan.o xsys-protos.h $(HOST_LIBDEPS) \
-   cpplib.o cpphash.o cppalloc.o cppexp.o prefix.o version.o
+           libcpp.a
        $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ fix-header.o \
-          scan-decls.o scan.o cpplib.o cpphash.o cppalloc.o prefix.o \
-          version.o cppexp.o $(HOST_LIBS)
+          scan-decls.o scan.o libcpp.a $(HOST_LIBS)
 
 fix-header.o: fix-header.c $(srcdir)/../include/obstack.h scan.h \
        xsys-protos.h $(build_xm_file) system.h cpplib.h cpphash.h
@@ -2690,7 +2709,7 @@ tmp-gcc.xtar: distdir
        tar -chf tmp-gcc.xtar gcc-$(version)
 
 distdir-cvs: force
-       if [ -d $(srcdir)/CVS ]; then cvs -r update; fi
+       if [ -d $(srcdir)/CVS ]; then cd $(srcdir) && cvs -r update; fi
 
 # This target exists to do the initial work before the language specific
 # stuff gets done.
@@ -2705,7 +2724,7 @@ distdir-start: doc $(srcdir)/INSTALL $(srcdir)/c-parse.y $(srcdir)/c-gperf.h \
        awk '$$1 " " $$2 " " $$3 == "This directory contains" \
                { $$6 = version; print $$0 } \
             $$1 " " $$2 " " $$3 != "This directory contains"' \
-         version=$(version) README > tmp.README
+         version=$(version) $(srcdir)/README > tmp.README
        mv tmp.README README
        -rm -rf gcc-$(version) tmp      
 # Put all the files in a temporary subdirectory
@@ -2713,31 +2732,33 @@ distdir-start: doc $(srcdir)/INSTALL $(srcdir)/c-parse.y $(srcdir)/c-gperf.h \
        mkdir tmp
        mkdir tmp/config
        mkdir tmp/ginclude
-       for file in *[0-9a-zA-Z+]; do \
-         $(LN) $$file tmp; \
+       mkdir tmp/objc
+       for file in `(cd $(srcdir) && echo *[0-9a-zA-Z+])`; do \
+         test -f $(srcdir)/$$file && $(LN_S) $(srcdir)/$$file tmp; \
        done
-       cd config; \
-       for file in *[0-9a-zA-Z+]; do \
-         if test -d $$file && test "$$file" != RCS && test "$$file" != CVS; then \
-           mkdir ../tmp/config/$$file; \
-           cd $$file; \
-           for subfile in *[0-9a-zA-Z+]; do \
-             $(LN) $$subfile ../../tmp/config/$$file; \
+       if test "$(srcdir)" != "." ; then \
+         for file in c-parse.c cexp.c ; do \
+           test -f ./$$file && $(LN_S) ../$$file tmp; \
+         done; \
+       fi
+       for file in `(cd $(srcdir)/config && echo *[0-9a-zA-Z+])`; do \
+         if test -d $(srcdir)/config/$$file \
+             && test "$$file" != RCS && test "$$file" != CVS; then \
+           mkdir tmp/config/$$file; \
+           for subfile in `(cd $(srcdir)/config/$$file && echo *[0-9a-zA-Z+])`; do \
+             $(LN_S) $(srcdir)/config/$$file/$$subfile tmp/config/$$file; \
            done; \
-           cd ..; \
          else \
-           $(LN) $$file ../tmp/config; \
+           $(LN_S) $(srcdir)/config/$$file tmp/config; \
          fi; \
        done
-       cd ginclude; \
-       for file in *[0-9a-zA-Z+]; do \
-         $(LN) $$file ../tmp/ginclude; \
+       for file in `(cd $(srcdir)/ginclude && echo *[0-9a-zA-Z+])`; do \
+         $(LN_S) $(srcdir)/ginclude/$$file tmp/ginclude; \
        done
-       cd objc; \
-       for file in *[0-9a-zA-Z+]; do \
-         $(LN) $$file ../tmp/objc; \
+       for file in `(cd $(srcdir)/objc && echo *[0-9a-zA-Z+])`; do \
+         $(LN_S) $(srcdir)/objc/$$file tmp/objc; \
        done
-       $(LN) .gdbinit tmp
+       $(LN_S) .gdbinit tmp
 
 # Finish making `distdir', after the languages have done their thing.
 distdir-finish:
@@ -2772,22 +2793,22 @@ bootstrap bootstrap-lean: force
 # To prevent `make install' from compiling alloca.o and then relinking cc1
 # because alloca.o is newer, we permit these recursive makes to compile
 # alloca.o.  Then cc1 is newer, so it won't have to be relinked.
-       $(MAKE) CC="stage1/xgcc$(exeext) -Bstage1/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
+       $(MAKE) CC="stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
        $(MAKE) stage2
        -if test $@ = bootstrap-lean; then rm -rf stage1; else true; fi
-       $(MAKE) CC="stage2/xgcc$(exeext) -Bstage2/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
+       $(MAKE) CC="stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
 
 bootstrap2 bootstrap2-lean: force
-       $(MAKE) CC="stage1/xgcc$(exeext) -Bstage1/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
+       $(MAKE) CC="stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
        $(MAKE) stage2
        -if test $@ = bootstrap2-lean; then rm -rf stage1; else true; fi
-       $(MAKE) CC="stage2/xgcc$(exeext) -Bstage2/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
+       $(MAKE) CC="stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
 
 bootstrap3 bootstrap3-lean: force
-       $(MAKE) CC="stage2/xgcc$(exeext) -Bstage2/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
+       $(MAKE) CC="stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
 
 bootstrap4 bootstrap4-lean: force
-       $(MAKE) CC="stage3/xgcc$(exeext) -Bstage3/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage3/ LANGUAGES="$(LANGUAGES)"
+       $(MAKE) CC="stage3/xgcc$(exeext) -Bstage3/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage3/ LANGUAGES="$(LANGUAGES)"
 
 # Compare the object files in the current directory with those in the
 # stage2 directory.