1 # Makefile for GNU C compiler.
2 # Copyright (C) 1987, 88, 90-96, 1997 Free Software Foundation, Inc.
4 #This file is part of GNU CC.
6 #GNU CC is free software; you can redistribute it and/or modify
7 #it under the terms of the GNU General Public License as published by
8 #the Free Software Foundation; either version 2, or (at your option)
11 #GNU CC is distributed in the hope that it will be useful,
12 #but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 #GNU General Public License for more details.
16 #You should have received a copy of the GNU General Public License
17 #along with GNU CC; see the file COPYING. If not, write to
18 #the Free Software Foundation, 59 Temple Place - Suite 330,
19 #Boston MA 02111-1307, USA.
21 # The targets for external use include:
22 # all, doc, proto, install, install-cross, install-cross-rest,
23 # uninstall, TAGS, mostlyclean, clean, distclean, maintainer-clean,
24 # stage1, stage2, stage3, stage4.
26 # Suppress smart makes who think they know how to automake Yacc files
29 # Directory where sources are, from where we are.
33 # Variables that exist for you to override.
34 # See below for how to change them for certain systems.
36 # List of language subdirectories.
37 # This is overridden by configure.
40 # Selection of languages to be made.
41 # This is overridden by configure.
42 LANGUAGES = c proto gcov @all_languages@
44 # Selection of languages to be made during stage1 build.
45 # This is overridden by configure.
46 BOOT_LANGUAGES = c @all_boot_languages@
52 # Various ways of specifying flags for compilations:
53 # CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
54 # BOOT_CFLAGS is the value of CFLAGS to pass
55 # to the stage2 and stage3 compilations
56 # XCFLAGS is used for most compilations but not when using the GCC just built.
57 # TCFLAGS is used for compilations with the GCC just built.
61 BOOT_CFLAGS = -O2 $(CFLAGS)
62 # These exists to be overridden by the x-* and t-* files, respectively.
78 # on sysV, define this as cp.
80 # Some systems may be missing symbolic links, regular links, or both.
81 # Allow configure to check this and use "ln -s", "ln", or "cp" as appropriate.
84 # These permit overriding just for certain files.
85 INSTALL_PROGRAM = @INSTALL_PROGRAM@
86 INSTALL_DATA = @INSTALL_DATA@
90 # For GNUmake: let us decide what gets passed to recursive makes.
94 # Define this as & to perform parallel make on a Sequent.
95 # Note that this has some bugs, and it seems currently necessary
96 # to compile all the gen* files first by hand to avoid erroneous results.
99 # How to invoke ranlib.
101 # Test to use to see whether ranlib exists on the system.
102 RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
104 # Compiler to use for compiling libgcc1.a.
105 # OLDCC should not be the GNU C compiler,
106 # since that would compile typical libgcc1.a functions such as mulsi3
107 # into infinite recursions.
110 # CFLAGS for use with OLDCC, for compiling libgcc1.a.
111 # NOTE: -O does not work on some Unix systems!
114 # Version of ar to use when compiling libgcc1.a.
118 # Target to use when installing include directory. Either
119 # install-headers-tar or install-headers-cpio.
120 INSTALL_HEADERS_DIR = @build_install_headers_dir@
122 # Header files that are made available under the same name
123 # to programs compiled with GCC.
124 USER_H = $(srcdir)/ginclude/stdarg.h $(srcdir)/ginclude/stddef.h \
125 $(srcdir)/ginclude/varargs.h $(srcdir)/ginclude/va-alpha.h \
126 $(srcdir)/ginclude/va-h8300.h $(srcdir)/ginclude/va-i860.h \
127 $(srcdir)/ginclude/va-i960.h $(srcdir)/ginclude/va-mips.h \
128 $(srcdir)/ginclude/va-m88k.h $(srcdir)/ginclude/va-mn10200.h \
129 $(srcdir)/ginclude/va-mn10300.h $(srcdir)/ginclude/va-pa.h \
130 $(srcdir)/ginclude/va-pyr.h $(srcdir)/ginclude/va-sparc.h \
131 $(srcdir)/ginclude/va-clipper.h $(srcdir)/ginclude/va-spur.h \
132 $(srcdir)/ginclude/va-m32r.h $(srcdir)/ginclude/va-sh.h \
133 $(srcdir)/ginclude/va-v850.h $(srcdir)/ginclude/va-arc.h \
134 $(srcdir)/ginclude/iso646.h $(srcdir)/ginclude/va-ppc.h \
135 $(srcdir)/ginclude/proto.h $(EXTRA_HEADERS) \
136 $(LANG_EXTRA_HEADERS)
138 # Target to use whe installing assert.h. Some systems may
139 # want to set this empty.
140 INSTALL_ASSERT_H = install-assert-h
142 # The GCC to use for compiling libgcc2.a, enquire, and libgcc1-test.
143 # Usually the one we just built.
144 # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
145 GCC_FOR_TARGET = ./xgcc -B./
147 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
148 # It omits XCFLAGS, and specifies -B./.
149 # It also specifies -I./include to find, e.g., stddef.h.
150 GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) -I./include $(TCFLAGS)
152 # Special flags for compiling enquire.
153 # We disable optimization to make floating point more reliable.
154 ENQUIRE_CFLAGS = -DNO_MEM -DNO_LONG_DOUBLE_IO -O0
155 ENQUIRE_LDFLAGS = $(LDFLAGS)
157 # Sed command to transform gcc to installed name. Overwritten by configure.
158 program_transform_name = @program_transform_name@
159 program_transform_cross_name = -e s,^,$(target_alias)-,
161 # Tools to use when building a cross-compiler.
162 # These are used because `configure' appends `cross-make'
163 # to the makefile when making a cross-compiler.
165 TARGET_TOOLPREFIX = $(tooldir)/bin/
166 AR_FOR_TARGET = $(TARGET_TOOLPREFIX)ar
167 AR_FOR_TARGET_FLAGS = rc
168 RANLIB_FOR_TARGET = $(TARGET_TOOLPREFIX)ranlib
169 RANLIB_TEST_FOR_TARGET = [ -f $(TARGET_TOOLPREFIX)ranlib ]
171 # Dir to search for system headers. Overridden by cross-make.
172 SYSTEM_HEADER_DIR = /usr/include
174 # Control whether to run fixproto.
175 STMP_FIXPROTO = stmp-fixproto
177 # Test to see whether <limits.h> exists in the system header files.
178 LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ]
180 # There may be a premade insn-attrtab.c for this machine.
181 # (You could rebuild it with genattrtab as usual, but it takes a long time.)
182 # PREMADE_ATTRTAB is the file name of the file to use.
183 # PREMADE_ATTRTAB_MD is the md file it corresponds to.
184 PREMADE_ATTRTAB_MD = Makefile # Guaranteed not to cmp equal to md.
188 target_alias=@target_alias@
189 xmake_file=@dep_host_xmake_file@
190 tmake_file=@dep_tmake_file@
191 out_file=$(srcdir)/config/@out_file@
192 out_object_file=@out_object_file@
193 md_file=$(srcdir)/config/@md_file@
194 tm_file=@tm_file_list@
195 build_xm_file=@build_xm_file_list@
196 host_xm_file=@host_xm_file_list@
197 lang_specs_files=@lang_specs_files@
198 lang_options_files=@lang_options_files@
199 GCC_THREAD_FILE=@thread_file@
201 mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
203 # Common prefix for installation directories.
204 # NOTE: This directory must exist when you start installation.
206 # Directory in which to put localized header files. On the systems with
207 # gcc as the native cc, `local_prefix' may not be `prefix' which is
209 # NOTE: local_prefix *should not* default from prefix.
210 local_prefix = @local_prefix@
211 # Directory in which to put host dependent programs and libraries
212 exec_prefix = @exec_prefix@
213 # Directory in which to put the executable for the command `gcc'
215 # Directory in which to put the directories used by the compiler.
217 # Directory in which the compiler finds executables, libraries, etc.
218 libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(version)
219 # Directory in which the compiler finds g++ includes.
220 gxx_include_dir= @gxx_include_dir@
221 # Directory in which the old g++ header files may be found.
222 old_gxx_include_dir= $(libdir)/g++-include
223 # Directory to search for site-specific includes.
224 includedir = $(local_prefix)/include
225 # assertdir is overridden in cross-make.
226 # (But this currently agrees with what is in cross-make.)
227 assertdir = $(tooldir)/include
228 # where the info files go
230 # Extension (if any) to put in installed man-page filename.
233 exeext = @build_exeext@
235 # Directory in which to put man pages.
236 mandir = @mandir@/man1
237 # Directory in which to find other cross-compilation tools and headers.
238 # Used in install-cross.
239 tooldir = $(exec_prefix)/$(target_alias)
240 # Dir for temp files.
243 # Additional system libraries to link with.
246 # Change this to a null string if obstacks are installed in the
250 # Specify the rule for actually making libgcc.a,
252 # and the rule for installing it.
253 INSTALL_LIBGCC = install-libgcc
255 # Specify the rule for actually making libgcc1.a.
256 # The value may be empty; that means to do absolutely nothing
257 # with or for libgcc1.a.
260 # Specify the rule for making libgcc1.a for a cross-compiler.
261 # The default rule assumes that libgcc1.a is supplied by the user.
262 CROSS_LIBGCC1 = libgcc1.cross
264 # Specify the rule for actually making libgcc2.a.
267 # Options to use when compiling libgcc2.a.
268 # -g1 causes output of debug info only for file-scope entities.
269 # we use this here because that should be enough, and also
270 # so that -g1 will be tested.
271 LIBGCC2_DEBUG_CFLAGS = -g1
272 LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED \
275 # Additional options to use when compiling libgcc2.a.
276 # Some targets override this to -Iinclude
279 # Additional target-dependent options for compiling libgcc2.a.
280 TARGET_LIBGCC2_CFLAGS =
282 # Things which must be built before building libgcc2.a.
283 # Some targets override this to stmp-int-hdrs
286 # Enquire target (This is a variable so that a target can choose not to
290 # libgcc1-test target (must also be overridable for a target)
291 LIBGCC1_TEST = libgcc1-test
293 # List of extra executables that should be compiled for this target machine
294 # that are used for compiling from source code to object code.
295 # The rules for compiling them should be in the t-* file for the machine.
296 EXTRA_PASSES =@extra_passes@
298 # Like EXTRA_PASSES, but these are used when linking.
299 EXTRA_PROGRAMS = @extra_programs@
301 # List of extra object files that should be compiled for this target machine.
302 # The rules for compiling them should be in the t-* file for the machine.
303 EXTRA_PARTS = @extra_parts@
305 # List of extra object files that should be compiled and linked with
306 # compiler proper (cc1, cc1obj, cc1plus).
307 EXTRA_OBJS = @extra_objs@
309 # List of extra object files that should be compiled and linked with
311 EXTRA_GCC_OBJS =@host_extra_gcc_objs@
313 # List of additional header files to install.
314 # Often this is edited directly by `configure'.
315 EXTRA_HEADERS =@extra_headers_list@
317 # Set this to `ld' to enable use of collect2.
318 USE_COLLECT2 = @will_use_collect2@
319 MAYBE_USE_COLLECT2 = @maybe_use_collect2@
320 # It is convenient for configure to add the assignment at the beginning,
321 # so don't override it here.
324 # List of extra C and assembler files to add to libgcc1.a.
325 # Assembler files should have names ending in `.asm'.
328 # List of extra C and assembler files to add to libgcc2.a.
329 # Assembler files should have names ending in `.asm'.
332 # Default float.h source to use for cross-compiler.
333 # This is overidden by configure.
334 CROSS_FLOAT_H=$(srcdir)/config/float-@float_format@.h
336 # Program to convert libraries.
339 # Control whether header files are installed.
340 INSTALL_HEADERS=install-headers
342 # Options for tar when copying trees. So HPUX can override it.
345 # Select which version of fixincludes to use (I.E. regular versus SVR4)
346 # This value is overridden directly by configure.
347 FIXINCLUDES = @fixincludes@
349 # Additional directories of header files to run fixincludes on.
350 # These should be directories searched automatically by default
351 # just as /usr/include is.
352 # *Do not* use this for directories that happen to contain
353 # header files, but are not searched automatically by default.
354 # On most systems, this is empty.
355 OTHER_FIXINCLUDES_DIRS=
357 # A list of all the language-specific executables.
358 # This is overridden by configure.
359 COMPILERS = cc1$(exeext) @all_compilers@
361 # List of things which should already be built whenever we try to use xgcc
362 # to compile anything (without linking).
363 GCC_PASSES=xgcc cc1 cpp $(EXTRA_PASSES)
365 # List of things which should already be built whenever we try to use xgcc
367 GCC_PARTS=$(GCC_PASSES) $(LIBGCC) $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS)
369 # Directory to link to, when using the target `maketest'.
372 # Guaranteed to not exist when not passing md through cpp.
373 # This value is overridden directly by configure.
374 MD_FILE = md-cpp-not-used
376 # Flags to use when cross-building GCC.
377 # Prefix to apply to names of object files when using them
378 # to run on the machine we are compiling on.
380 # Prefix to apply to names of object files when compiling them
381 # to run on the machine we are compiling on.
382 # The default for this variable is chosen to keep these rules
383 # out of the way of the other rules for compiling the same source files.
386 HOST_CFLAGS=$(ALL_CFLAGS)
388 HOST_LDFLAGS=$(LDFLAGS)
389 HOST_CPPFLAGS=$(ALL_CPPFLAGS)
390 HOST_ALLOCA=$(ALLOCA)
391 HOST_MALLOC=$(MALLOC)
392 HOST_OBSTACK=$(OBSTACK)
394 # Actual name to use when installing a native compiler.
395 GCC_INSTALL_NAME = `t='$(program_transform_name)'; echo gcc | sed $$t`
397 # Actual name to use when installing a cross-compiler.
398 GCC_CROSS_NAME = `t='$(program_transform_cross_name)'; echo gcc | sed $$t`
400 # Choose the real default target.
403 # Choose the real install target.
404 INSTALL_TARGET=install-normal
406 # Source for float.h. Overridden by cross-make.
409 # Setup the testing framework, if you have one
410 EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
411 echo $${rootme}/../expect/expect ; \
412 else echo expect ; fi`
414 RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
415 echo $${srcdir}/../dejagnu/runtest ; \
416 else echo runtest; fi`
419 # Extra symbols for fixproto to define when parsing headers.
422 # Extra flags to use when compiling crt{begin,end}.o.
425 # Extra flags to use when compiling [m]crt0.o.
428 # End of variables for you to override.
430 # Definition of `all' is here so that new rules inserted by sed
431 # do not specify the default target.
432 # The real definition is under `all.internal' (for native compilers)
433 # or `all.cross' (for cross compilers).
436 # This tells GNU Make version 3 not to put all variables in the environment.
439 # sed inserts variable overrides after the following line.
453 # Now figure out from those variables how to compile and link.
457 # IN_GCC tells obstack.h that we are using gcc's <stddef.h> file.
458 # ??? IN_GCC should be obsolete now.
459 INTERNAL_CFLAGS = $(CROSS) -DIN_GCC @extra_c_flags@
461 # This is the variable actually used when we compile.
462 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS) \
463 @DEFS@ $(SCHED_CFLAGS)
466 ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
468 # Even if ALLOCA is set, don't use it if compiling with GCC.
469 USE_ALLOCA= ` case "${CC}" in "${OLDCC}") echo "${ALLOCA}" ;; esac `
470 USE_HOST_ALLOCA= ` case "${HOST_CC}"@"${HOST_ALLOCA}" in "${OLDCC}"@?*) echo ${HOST_PREFIX}${HOST_ALLOCA} ;; esac `
471 USE_HOST_MALLOC= ` case "${HOST_MALLOC}" in ?*) echo ${HOST_PREFIX}${HOST_MALLOC} ;; esac `
472 USE_HOST_OBSTACK= ` case "${HOST_OBSTACK}" in ?*) echo ${HOST_PREFIX}${HOST_OBSTACK} ;; esac `
474 # Dependency on obstack, alloca, malloc or whatever library facilities
475 # are not installed in the system libraries.
476 # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
477 LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC)
479 # Likewise, for use in the tools that must run on this machine
480 # even if we are cross-building GCC.
481 # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
482 HOST_LIBDEPS= $(HOST_PREFIX)$(HOST_OBSTACK) $(HOST_PREFIX)$(HOST_ALLOCA) $(HOST_PREFIX)$(HOST_MALLOC)
484 # How to link with both our special library facilities
485 # and the system's installed libraries.
486 LIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC) $(CLIB)
488 # Likewise, for use in the tools that must run on this machine
489 # even if we are cross-building GCC.
490 HOST_LIBS = $(USE_HOST_OBSTACK) $(USE_HOST_ALLOCA) $(USE_HOST_MALLOC) \
493 HOST_RTL = $(HOST_PREFIX)rtl.o
494 HOST_RTLANAL = $(HOST_PREFIX)rtlanal.o
495 HOST_PRINT = $(HOST_PREFIX)print-rtl.o
497 # Specify the directories to be searched for header files.
498 # Both . and srcdir are used, in that order,
499 # so that tm.h and config.h will be found in the compilation
500 # subdirectory rather than in the source directory.
501 INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config
503 # Always use -I$(srcdir)/config when compiling.
505 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
507 # This tells GNU make version 3 not to export all the variables
508 # defined in this file into the environment.
511 # Support for additional languages (other than c and objc).
512 # ??? objc can be supported this way too (leave for later).
514 # These next lines are overridden by configure.
515 LANG_MAKEFILES = @all_lang_makefiles@
516 LANG_STAGESTUFF = @all_stagestuff@
517 LANG_DIFF_EXCLUDES = @all_diff_excludes@
518 LANG_LIB2FUNCS = @all_lib2funcs@
519 LANG_EXTRA_HEADERS = @all_headers@
521 # Flags to pass to recursive makes.
522 # CC is set by configure. Hosts without symlinks need special handling
523 # because we need CC="stage1/xgcc -Bstage1/" to work in the language
525 # ??? The choices here will need some experimenting with.
527 "AR_FLAGS=$(AR_FLAGS)" \
528 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
530 "BISONFLAGS=$(BISONFLAGS)" \
531 "CC=@cc_set_by_configure@" \
534 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
535 "LDFLAGS=$(LDFLAGS)" \
537 "LEXFLAGS=$(LEXFLAGS)" \
540 "MAKEINFO=$(MAKEINFO)" \
541 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
542 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
543 "RANLIB_TEST_FOR_TARGET=$(RANLIB_TEST_FOR_TARGET)" \
545 "STAGE_PREFIX=@stage_prefix_set_by_configure@" \
548 "exec_prefix=$(exec_prefix)" \
550 "tooldir=$(tooldir)" \
552 "libsubdir=$(libsubdir)"
554 # Lists of files for various purposes.
556 # Language-specific object files for C and Objective C.
557 C_AND_OBJC_OBJS = c-lex.o c-pragma.o c-decl.o c-typeck.o c-convert.o \
558 c-aux-info.o c-common.o c-iterate.o @extra_c_objs@
560 # Language-specific object files for C.
561 C_OBJS = c-parse.o c-lang.o $(C_AND_OBJC_OBJS)
563 # Files specific to the C interpreter bytecode compiler(s).
564 BC_OBJS = bc-emit.o bc-optab.o
566 # Bytecode header files constructed at build time; vmsconfig.com wants this.
567 BC_ALL = bc-arity.h bc-opcode.h bc-opname.h
569 SCHED_PREFIX = @sched_prefix@
570 SCHED_CFLAGS = @sched_cflags@
572 # Language-independent object files.
573 OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
574 function.o stmt.o except.o expr.o calls.o expmed.o explow.o optabs.o \
575 varasm.o rtl.o print-rtl.o rtlanal.o emit-rtl.o real.o regmove.o \
576 dbxout.o sdbout.o dwarfout.o dwarf2out.o xcoffout.o bitmap.o alias.o \
577 integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \
578 regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o \
579 insn-peep.o reorg.o $(SCHED_PREFIX)sched.o final.o recog.o reg-stack.o \
580 insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \
581 profile.o insn-attrtab.o $(out_object_file) getpwd.o convert.o $(EXTRA_OBJS)
583 # GEN files are listed separately, so they can be built before doing parallel
584 # makes for cc1 or cc1plus. Otherwise sequent parallel make attempts to load
585 # them before rtl.o is compiled.
586 GEN= genemit genoutput genrecog genextract genflags gencodes genconfig genpeep
589 # Uncomment this line if you want to use cppmain (w/cpplib) as cpp.
592 # Files to be copied away after each stage in building.
593 STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \
594 insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
595 insn-attr.h insn-attrtab.c insn-opinit.c \
596 stamp-flags stamp-config stamp-codes stamp-mlib \
597 stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \
598 stamp-attr stamp-attrtab stamp-opinit stamp-proto stamp-crt stamp-crtS stamp-crt0 \
599 genemit$(exeext) genoutput$(exeext) genrecog$(exeext) genextract$(exeext) \
600 genflags$(exeext) gencodes$(exeext) genconfig$(exeext) genpeep$(exeext) \
601 genattrtab$(exeext) genattr$(exeext) genopinit$(exeext) \
603 stamp-bcarity stamp-bcopcode stamp-bcopname \
604 bi-arity$(exeext) bi-opcode$(exeext) bi-opname$(exeext) \
605 xgcc$(exeext) cc1$(exeext) cpp$(exeext) $(EXTRA_PASSES) \
606 $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) \
607 $(CCCP)$(exeext) cc1obj$(exeext) enquire$(exeext) \
608 protoize$(exeext) unprotoize$(exeext) \
609 specs collect2$(exeext) $(USE_COLLECT2) underscore.c \
611 *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop \
612 *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack \
616 # Members of libgcc1.a.
617 LIB1FUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
618 _lshrsi3 _ashrsi3 _ashlsi3 \
619 _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \
620 _fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \
621 _addsf3 _negsf2 _subsf3 _mulsf3 _divsf3 \
622 _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
623 _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2
625 # Library members defined in libgcc2.c.
626 LIB2FUNCS = _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
627 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 \
628 _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \
629 _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
630 _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \
631 _fixtfdi _fixunstfdi _floatditf \
632 __gcc_bcmp _varargs __dummy _eprintf _op_new _op_vnew _new_handler \
633 _op_delete _op_vdel _bb _shtab _clear_cache _trampoline __main _exit \
636 # The files that "belong" in CONFIG_H are deliberately omitted
637 # because having them there would not be useful in actual practice.
638 # All they would do is cause complete recompilation every time
639 # one of the machine description files is edited.
640 # That may or may not be what one wants to do.
641 # If it is, rm *.o is an easy way to do it.
642 # CONFIG_H = $(host_xm_file) $(tm_file)
644 RTL_H = rtl.h rtl.def machmode.h machmode.def
645 TREE_H = tree.h real.h tree.def machmode.h machmode.def
646 BYTECODE_H = bytecode.h bc-emit.h bc-optab.h
647 BASIC_BLOCK_H = basic-block.h bitmap.h
649 # "t" or nothing, for building multilibbed versions of, say, crtbegin.o.
652 # Language makefile fragments.
654 # The following targets define the interface between us and the languages.
656 # all.build, all.cross, start.encap, rest.encap,
658 # install-normal, install-common, install-info, install-man,
659 # uninstall, distdir,
660 # mostlyclean, clean, distclean, extraclean, maintainer-clean,
661 # stage1, stage2, stage3, stage4
663 # Each language is linked in with a series of hooks (since we can't use `::'
664 # targets). The name of each hooked is "lang.${target_name}" (eg: lang.info).
665 # Configure computes and adds these here.
670 # sed inserts language fragments after the following line.
671 ####language fragments
674 # End of language makefile fragments.
676 # Avoid a lot of time thinking about remaking Makefile.in and *.def.
679 Makefile: $(srcdir)/Makefile.in config.status $(srcdir)/version.c \
680 $(xmake_file) $(tmake_file) $(LANG_MAKEFILES)
681 $(SHELL) $(srcdir)/configure.frag $(srcdir) "$(SUBDIRS)" \
682 "$(xmake_file)" "$(tmake_file)"
683 cp config.status config.run
687 $(srcdir)/configure: $(srcdir)/configure.in
688 cd $(srcdir); autoconf
690 # cstamp-h.in controls rebuilding of config.in.
691 # It is named cstamp-h.in and not stamp-h.in so the mostlyclean rule doesn't
692 # delete it. A stamp file is needed as autoheader won't update the file if
693 # nothing has changed.
694 # It remains in the source directory and is part of the distribution.
695 # This follows what is done in shellutils, fileutils, etc.
696 # "echo timestamp" is used instead of touch to be consistent with other
697 # packages that use autoconf (??? perhaps also to avoid problems with patch?).
698 # ??? Newer versions have a maintainer mode that may be useful here.
699 $(srcdir)/config.in: $(srcdir)/cstamp-h.in
700 $(srcdir)/cstamp-h.in: $(srcdir)/configure.in $(srcdir)/acconfig.h
701 cd $(srcdir) && autoheader
702 echo timestamp > $(srcdir)/cstamp-h.in
703 config.h: cstamp-h ; @true
704 cstamp-h: config.in config.status
705 CONFIG_HEADERS=config.h:config.in $(SHELL) config.status
707 # Really, really stupid make features, such as SUN's KEEP_STATE, may force
708 # a target to build even if it is up-to-date. So we must verify that
709 # config.status does not exist before failing.
710 config.status: configure version.c
711 @if [ ! -f config.status ] ; then \
712 echo You must configure gcc. Look at the INSTALL file for details.; \
715 $(SHELL) config.status --recheck; \
718 all.internal: start.encap rest.encap
719 # This is what to compile if making a cross-compiler.
720 # Note that we can compile enquire using the cross-compiler just built,
721 # although we can't run it on this machine.
722 all.cross: native gcc-cross specs stmp-headers $(LIBGCC) $(STMP_FIXPROTO) \
723 $(LIBGCC1_TEST) $(EXTRA_PARTS) lang.all.cross
724 # This is what to compile if making gcc with a cross-compiler.
725 all.build: native xgcc $(EXTRA_PARTS) lang.all.build
726 # This is what must be made before installing GCC and converting libraries.
727 start.encap: native xgcc specs $(LIBGCC1) xlimits.h lang.start.encap
728 # These can't be made until after GCC can run.
729 rest.encap: stmp-headers $(LIBGCC) $(STMP_FIXPROTO) $(EXTRA_PARTS) lang.rest.encap
730 # This is what is made with the host's compiler
731 # whether making a cross compiler or not.
732 native: config.status config.h cpp $(LANGUAGES) \
733 $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2)
735 # Define the names for selecting languages in LANGUAGES.
739 # Tell GNU make these are phony targets.
740 .PHONY: C c PROTO proto
742 # On the target machine, finish building a cross compiler.
743 # This does the things that can't be done on the host machine.
744 rest.cross: $(LIBGCC) gfloat.h specs
746 # Verify that it works to compile and link libgcc1-test.
747 # If it does, then there are sufficient replacements for libgcc1.a.
748 libgcc1-test: libgcc1-test.o native $(GCC_PARTS)
749 @echo "Testing libgcc1. Ignore linker warning messages."
750 $(GCC_FOR_TARGET) $(GCC_CFLAGS) libgcc1-test.o -o libgcc1-test \
751 -nostartfiles -nostdlib `$(GCC_FOR_TARGET) --print-libgcc-file-name`
752 libgcc1-test.o: libgcc1-test.c native xgcc
753 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -c $(srcdir)/libgcc1-test.c
755 # Recompile all the language-independent object files.
756 # This is used only if the user explicitly asks for it.
757 compilations: ${OBJS}
759 # Create a list of the language-independent object files so the language
760 # subdirectories needn't mention their names explicitly.
761 stamp-objlist: $(OBJS) $(BC_OBJS)
762 echo " $(OBJS) $(BC_OBJS)" | sed -e 's, \([a-z0-9]\), ../\1,g' -e 's/\.o/$(objext)/g' >stamp-objlist
764 # We call this executable `xgcc' rather than `gcc'
765 # to avoid confusion if the current directory is in the path
766 # and CC is `gcc'. It is renamed to `gcc' when it is installed.
767 xgcc: gcc.o version.o choose-temp.o pexecute.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
768 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o version.o \
769 choose-temp.o pexecute.o $(EXTRA_GCC_OBJS) $(LIBS)
771 # Dump a specs file to make -B./ read these specs over installed ones.
773 $(GCC_FOR_TARGET) -dumpspecs > tmp-specs
776 # We do want to create an executable named `xgcc', so we can use it to
778 # Also create gcc-cross, so that install-common will install properly.
780 cp xgcc$(exeext) gcc-cross$(exeext)
782 cc1: $(P) $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
783 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
785 # Copy float.h from its source.
788 cp $(FLOAT_H) gfloat.h
790 # Create float.h source for the native machine.
792 -./enquire -f > tmp-float.h
793 mv tmp-float.h float.h-nat
795 # Create a dummy float.h source for a cross-compiler.
796 # ??? This isn't used anymore. Should we create config/float-unkn.h
797 # and make that the default float_format in configure?
799 echo "#ifndef __GCC_FLOAT_NOT_NEEDED" > t-float.h-cross
800 echo "#error float.h values not known for cross-compiler" >> t-float.h-cross
801 echo "#endif" >> t-float.h-cross
802 mv t-float.h-cross float.h-cross
804 # Used to compile enquire with standard cc, but have forgotten why.
805 # Let's try with GCC.
806 enquire: enquire.o $(GCC_PARTS)
807 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ENQUIRE_LDFLAGS) enquire.o -o $@
808 enquire.o: $(srcdir)/enquire.c $(GCC_PASSES) stmp-int-hdrs
809 # Breaking this line caused a problem with one version of GNU make.
810 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(ENQUIRE_CFLAGS) -I. -c $(srcdir)/enquire.c
812 # Build the version of limits.h that we will install.
813 xlimits.h: glimits.h limitx.h limity.h
814 if $(LIMITS_H_TEST) ; then \
815 cat $(srcdir)/limitx.h $(srcdir)/glimits.h $(srcdir)/limity.h > tmp-xlimits.h; \
817 cat $(srcdir)/glimits.h > tmp-xlimits.h; \
819 mv tmp-xlimits.h xlimits.h
822 # This is done in two parts because some functions, in libgcc1.c,
823 # must be compiled with something other than GCC,
824 # while the rest, in libgcc2.c, must be compiled with xgcc.
825 # That means we can't do libgcc2.c until after xgcc, cc1, etc.
827 # Use this as value of LIBGCC1 to cause conversion to GNU library format.
828 # LIBCONVERT should put its output in libgcc1.conv.
829 libgcc1.conv: libgcc1.a
830 $(LIBCONVERT) libgcc1.a libgcc1.conv
832 # Use this as value of LIBGCC1 to inhibit use of libgcc1.c entirely.
833 # Make an empty file instead.
834 libgcc1.null: $(GCC_PASSES)
835 echo "__foo () {}" > dummy.c
836 $(GCC_FOR_TARGET) $(GCC_CFLAGS) -c dummy.c
837 $(OLDAR) $(OLDAR_FLAGS) libgcc1.null dummy$(objext)
838 rm -f dummy$(objext) dummy.c
840 # This is $(LIBGCC1) for a cross-compiler.
841 # We have no automatic way of building libgcc1.a,
842 # so it's up to the installer to find a way to do that.
843 # This rule deliberately does not depend on libgcc1.a
844 # so that it will fail if the installer hasn't provided it.
846 mv libgcc1.a libgcc1.cross || (echo You must find a way to make libgcc1.a; false)
848 # Compile the library of arithmetic subroutines with the native compiler.
849 # Don't compile it with GCC!
850 # (That would cause most arithmetic functions to call themselves.)
852 # NOTE: If you modify these rules substantially, please be sure to
853 # check at least config/i386/t-sco5 and possibly other makefile
855 libgcc1.a: libgcc1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status
857 # Actually build it in tmplibgcc1.a, then rename at end,
858 # so that libgcc1.a itself remains nonexistent if compilation is aborted.
859 # -e causes any failing command to make this rule fail.
860 # -e doesn't work in certain shells, so we test $$? as well.
861 # lynx has a broken ar, it always complains when the initial library is
862 # empty, thus this command works only if we don't do -e
863 # There is a trailing backslash (\) deleted from the following line.
865 for name in $(LIB1FUNCS); \
868 rm -f $${name}$(objext); \
869 $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -c -DL$${name} $(srcdir)/libgcc1.c; \
870 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
871 mv libgcc1$(objext) $${name}$(objext); \
872 $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \
873 rm -f $${name}$(objext); \
875 # Some shells crash when a loop has no items.
876 # So make sure there is always at least one--`..'.
878 # We don't use -e here because there are if statements
879 # that should not make the command give up when the if condition is false.
880 # Instead, we test for failure after each command where it matters.
881 for file in .. $(LIB1FUNCS_EXTRA); \
883 if [ x$${file} != x.. ]; then \
884 name=`echo $${file} | sed -e 's/[.][cS]$$//' -e 's/[.]asm$$//'`; \
886 if [ $${name}.asm = $${file} ]; then \
887 cp $${file} $${name}.s || exit 1; file=$${name}.s; \
889 $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -c $${file}; \
890 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
891 $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \
892 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
893 rm -f $${name}.s $${name}$(objext); \
897 -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc1.a; else true; fi
898 mv tmplibgcc1.a libgcc1.a
900 # Build libgcc1.a from assembler source. LIB1ASMFUNCS is the list of
901 # functions. LIB1ASMSRC is the name of the source file in the config
903 libgcc1-asm.a: libgcc2.ready config.status $(srcdir)/config/$(LIB1ASMSRC)
904 -rm -f tmplibgcc1.a libgcc1.S
905 cp $(srcdir)/config/$(LIB1ASMSRC) libgcc1.S
906 # Actually build it in tmplibgcc1.a, then rename at end,
907 # so that libgcc1-asm.a itself remains nonexistent if compilation is aborted.
908 # -e causes any failing command to make this rule fail.
909 # -e doesn't work in certain shells, so we test $$? as well.
910 # lynx has a broken ar, it always complains when the initial library is
911 # empty, thus this command works only if we don't do -e
912 # There is a trailing backslash (\) deleted from the following line.
914 for name in $(LIB1ASMFUNCS); \
917 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} libgcc1.S; \
918 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
919 mv libgcc1$(objext) $${name}$(objext); \
920 $(AR) $(AR_FLAGS) tmplibgcc1.a $${name}$(objext); \
921 rm -f $${name}$(objext); \
924 mv tmplibgcc1.a libgcc1-asm.a
926 # Generate assembly versions of the functions required for libgcc1.
927 # You'll still need to massage the code by hand (possibly hacking
928 # underscores and local labels) but this will get you started.
929 libgcc1.S: libgcc1.c $(CONFIG_H) config.status
932 for name in $(LIB1FUNCS); \
935 $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -S -DL$${name} $(srcdir)/libgcc1.c; \
936 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
937 echo '#ifdef ' L$${name} >> libgcc1.S; \
938 cat libgcc1.s >> libgcc1.S; \
939 echo '#endif /*' L$${name} '*/' >> libgcc1.S; \
940 echo "" >> libgcc1.S; \
943 # Compiling libgcc2.a requires making sure that cc1, etc. have been compiled.
944 # But recompiling cc1 should not force recompilation of libgcc2.a.
945 # If you want to force recompilation, delete libgcc2.a.
946 libgcc2.ready: $(GCC_PASSES) $(LIBGCC2_DEPS) stmp-int-hdrs
947 -if [ -f libgcc2.ready ] ; then \
950 touch libgcc2.ready; \
953 LIB2ADD = $(srcdir)/frame.c $(LIB2FUNCS_EXTRA) $(LANG_LIB2FUNCS)
954 libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(LIB2ADD) \
955 machmode.h longlong.h gbl-ctors.h config.status
956 # Actually build it in tmplibgcc2.a, then rename at end,
957 # so that libgcc2.a itself remains nonexistent if compilation is aborted.
959 # -e causes any failing command to make this rule fail.
960 # -e doesn't work in certain shells, so we test $$? as well.
961 # lynx has a broken ar, it always complains when the initial library is
962 # empty, thus this command works only if we don't do -e
963 # There is a trailing backslash (\) deleted from the following line.
965 for name in $(LIB2FUNCS); \
968 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
969 $(srcdir)/libgcc2.c -o $${name}$(objext); \
970 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
971 $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}$(objext); \
972 rm -f $${name}$(objext); \
974 # Some shells crash when a loop has no items.
975 # So make sure there is always at least one--`..'.
977 # We don't use -e here because there are if statements
978 # that should not make the command give up when the if condition is false.
979 # Instead, we test for failure after each command where it matters.
980 for file in $(LIB2ADD); do \
981 name=`echo $${file} | sed -e 's/[.][cSo]$$//' -e 's/[.]asm$$//' -e 's/[.]txt$$//'`; \
982 oname=` echo $${name} | sed -e 's,.*/,,'`; \
983 if [ $${name}.txt = $${file} ]; then \
984 for f in .. `cat $${file}`; do if [ x$${f} != x.. ]; then \
985 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
986 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" \
987 CFLAGS="$(CFLAGS)" HOST_PREFIX="$(HOST_PREFIX)" \
988 HOST_PREFIX_1="$(HOST_PREFIX_1)" \
989 LANGUAGES="$(LANGUAGES)" \
990 LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $${f}; \
991 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
992 $(AR) $(AR_FLAGS) tmplibgcc2.a $${f}; \
998 if [ $${name}.asm = $${file} ]; then \
999 cp $${file} $${name}.s || exit 1; file=$${name}.s; \
1001 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
1002 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
1003 $(AR) $(AR_FLAGS) tmplibgcc2.a $${oname}$(objext); \
1004 rm -f $${name}.s $${oname}$(objext); \
1007 mv tmplibgcc2.a libgcc2.a
1008 # These lines were deleted from above the mv command
1009 # because ranlibing libgcc.a itself should suffice.
1010 # -if [ x${HPUX_GAS} = x ] ; then \
1011 # if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc2.a; else true; fi; \
1014 # Combine the various libraries into a single library, libgcc.a.
1015 libgcc.a: $(LIBGCC1) $(LIBGCC2)
1016 -rm -rf tmplibgcc.a libgcc.a tmpcopy
1018 -if [ x$(LIBGCC1) != x ]; \
1019 then (cd tmpcopy; $(AR) x ../$(LIBGCC1)); \
1022 # Some versions of ar (specifically the one in RISC/os 5.x), create an
1023 # unwritable table of contents file, and then print an error message when
1024 # the second ar command tries to overwrite this file. To avoid the error
1025 # message from ar, we make sure all files are writable.
1026 -(cd tmpcopy; chmod +w * > /dev/null 2>&1)
1027 (cd tmpcopy; $(AR) x ../$(LIBGCC2))
1028 (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *$(objext))
1030 -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
1031 # Actually build it in tmplibgcc.a, then rename at end,
1032 # so that libgcc.a itself remains nonexistent if compilation is aborted.
1033 mv tmplibgcc.a libgcc.a
1035 # Use the genmultilib shell script to generate the information the gcc
1036 # driver program needs to select the library directory based on the
1038 multilib.h: stamp-mlib; @true
1039 stamp-mlib: $(srcdir)/genmultilib Makefile
1040 $(SHELL) $(srcdir)/genmultilib \
1041 "$(MULTILIB_OPTIONS)" \
1042 "$(MULTILIB_DIRNAMES)" \
1043 "$(MULTILIB_MATCHES)" \
1044 "$(MULTILIB_EXCEPTIONS)" \
1045 "$(MULTILIB_EXTRA_OPTS)" > tmp-mlib.h
1046 $(srcdir)/move-if-change tmp-mlib.h multilib.h
1049 # Build multiple copies of libgcc.a, one for each target switch.
1050 stmp-multilib: $(LIBGCC1) libgcc2.c libgcc2.ready $(CONFIG_H) \
1051 $(LIB2ADD) machmode.h longlong.h gbl-ctors.h config.status
1052 for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
1053 dir=`echo $$i | sed -e 's/;.*$$//'`; \
1054 flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
1055 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1056 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
1057 RANLIB="$(RANLIB)" RANLIB_TEST="$(RANLIB_TEST)" \
1058 LANGUAGES="$(LANGUAGES)" \
1059 HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1060 LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS) $${flags}" \
1061 MULTILIB_CFLAGS="$${flags}" \
1062 LIBGCC1="$(LIBGCC1)" LIBGCC2="$(LIBGCC2)" \
1063 dir="$${dir}" stmp-multilib-sub; \
1064 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
1068 # Subroutine of stmp-multilib so make -n works.
1071 if [ -d $(dir) ]; then \
1073 rm -f libgcc.a $(EXTRA_MULTILIB_PARTS); \
1076 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1077 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
1078 HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1079 LANGUAGES="$(LANGUAGES)" \
1080 LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC2)
1081 if [ x$(LIBGCC1) != xlibgcc1-asm.a ]; \
1083 else rm -f $(LIBGCC1); \
1085 if [ x$(LIBGCC1) != xlibgcc1-asm.a ]; \
1088 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1089 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
1090 HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1091 LANGUAGES="$(LANGUAGES)" \
1092 LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC1); \
1094 rm -rf tmplibgcc.a tmpcopy
1096 if [ x$(LIBGCC1) != x ]; \
1097 then (cd tmpcopy; $(AR) x ../$(LIBGCC1)); \
1100 (cd tmpcopy; $(AR) x ../$(LIBGCC2))
1101 (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *$(objext))
1102 rm -rf libgcc2.a tmpcopy
1103 if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
1104 if [ -d $(dir) ]; then true; else mkdir $(dir); fi
1105 mv tmplibgcc.a $(dir)/libgcc.a
1106 for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
1107 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1108 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
1109 HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1110 LANGUAGES="$(LANGUAGES)" \
1111 MULTILIB_CFLAGS="$(MULTILIB_CFLAGS)" T="t" t$${f}; \
1112 mv t$${f} $(dir)/$${f}; \
1116 # Compile two additional files that are linked with every program
1117 # linked using GCC on systems using COFF or ELF, for the sake of C++
1119 $(T)crtbegin.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
1120 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
1121 -finhibit-size-directive -fno-inline-functions -fno-exceptions $(CRTSTUFF_T_CFLAGS) \
1122 -c $(srcdir)/crtstuff.c -DCRT_BEGIN -o $(T)crtbegin$(objext)
1124 $(T)crtend.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
1125 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
1126 -finhibit-size-directive -fno-inline-functions -fno-exceptions $(CRTSTUFF_T_CFLAGS) \
1127 -c $(srcdir)/crtstuff.c -DCRT_END -o $(T)crtend$(objext)
1129 # On some systems we also want to install versions of these files
1130 # compiled using PIC for use in shared libraries.
1131 crtbeginS.o crtendS.o: stamp-crtS ; @true
1133 stamp-crtS: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
1134 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS_S) \
1135 -DCRT_BEGIN -finhibit-size-directive -fno-inline-functions \
1136 -g0 -c $(srcdir)/crtstuff.c
1137 mv crtstuff$(objext) crtbeginS$(objext)
1138 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS_S) \
1139 -DCRT_END -finhibit-size-directive -fno-inline-functions \
1140 -g0 -c $(srcdir)/crtstuff.c -o crtendS$(objext)
1143 # Compile the start modules crt0.o and mcrt0.o that are linked with every program
1144 crt0.o: stamp-crt0 ; @true
1145 mcrt0.o: stamp-crt0; @true
1147 stamp-crt0: $(CRT0_S) $(MCRT0_S) $(GCC_PASSES) $(CONFIG_H)
1148 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(CRT0STUFF_T_CFLAGS) \
1149 -o crt0.o -c $(CRT0_S)
1150 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(CRT0STUFF_T_CFLAGS) \
1151 -o mcrt0.o -c $(MCRT0_S)
1154 # Compiling object files from source files.
1156 # Note that dependencies on obstack.h are not written
1157 # because that file is not part of GCC.
1159 # C language specific files.
1161 c-parse.o : $(srcdir)/c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \
1162 $(srcdir)/c-parse.h c-tree.h input.h flags.h
1163 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/c-parse.c
1164 $(srcdir)/c-parse.h: $(srcdir)/c-parse.c
1165 $(srcdir)/c-parse.c: $(srcdir)/c-parse.y
1166 cd $(srcdir); $(BISON) $(BISONFLAGS) -d c-parse.y -o c-parse.c
1167 $(srcdir)/c-parse.y: c-parse.in
1168 echo '/*WARNING: This file is automatically generated!*/' >tmp-c-parse.y
1169 sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \
1170 -e "/^ifc$$/d" -e "/^end ifc$$/d" \
1171 $(srcdir)/c-parse.in >>tmp-c-parse.y
1172 $(srcdir)/move-if-change tmp-c-parse.y $(srcdir)/c-parse.y
1174 $(srcdir)/c-gperf.h: c-parse.gperf
1175 gperf -p -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,3,$$ \
1176 $(srcdir)/c-parse.gperf >tmp-gperf.h
1177 $(srcdir)/move-if-change tmp-gperf.h $(srcdir)/c-gperf.h
1179 c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h output.h
1180 c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h output.h
1181 c-lang.o : c-lang.c $(CONFIG_H) $(TREE_H)
1182 c-lex.o : c-lex.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h $(srcdir)/c-parse.h \
1183 input.h flags.h $(srcdir)/c-gperf.h c-pragma.h
1184 c-aux-info.o : c-aux-info.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
1185 c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H) flags.h
1186 c-pragma.o: c-pragma.c $(CONFIG_H) $(TREE_H) except.h function.h \
1187 defaults.h c-pragma.h
1188 c-iterate.o: c-iterate.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h flags.h
1190 # To make a configuration always use collect2, set USE_COLLECT2 to ld.
1193 $(LN) collect2$(exeext) ld$(exeext)
1195 collect2: collect2.o tlink.o hash.o cplus-dem.o underscore.o version.o \
1196 choose-temp.o $(LIBDEPS)
1197 # Don't try modifying collect2 (aka ld) in place--it might be linking this.
1198 -rm -f collect2$(exeext)
1199 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ collect2.o tlink.o hash.o \
1200 cplus-dem.o underscore.o version.o choose-temp.o $(LIBS)
1202 collect2.o : collect2.c $(CONFIG_H) gstab.h obstack.h demangle.h
1203 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1204 -DTARGET_MACHINE=\"$(target_alias)\" $(MAYBE_USE_COLLECT2) \
1205 -c `echo $(srcdir)/collect2.c | sed 's,^\./,,'`
1207 tlink.o: tlink.c demangle.h hash.h $(CONFIG_H)
1208 hash.o: hash.c hash.h
1209 cplus-dem.o: cplus-dem.c demangle.h
1211 underscore.c: stamp-under ; @true
1213 stamp-under: $(GCC_PASSES)
1214 echo "int xxy_us_dummy;" >tmp-dum.c
1215 $(GCC_FOR_TARGET) -S tmp-dum.c
1216 echo '/*WARNING: This file is automatically generated!*/' >tmp-under.c
1217 if grep _xxy_us_dummy tmp-dum.s > /dev/null ; then \
1218 echo "int prepends_underscore = 1;" >>tmp-under.c; \
1220 echo "int prepends_underscore = 0;" >>tmp-under.c; \
1222 $(srcdir)/move-if-change tmp-under.c underscore.c
1223 -rm -f tmp-dum.c tmp-dum.s
1226 # A file used by all variants of C.
1228 c-common.o : c-common.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
1230 # Language-independent files.
1233 -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
1234 -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
1235 -DDEFAULT_TARGET_VERSION=\"$(version)\" \
1236 -DDEFAULT_TARGET_MACHINE=\"$(target_alias)\" \
1237 -DTOOLDIR_BASE_PREFIX=\"$(exec_prefix)/\"
1238 gcc.o: gcc.c $(CONFIG_H) multilib.h Makefile $(lang_specs_files)
1239 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1241 -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'`
1243 dumpvers: dumpvers.c
1245 version.o: version.c
1246 obstack.o: obstack.c
1247 choose-temp.o: choose-temp.c
1248 pexecute.o: pexecute.c
1250 convert.o: convert.c $(CONFIG_H) $(TREE_H) flags.h convert.h
1252 tree.o : tree.c $(CONFIG_H) $(TREE_H) flags.h function.h
1253 print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
1254 stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) flags.h function.h
1255 fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H) flags.h
1256 toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) bytecode.h bc-emit.h \
1257 flags.h input.h insn-attr.h xcoffout.h defaults.h output.h \
1258 $(lang_options_files)
1259 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(MAYBE_USE_COLLECT2) \
1260 -DTARGET_NAME=\"$(target_alias)\" \
1261 -c `echo $(srcdir)/toplev.c | sed 's,^\./,,'`
1263 rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
1265 print-rtl.o : print-rtl.c $(CONFIG_H) $(RTL_H)
1266 rtlanal.o : rtlanal.c $(CONFIG_H) $(RTL_H)
1268 varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h function.h \
1269 defaults.h insn-codes.h expr.h hard-reg-set.h regs.h xcoffout.h \
1270 output.h bytecode.h c-pragma.h
1271 function.o : function.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \
1272 insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
1273 recog.h output.h bytecode.h bc-emit.h
1274 stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \
1275 insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h except.h \
1276 loop.h recog.h bytecode.h bc-typecd.h bc-typecd.def bc-opcode.h \
1277 bc-optab.h bc-emit.h
1278 except.o : except.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \
1279 insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
1280 recog.h output.h except.h
1281 expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h regs.h \
1282 insn-flags.h insn-codes.h expr.h insn-config.h recog.h output.h \
1283 typeclass.h bytecode.h bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h \
1284 bc-emit.h modemap.def hard-reg-set.h
1285 calls.o : calls.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h \
1287 expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
1288 insn-flags.h insn-config.h insn-codes.h expr.h recog.h real.h
1289 explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h hard-reg-set.h \
1290 insn-config.h expr.h recog.h insn-flags.h insn-codes.h
1291 optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
1292 insn-flags.h insn-config.h insn-codes.h expr.h recog.h reload.h
1293 dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h regs.h \
1294 insn-config.h reload.h gstab.h xcoffout.h defaults.h output.h
1295 sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h except.h \
1296 function.h expr.h output.h hard-reg-set.h regs.h defaults.h real.h \
1297 insn-config.h bytecode.h obstack.h xcoffout.h c-pragma.h
1298 dwarfout.o : dwarfout.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf.h flags.h \
1299 insn-config.h reload.h output.h defaults.h
1300 dwarf2out.o : dwarf2out.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf2.h flags.h \
1301 insn-config.h reload.h output.h defaults.h hard-reg-set.h regs.h expr.h
1302 xcoffout.o : xcoffout.c $(CONFIG_H) $(TREE_H) $(RTL_H) xcoffout.h flags.h
1303 emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
1304 function.h regs.h insn-config.h insn-codes.h real.h expr.h bytecode.h \
1305 bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h bc-emit.h bc-opname.h
1306 real.o : real.c $(CONFIG_H) $(TREE_H)
1307 getpwd.o : getpwd.c $(CONFIG_H)
1309 integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h integrate.h \
1310 insn-flags.h insn-config.h insn-codes.h expr.h real.h regs.h function.h \
1313 jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \
1314 insn-config.h insn-flags.h insn-codes.h expr.h real.h
1315 stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h
1317 cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h \
1318 insn-config.h recog.h
1319 profile.o : profile.c $(CONFIG_H) $(RTL_H) flags.h insn-flags.h gcov-io.h \
1321 loop.o : loop.c $(CONFIG_H) $(RTL_H) flags.h loop.h insn-config.h \
1322 insn-flags.h insn-codes.h regs.h hard-reg-set.h recog.h expr.h real.h
1323 unroll.o : unroll.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \
1324 integrate.h regs.h flags.h expr.h loop.h
1325 flow.o : flow.c $(CONFIG_H) $(RTL_H) flags.h insn-config.h \
1326 $(BASIC_BLOCK_H) regs.h hard-reg-set.h output.h
1327 combine.o : combine.c $(CONFIG_H) $(RTL_H) flags.h \
1328 insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
1329 $(BASIC_BLOCK_H) recog.h real.h hard-reg-set.h
1330 regclass.o : regclass.c $(CONFIG_H) $(RTL_H) hard-reg-set.h flags.h \
1331 $(BASIC_BLOCK_H) regs.h insn-config.h recog.h reload.h real.h bytecode.h
1332 local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) flags.h $(BASIC_BLOCK_H) \
1333 regs.h hard-reg-set.h insn-config.h recog.h output.h
1334 bitmap.o : bitmap.c $(CONFIG_H) $(RTL_H) flags.h $(BASIC_BLOCK_H) regs.h
1335 global.o : global.c $(CONFIG_H) $(RTL_H) flags.h \
1336 $(BASIC_BLOCK_H) regs.h hard-reg-set.h insn-config.h output.h
1338 reload.o : reload.c $(CONFIG_H) $(RTL_H) flags.h output.h expr.h\
1339 reload.h recog.h hard-reg-set.h insn-config.h insn-codes.h regs.h real.h
1340 reload1.o : reload1.c $(CONFIG_H) $(RTL_H) real.h flags.h expr.h \
1341 reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
1342 $(BASIC_BLOCK_H) recog.h output.h
1343 caller-save.o : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \
1344 regs.h hard-reg-set.h insn-codes.h insn-config.h $(BASIC_BLOCK_H) recog.h \
1346 reorg.o : reorg.c $(CONFIG_H) $(RTL_H) conditions.h hard-reg-set.h \
1347 $(BASIC_BLOCK_H) regs.h insn-config.h insn-attr.h insn-flags.h recog.h \
1349 alias.o : alias.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \
1351 regmove.o : regmove.c $(CONFIG_H) $(RTL_H) insn-config.h recog.h output.h \
1352 reload.h regs.h hard-reg-set.h flags.h expr.h insn-flags.h
1353 $(SCHED_PREFIX)sched.o : $(SCHED_PREFIX)sched.c $(CONFIG_H) $(RTL_H) $(BASIC_BLOCK_H) regs.h hard-reg-set.h \
1354 flags.h insn-config.h insn-attr.h
1355 final.o : final.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h regs.h \
1356 recog.h conditions.h insn-config.h insn-attr.h except.h real.h output.h \
1357 hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h
1358 recog.o : recog.c $(CONFIG_H) $(RTL_H) \
1359 regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \
1360 insn-flags.h insn-codes.h real.h
1361 reg-stack.o : reg-stack.c $(CONFIG_H) $(RTL_H) $(TREE_H) \
1362 regs.h hard-reg-set.h flags.h insn-config.h insn-flags.h
1364 $(out_object_file): $(out_file) $(CONFIG_H) $(TREE_H) \
1365 $(RTL_H) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
1366 insn-flags.h output.h insn-attr.h insn-codes.h
1367 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(out_file)
1369 # Build auxiliary files that support ecoff format.
1370 mips-tfile: mips-tfile.o version.o $(LIBDEPS)
1371 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tfile.o version.o $(LIBS)
1373 mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H)
1375 mips-tdump: mips-tdump.o version.o $(LIBDEPS)
1376 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tdump.o version.o $(LIBS)
1378 mips-tdump.o : mips-tdump.c $(CONFIG_H) $(RTL_H)
1380 # Build file to support OSF/rose half-pic format.
1381 halfpic.o: halfpic.c $(CONFIG_H) $(RTL_H) $(TREE_H)
1383 # Normally this target is not used; but it is used if you
1384 # define ALLOCA=alloca.o. In that case, you must get a suitable alloca.c
1385 # from the GNU Emacs distribution.
1387 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(ALLOCA_FLAGS) \
1388 -c `echo $(srcdir)/alloca.c | sed 's,^\./,,'`
1391 # Generate header and source files from the machine description,
1394 .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
1395 insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
1396 insn-attr.h insn-attrtab.c
1398 # The following pair of rules has this effect:
1399 # genconfig is run only if the md has changed since genconfig was last run;
1400 # but the file insn-config.h is touched only when its contents actually change.
1402 # Each of the other insn-* files is handled by a similar pair of rules.
1404 # This causes an anomaly in the results of make -n
1405 # because insn-* is older than stamp-*
1406 # and thus make -n thinks that insn-* will be updated
1407 # and force recompilation of things that depend on it.
1408 # We use move-if-change precisely to avoid such recompilation.
1409 # But there is no way to teach make -n that it will be avoided.
1411 # Each of the insn-*.[ch] rules has a semicolon at the end,
1412 # for otherwise the system Make on SunOS 4.1 never tries
1413 # to recompile insn-*.o. To avoid problems and extra noise from
1414 # versions of make which don't like empty commands (nothing after the
1415 # trailing `;'), we call true for each.
1417 insn-config.h: stamp-config ; @true
1418 stamp-config : $(md_file) genconfig $(srcdir)/move-if-change
1419 ./genconfig $(md_file) > tmp-config.h
1420 $(srcdir)/move-if-change tmp-config.h insn-config.h
1423 insn-flags.h: stamp-flags ; @true
1424 stamp-flags : $(md_file) genflags $(srcdir)/move-if-change
1425 ./genflags $(md_file) > tmp-flags.h
1426 $(srcdir)/move-if-change tmp-flags.h insn-flags.h
1429 insn-codes.h: stamp-codes ; @true
1430 stamp-codes : $(md_file) gencodes $(srcdir)/move-if-change
1431 ./gencodes $(md_file) > tmp-codes.h
1432 $(srcdir)/move-if-change tmp-codes.h insn-codes.h
1435 insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h real.h output.h \
1436 insn-config.h insn-flags.h insn-codes.h
1437 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c
1439 insn-emit.c: stamp-emit ; @true
1440 stamp-emit : $(md_file) genemit $(srcdir)/move-if-change
1441 ./genemit $(md_file) > tmp-emit.c
1442 $(srcdir)/move-if-change tmp-emit.c insn-emit.c
1445 insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h recog.h \
1446 real.h output.h flags.h
1447 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-recog.c
1449 insn-recog.c: stamp-recog ; @true
1450 stamp-recog : $(md_file) genrecog $(srcdir)/move-if-change
1451 ./genrecog $(md_file) > tmp-recog.c
1452 $(srcdir)/move-if-change tmp-recog.c insn-recog.c
1455 insn-opinit.o : insn-opinit.c $(CONFIG_H) $(RTL_H) insn-codes.h insn-flags.h \
1456 insn-config.h flags.h rtl.h recog.h expr.h reload.h
1457 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-opinit.c
1459 insn-opinit.c: stamp-opinit ; @true
1460 stamp-opinit : $(md_file) genopinit $(srcdir)/move-if-change
1461 ./genopinit $(md_file) > tmp-opinit.c
1462 $(srcdir)/move-if-change tmp-opinit.c insn-opinit.c
1465 insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H)
1466 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-extract.c
1468 insn-extract.c: stamp-extract ; @true
1469 stamp-extract : $(md_file) genextract $(srcdir)/move-if-change
1470 ./genextract $(md_file) > tmp-extract.c
1471 $(srcdir)/move-if-change tmp-extract.c insn-extract.c
1474 insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h output.h real.h
1475 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-peep.c
1477 insn-peep.c: stamp-peep ; @true
1478 stamp-peep : $(md_file) genpeep $(srcdir)/move-if-change
1479 ./genpeep $(md_file) > tmp-peep.c
1480 $(srcdir)/move-if-change tmp-peep.c insn-peep.c
1483 insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) regs.h real.h output.h \
1484 insn-attr.h insn-config.h
1485 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-attrtab.c
1487 insn-attr.h: stamp-attr ; @true
1488 stamp-attr : $(md_file) genattr $(srcdir)/move-if-change
1489 ./genattr $(md_file) > tmp-attr.h
1490 $(srcdir)/move-if-change tmp-attr.h insn-attr.h
1493 insn-attrtab.c: stamp-attrtab ; @true
1494 stamp-attrtab : $(md_file) genattrtab $(srcdir)/move-if-change
1495 if cmp -s $(PREMADE_ATTRTAB_MD) $(md_file); \
1497 echo Using $(PREMADE_ATTRTAB); \
1498 cp $(PREMADE_ATTRTAB) tmp-attrtab.c; \
1500 ./genattrtab $(md_file) > tmp-attrtab.c; \
1502 $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c
1505 insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h real.h conditions.h \
1506 hard-reg-set.h insn-config.h insn-flags.h insn-attr.h output.h recog.h \
1508 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-output.c
1510 insn-output.c: stamp-output ; @true
1511 stamp-output : $(md_file) genoutput $(srcdir)/move-if-change
1512 ./genoutput $(md_file) > tmp-output.c
1513 $(srcdir)/move-if-change tmp-output.c insn-output.c
1516 # Compile the programs that generate insn-* from the machine description.
1517 # They are compiled with $(HOST_CC), and associated libraries,
1518 # since they need to run on this machine
1519 # even if GCC is being compiled to run on some other machine.
1521 # $(CONFIG_H) is omitted from the deps of the gen*.o
1522 # because these programs don't really depend on anything
1523 # about the target machine. They do depend on config.h itself,
1524 # since that describes the host machine.
1526 # Pass the md file through cpp if the target requests it.
1527 $(MD_FILE): $(MD_DEPS)
1529 $(MD_CPP) $(MD_CPPFLAGS) $(md_file) | sed 's/^# /; /g' > tmp-$@
1532 genconfig : genconfig.o $(HOST_RTL) $(HOST_LIBDEPS)
1533 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1534 genconfig.o $(HOST_RTL) $(HOST_LIBS)
1536 genconfig.o : genconfig.c $(RTL_H) $(build_xm_file)
1537 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconfig.c
1539 genflags : genflags.o $(HOST_RTL) $(HOST_LIBDEPS)
1540 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1541 genflags.o $(HOST_RTL) $(HOST_LIBS)
1543 genflags.o : genflags.c $(RTL_H) $(build_xm_file)
1544 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genflags.c
1546 gencodes : gencodes.o $(HOST_RTL) $(HOST_LIBDEPS)
1547 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1548 gencodes.o $(HOST_RTL) $(HOST_LIBS)
1550 gencodes.o : gencodes.c $(RTL_H) $(build_xm_file)
1551 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencodes.c
1553 genemit : genemit.o $(HOST_RTL) $(HOST_LIBDEPS)
1554 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1555 genemit.o $(HOST_RTL) $(HOST_LIBS)
1557 genemit.o : genemit.c $(RTL_H) $(build_xm_file)
1558 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genemit.c
1560 genopinit : genopinit.o $(HOST_RTL) $(HOST_LIBDEPS)
1561 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1562 genopinit.o $(HOST_RTL) $(HOST_LIBS)
1564 genopinit.o : genopinit.c $(RTL_H) $(build_xm_file)
1565 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genopinit.c
1567 genrecog : genrecog.o $(HOST_RTL) $(HOST_LIBDEPS)
1568 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1569 genrecog.o $(HOST_RTL) $(HOST_LIBS)
1571 genrecog.o : genrecog.c $(RTL_H) $(build_xm_file)
1572 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genrecog.c
1574 genextract : genextract.o $(HOST_RTL) $(HOST_LIBDEPS)
1575 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1576 genextract.o $(HOST_RTL) $(HOST_LIBS)
1578 genextract.o : genextract.c $(RTL_H) $(build_xm_file) insn-config.h
1579 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genextract.c
1581 genpeep : genpeep.o $(HOST_RTL) $(HOST_LIBDEPS)
1582 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1583 genpeep.o $(HOST_RTL) $(HOST_LIBS)
1585 genpeep.o : genpeep.c $(RTL_H) $(build_xm_file)
1586 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpeep.c
1588 genattr : genattr.o $(HOST_RTL) $(HOST_LIBDEPS)
1589 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1590 genattr.o $(HOST_RTL) $(HOST_LIBS)
1592 genattr.o : genattr.c $(RTL_H) $(build_xm_file)
1593 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattr.c
1595 genattrtab : genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBDEPS)
1596 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1597 genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBS)
1599 genattrtab.o : genattrtab.c $(RTL_H) $(build_xm_file) insn-config.h
1600 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c
1602 genoutput : genoutput.o $(HOST_RTL) $(HOST_LIBDEPS)
1603 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1604 genoutput.o $(HOST_RTL) $(HOST_LIBS)
1606 genoutput.o : genoutput.c $(RTL_H) $(build_xm_file)
1607 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genoutput.c
1609 # Compile the libraries to be used by gen*.
1610 # If we are not cross-building, gen* use the same .o's that cc1 will use,
1611 # and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict
1612 # with the rules for rtl.o, alloca.o, etc.
1613 $(HOST_PREFIX_1)rtl.o: $(srcdir)/rtl.c $(CONFIG_H) $(RTL_H)
1614 rm -f $(HOST_PREFIX)rtl.c
1615 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtl.c > $(HOST_PREFIX)rtl.c
1616 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtl.c
1618 $(HOST_PREFIX_1)print-rtl.o: $(srcdir)/print-rtl.c $(CONFIG_H) $(RTL_H)
1619 rm -f $(HOST_PREFIX)print-rtl.c
1620 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/print-rtl.c > $(HOST_PREFIX)print-rtl.c
1621 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)print-rtl.c
1623 $(HOST_PREFIX_1)rtlanal.o: $(srcdir)/rtlanal.c $(CONFIG_H) $(RTL_H)
1624 rm -f $(HOST_PREFIX)rtlanal.c
1625 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtlanal.c > $(HOST_PREFIX)rtlanal.c
1626 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtlanal.c
1628 $(HOST_PREFIX_1)alloca.o: alloca.c
1629 rm -f $(HOST_PREFIX)alloca.c
1630 cp $(srcdir)/alloca.c $(HOST_PREFIX)alloca.c
1631 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)alloca.c
1633 $(HOST_PREFIX_1)obstack.o: obstack.c
1634 rm -f $(HOST_PREFIX)obstack.c
1635 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/obstack.c > $(HOST_PREFIX)obstack.c
1636 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)obstack.c
1638 $(HOST_PREFIX_1)malloc.o: malloc.c
1639 rm -f $(HOST_PREFIX)malloc.c
1640 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/malloc.c > $(HOST_PREFIX)malloc.c
1641 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)malloc.c
1643 # This satisfies the dependency that we get if you cross-compile a compiler
1644 # that does not need to compile alloca, malloc or whatever.
1646 touch $(HOST_PREFIX_1)
1648 # Remake bytecode files.
1649 BI_OBJ=bi-parser.o bi-lexer.o bi-reverse.o
1651 bc-emit.o : bc-emit.c $(CONFIG_H) $(RTL_H) real.h $(BYTECODE_H) \
1652 bc-arity.h bc-opcode.h bc-typecd.h bc-typecd.def bi-run.h bytetypes.h
1653 bc-optab.o : bc-optab.c $(CONFIG_H) $(REAL_H) $(BYTECODE_H) \
1654 bc-opcode.h bc-typecd.h bc-typecd.def
1656 bi-arity: bi-arity.o $(BI_OBJ) $(HOST_LIBDEPS)
1657 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1658 bi-arity.o $(BI_OBJ) $(HOST_LIBS)
1659 bi-opcode: bi-opcode.o $(BI_OBJ) $(HOST_LIBDEPS)
1660 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1661 bi-opcode.o $(BI_OBJ) $(HOST_LIBS)
1662 bi-opname: bi-opname.o $(BI_OBJ) $(HOST_LIBDEPS)
1663 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1664 bi-opname.o $(BI_OBJ) $(HOST_LIBS)
1666 $(srcdir)/bi-parser.h: $(srcdir)/bi-parser.c
1667 $(srcdir)/bi-parser.c: $(srcdir)/bi-parser.y
1668 cd $(srcdir); $(BISON) $(BISONFLAGS) -d bi-parser.y -o bi-parser.c
1670 bi-parser.o: $(srcdir)/bi-parser.c bi-defs.h $(build_xm_file)
1671 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1672 $(srcdir)/bi-parser.c
1673 bi-lexer.o: bi-lexer.c $(srcdir)/bi-parser.h $(build_xm_file)
1674 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1675 $(srcdir)/bi-lexer.c
1676 bi-arity.o: bi-arity.c bi-defs.h $(build_xm_file)
1677 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1678 $(srcdir)/bi-arity.c
1679 bi-opcode.o: bi-opcode.c bi-defs.h $(build_xm_file)
1680 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1681 $(srcdir)/bi-opcode.c
1682 bi-opname.o: bi-opname.c bi-defs.h $(build_xm_file)
1683 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1684 $(srcdir)/bi-opname.c
1685 bi-reverse.o: bi-reverse.c bi-defs.h
1686 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1687 $(srcdir)/bi-reverse.c
1689 bc-arity.h: stamp-bcarity ; @true
1690 stamp-bcarity : $(srcdir)/bytecode.def bi-arity $(srcdir)/move-if-change
1691 ./bi-arity < $(srcdir)/bytecode.def >tmp-bc-arity.h
1692 $(srcdir)/move-if-change tmp-bc-arity.h bc-arity.h
1695 bc-opcode.h: stamp-bcopcode ; @true
1696 stamp-bcopcode : $(srcdir)/bytecode.def bi-opcode $(srcdir)/move-if-change
1697 ./bi-opcode < $(srcdir)/bytecode.def >tmp-bcopcd.h
1698 $(srcdir)/move-if-change tmp-bcopcd.h bc-opcode.h
1699 touch stamp-bcopcode
1701 bc-opname.h: stamp-bcopname ; @true
1702 stamp-bcopname : $(srcdir)/bytecode.def bi-opname $(srcdir)/move-if-change
1703 ./bi-opname < $(srcdir)/bytecode.def >tmp-bcopnm.h
1704 $(srcdir)/move-if-change tmp-bcopnm.h bc-opname.h
1705 touch stamp-bcopname
1707 bytecode.mostlyclean:
1708 -rm -f bc-arity.h bc-opcode.h bc-opname.h
1710 bytecode.distclean bytecode.clean: bytecode.mostlyclean
1711 -rm -f bi-arity bi-opcode bi-opname bi-lexer
1713 bytecode.maintainer-clean: bytecode.clean
1714 -rm -f bi-parser.c bi-parser.h
1717 # Remake cpp and protoize.
1719 # Making the preprocessor
1722 $(LN) $(CCCP)$(exeext) cpp$(exeext)
1723 cccp: cccp.o cexp.o version.o $(LIBDEPS)
1724 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cccp.o cexp.o \
1726 cexp.o: $(srcdir)/cexp.c $(CONFIG_H)
1727 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/cexp.c
1728 $(srcdir)/cexp.c: $(srcdir)/cexp.y
1729 cd $(srcdir); $(BISON) -o cexp.c cexp.y
1731 cccp.o: cccp.c $(CONFIG_H) pcp.h version.c config.status
1732 # The reason we use $(libdir)/g++-include rather than using libsubdir
1733 # is for compatibility with the current version of libg++.
1734 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1735 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1736 -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
1737 -DOLD_GPLUSPLUS_INCLUDE_DIR=\"$(old_gxx_include_dir)\" \
1738 -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1739 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
1740 -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1741 -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
1743 cppmain: cppmain.o cpplib.o cpphash.o cppalloc.o cpperror.o cppexp.o \
1744 version.o $(LIBDEPS)
1745 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cppmain.o cpplib.o cpphash.o \
1746 cppalloc.o cpperror.o cppexp.o version.o $(LIBS)
1748 cppmain.o: cppmain.c $(CONFIG_H) cpplib.h
1750 cpplib.o: cpplib.c $(CONFIG_H) cpplib.h cpphash.h config.status
1751 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1752 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1753 -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
1754 -DOLD_GPLUSPLUS_INCLUDE_DIR=\"$(old_gxx_include_dir)\" \
1755 -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1756 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
1757 -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1758 -c `echo $(srcdir)/cpplib.c | sed 's,^\./,,'`
1760 cpperror.o: cpperror.c $(CONFIG_H) cpplib.h
1762 cppexp.o: cppexp.c $(CONFIG_H) cpplib.h
1764 cpphash.o: cpphash.c cpplib.h cpphash.h
1766 cppalloc.o: cppalloc.c $(CONFIG_H)
1768 # Note for the stamp targets, we run the program `true' instead of
1769 # having an empty command (nothing following the semicolon).
1771 proto: config.status protoize unprotoize SYSCALLS.c.X
1773 protoize: protoize.o getopt.o getopt1.o getpwd.o version.o \
1774 pexecute.o choose-temp.o $(LIBDEPS)
1775 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
1776 protoize.o getopt.o getopt1.o getpwd.o version.o \
1777 pexecute.o choose-temp.o $(LIBS)
1778 protoize.o: stamp-proto ; @true
1780 unprotoize: unprotoize.o getopt.o getopt1.o getpwd.o version.o \
1781 pexecute.o choose-temp.o $(LIBDEPS)
1782 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
1783 unprotoize.o getopt.o getopt1.o getpwd.o version.o \
1784 pexecute.o choose-temp.o $(LIBS)
1785 unprotoize.o: stamp-proto ; @true
1787 stamp-proto: protoize.c getopt.h $(CONFIG_H)
1788 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1789 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1790 -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
1791 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
1792 -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1793 -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1794 -DSTD_PROTO_DIR=\"$(libsubdir)\" \
1795 -DUNPROTOIZE $(srcdir)/protoize.c
1796 mv protoize$(objext) unprotoize$(objext)
1797 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1798 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1799 -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
1800 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
1801 -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1802 -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1803 -DSTD_PROTO_DIR=\"$(libsubdir)\" \
1804 $(srcdir)/protoize.c
1807 getopt.o: getopt.c getopt.h
1808 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt.c
1809 getopt1.o: getopt1.c getopt.h
1810 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt1.c
1812 # This info describes the target machine, so compile with GCC just built.
1813 SYSCALLS.c.X: $(srcdir)/sys-types.h $(srcdir)/sys-protos.h $(GCC_PASSES) \
1815 -rm -f SYSCALLS.c tmp-SYSCALLS.s
1816 cat $(srcdir)/sys-types.h $(srcdir)/sys-protos.h > SYSCALLS.c
1817 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1818 -aux-info $@ -S -o tmp-SYSCALLS.s SYSCALLS.c
1819 -rm -f SYSCALLS.c tmp-SYSCALLS.s
1822 test-protoize-simple: ./protoize ./unprotoize $(GCC_PASSES)
1823 -rm -f tmp-proto.[cso]
1824 cp $(srcdir)/protoize.c tmp-proto.c
1825 chmod u+w tmp-proto.c
1826 ./protoize -N -B ./ -x getopt.h -c "-B./ -Wall -Wwrite-strings \
1827 $(CFLAGS) $(INCLUDES) \
1828 -DGCC_INCLUDE_DIR=0 \
1829 -DGPLUSPLUS_INCLUDE_DIR=0 \
1830 -DCROSS_INCLUDE_DIR=0 \
1831 -DTOOL_INCLUDE_DIR=0 \
1832 -DSTD_PROTO_DIR=0" tmp-proto.c
1833 @echo '**********' Expect 400 lines of differences.
1834 -diff $(srcdir)/protoize.c tmp-proto.c > tmp-proto.diff
1835 -wc -l tmp-proto.diff
1836 ./unprotoize -N -x getopt.h -c "-B./ -Wall -Wwrite-strings \
1837 $(CFLAGS) $(INCLUDES) \
1838 -DGCC_INCLUDE_DIR=0 \
1839 -DGPLUSPLUS_INCLUDE_DIR=0 \
1840 -DCROSS_INCLUDE_DIR=0 \
1841 -DTOOL_INCLUDE_DIR=0 \
1842 -DSTD_PROTO_DIR=0" tmp-proto.c
1843 @echo Expect zero differences.
1844 diff $(srcdir)/protoize.c tmp-proto.c | cat
1845 -rm -f tmp-proto.[cs] tmp-proto$(objext)
1847 gcov.o: gcov.c gcov-io.h
1849 gcov: gcov.o $(LIBDEPS)
1850 $(CC) $(ALL_CFLAGS) $(LDFLAGS) gcov.o $(LIBS) -o $@
1852 # Build the include directory. The stamp files are stmp-* rather than
1853 # stamp-* so that mostlyclean does not force the include directory to
1856 # Build the include directory except for float.h (which depends upon
1858 stmp-int-hdrs: stmp-fixinc $(USER_H) xlimits.h
1859 # Copy in the headers provided with gcc.
1860 # The sed command gets just the last file name component;
1861 # this is necessary because VPATH could add a dirname.
1862 # Using basename would be simpler, but some systems don't have it.
1863 for file in .. $(USER_H); do \
1864 if [ X$$file != X.. ]; then \
1865 realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
1866 rm -f include/$$realfile; \
1867 cp $$file include; \
1868 chmod a+r include/$$realfile; \
1871 rm -f include/limits.h
1872 cp xlimits.h include/limits.h
1873 chmod a+r include/limits.h
1874 # Install the README
1875 rm -f include/README
1876 cp $(srcdir)/README-fixinc include/README
1877 chmod a+r include/README
1880 # Build the complete include directory.
1881 stmp-headers: stmp-int-hdrs gfloat.h
1882 rm -f include/float.h
1883 cp gfloat.h include/float.h
1884 chmod a+r include/float.h
1887 # Build fixed copies of system files.
1888 stmp-fixinc: $(FIXINCLUDES) gsyslimits.h
1891 if [ x$(FIXINCLUDES) != xMakefile.in ]; \
1893 for dir in $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); do \
1896 $(SHELL) $(srcdir)/$(FIXINCLUDES) include $$dir; \
1901 rm -f include/syslimits.h
1902 if [ -f include/limits.h ]; then \
1903 mv include/limits.h include/syslimits.h; \
1905 cp $(srcdir)/gsyslimits.h include/syslimits.h; \
1907 chmod a+r include/syslimits.h
1910 # Files related to the fixproto script.
1912 deduced.h: $(GCC_PASSES) $(srcdir)/scan-types.sh stmp-int-hdrs
1913 CC="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -Iinclude -I${SYSTEM_HEADER_DIR}"; \
1915 $(SHELL) $(srcdir)/scan-types.sh "$(srcdir)" >tmp-deduced.h
1916 mv tmp-deduced.h deduced.h
1918 gen-protos: gen-protos.o scan.o cppalloc.o $(HOST_LIBDEPS)
1919 ${HOST_CC} $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1920 gen-protos.o scan.o cppalloc.o $(HOST_LIBS)
1922 gen-protos.o: gen-protos.c scan.h $(build_xm_file)
1923 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gen-protos.c
1925 scan.o: scan.c scan.h $(build_xm_file)
1926 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan.c
1928 xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h gen-protos Makefile
1929 cat deduced.h $(srcdir)/sys-protos.h > tmp-fixtmp.c
1930 mv tmp-fixtmp.c fixtmp.c
1931 $(GCC_FOR_TARGET) fixtmp.c -w -U__SIZE_TYPE__ -U__PTRDIFF_TYPE__ -U__WCHAR_TYPE__ -E \
1932 | sed -e 's/ / /g' -e 's/ *(/ (/g' -e 's/ [ ]*/ /g' -e 's/( )/()/' \
1933 | ./gen-protos >xsys-protos.hT
1934 mv xsys-protos.hT xsys-protos.h
1937 fix-header: fix-header.o scan-decls.o scan.o xsys-protos.h $(HOST_LIBDEPS) \
1938 cpplib.o cpphash.o cppalloc.o cppexp.o cpperror.o version.o
1939 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ fix-header.o \
1940 scan-decls.o scan.o cpplib.o cpphash.o cppalloc.o version.o \
1941 cppexp.o $(HOST_LIBS)
1943 fix-header.o: fix-header.c obstack.h scan.h xsys-protos.h $(build_xm_file)
1944 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/fix-header.c
1946 scan-decls.o: scan-decls.c scan.h cpplib.h $(build_xm_file)
1947 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan-decls.c
1949 # stmp-fixproto depends on this, not on fix-header directly.
1950 # The idea is to make sure fix-header gets built,
1951 # but not rerun fixproto after each stage
1952 # just because fix-header's mtime has changed.
1953 fixhdr.ready: fix-header
1954 -if [ -f fixhdr.ready ] ; then \
1957 touch fixhdr.ready; \
1960 # stmp-headers is to make sure fixincludes has already finished.
1961 # The if statement is so that we don't run fixproto a second time
1962 # if it has already been run on the files in `include'.
1963 stmp-fixproto: fixhdr.ready fixproto stmp-headers
1964 @echo "Various warnings and error messages from fixproto are normal"
1965 -if [ -d include ] ; then true; else mkdir include; fi
1966 -if [ -f include/fixed ] ; then true; \
1968 : This line works around a 'make' bug in BSDI 1.1.; \
1969 FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES; \
1970 $(SHELL) ${srcdir}/fixproto include include $(SYSTEM_HEADER_DIR); \
1971 touch include/fixed; \
1975 # Remake the info files.
1978 info: cpp.info gcc.info lang.info
1980 cpp.info: $(srcdir)/cpp.texi
1981 $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) $(srcdir)/cpp.texi -o cpp.info
1983 gcc.info: $(srcdir)/gcc.texi $(srcdir)/extend.texi $(srcdir)/install.texi \
1984 $(srcdir)/invoke.texi $(srcdir)/md.texi $(srcdir)/rtl.texi \
1985 $(srcdir)/tm.texi $(srcdir)/gcov.texi
1986 $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) $(srcdir)/gcc.texi -o gcc.info
1988 dvi: gcc.dvi cpp.dvi lang.dvi
1990 # This works with GNU Make's default rule.
1991 gcc.dvi: $(srcdir)/gcc.texi $(srcdir)/extend.texi $(srcdir)/install.texi \
1992 $(srcdir)/invoke.texi $(srcdir)/md.texi $(srcdir)/rtl.texi \
1993 $(srcdir)/tm.texi $(srcdir)/gcov.texi
1994 TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex gcc.texi
1996 TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex gcc.texi
1998 cpp.dvi: $(srcdir)/cpp.texi
1999 TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex cpp.texi
2001 TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex cpp.texi
2004 INSTALL: $(srcdir)/install1.texi $(srcdir)/install.texi
2005 $(MAKEINFO) -D INSTALLONLY --no-header --no-split \
2006 $(srcdir)/install1.texi -o INSTALL
2008 # Deletion of files made during compilation.
2009 # There are four levels of this:
2010 # `mostlyclean', `clean', `distclean' and `maintainer-clean'.
2011 # `mostlyclean' is useful while working on a particular type of machine.
2012 # It deletes most, but not all, of the files made by compilation.
2013 # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
2014 # `clean' deletes everything made by running `make all'.
2015 # `distclean' also deletes the files made by config.
2016 # `maintainer-clean' also deletes everything that could be regenerated
2017 # automatically, except for `configure'.
2018 # We remove as much from the language subdirectories as we can
2019 # (less duplicated code).
2022 mostlyclean: bytecode.mostlyclean lang.mostlyclean
2023 -rm -f $(STAGESTUFF)
2024 # Delete the temporary source copies for cross compilation.
2025 -rm -f $(HOST_PREFIX_1)rtl.c $(HOST_PREFIX_1)rtlanal.c
2026 -rm -f $(HOST_PREFIX_1)alloca.c $(HOST_PREFIX_1)malloc.c
2027 -rm -f $(HOST_PREFIX_1)obstack.c
2028 # Delete the temp files made in the course of building libgcc.a.
2029 -rm -f tmplibgcc* tmpcopy xlimits.h libgcc1-test
2030 for name in $(LIB1FUNCS); do rm -f $${name}.c; done
2031 # Delete other temporary files.
2032 -rm -f tmp-float.h tmp-gcc.xtar.gz
2033 -rm -f tmp-foo1 tmp-foo2 tmp-proto.* tmp-unproto.1 tmp-SYSCALLS.s
2034 -rm -f tmp-c-parse.y tmp-gperf.h
2035 -rm -f tmp-specs t-float.h-cross tmp-xlimits.h
2036 -rm -f tmp-fixtmp.c xsys-protos.hT
2037 # Delete the stamp files.
2038 -rm -f stamp-* tmp-*
2039 -rm -f */stamp-* */tmp-*
2040 # Delete debugging dump files.
2041 -rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
2042 -rm -f *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack *.regmove
2043 -rm -f */*.greg */*.lreg */*.combine */*.flow */*.cse */*.jump */*.rtl
2044 -rm -f */*.tree */*.loop */*.dbr */*.jump2 */*.sched */*.cse2
2045 -rm -f */*.sched2 */*.stack */*.regmove
2046 # Delete some files made during installation.
2047 -rm -f specs gfloat.h float.h-* enquire SYSCALLS.c.X SYSCALLS.c
2048 -rm -f collect collect2 mips-tfile mips-tdump alloca.s
2049 # Delete files generated for fixproto
2050 -rm -rf fix-header xsys-protos.h deduced.h tmp-deduced.h \
2051 gen-protos fixproto.list fixtmp.* fixhdr.ready
2052 # Delete unwanted output files from TeX.
2053 -rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg
2054 -rm -f */*.toc */*.log */*.vr */*.fn */*.cp */*.tp */*.ky */*.pg
2055 # Delete sorted indices we don't actually use.
2056 -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
2057 # Delete core dumps.
2061 # Delete all files made by compilation
2062 # that don't exist in the distribution.
2063 clean: mostlyclean bytecode.clean lang.clean
2064 # It may not be quite desirable to delete unprotoize.c here,
2065 # but the spec for `make clean' requires it.
2066 # Using unprotoize.c is not quite right in the first place,
2067 # but what better way is there?
2068 -rm -f libgcc.a libgcc1.a libgcc1-asm.a libgcc2.a libgcc2.ready
2072 -if [ -f md.pre-cpp ]; then \
2075 # Delete the include directory.
2076 -rm -rf stmp-* include
2078 # Delete files used by the "multilib" facility (including libgcc subdirs).
2079 -rm -f multilib.h tmpmultilib*
2080 -if [ "x$(MULTILIB_DIRNAMES)" != x ] ; then \
2081 rm -rf $(MULTILIB_DIRNAMES); \
2082 else if [ "x$(MULTILIB_OPTIONS)" != x ] ; then \
2083 rm -rf `echo $(MULTILIB_OPTIONS) | sed -e 's/\// /g'`; \
2086 # Delete all files that users would normally create
2087 # while building and installing GCC.
2088 distclean: clean bytecode.distclean lang.distclean
2089 -rm -f tm.h config.h config2.h tconfig.h hconfig.h md cstamp-h
2090 -rm -f config.status config.run config.cache config.bak
2091 -rm -f Make-lang Make-hooks Make-host Make-target
2092 -rm -f Makefile specs.h options.h *.oaux
2093 -rm -fr stage1 stage2 stage3 stage4
2094 -rm -f */stage1 */stage2 */stage3 */stage4 */include
2095 -rm -f c-parse.output
2098 -rm -f site.exp site.bak testsuite/site.exp testsuite/site.bak
2099 -rm -f testsuite/{gcc,g++}.{log,sum}
2101 # Delete anything likely to be found in the source directory
2102 # that shouldn't be in the distribution.
2103 extraclean: distclean lang.extraclean
2104 -rm -rf =* ./"#"* *~* config/=* config/"#"* config/*~*
2105 -rm -f patch* *.orig *.rej config/patch* config/*.orig config/*.rej
2106 -rm -f config/*/=* config/*/"#"* config/*/*~*
2107 -rm -f config/*/*.orig config/*/*.rej
2108 -rm -f *.dvi *.ps *.oaux *.d *.[zZ] *.gz
2109 -rm -f *.tar *.xtar *diff *.diff.* *.tar.* *.xtar.* *diffs
2110 -rm -f *lose config/*lose config/*/*lose
2111 -rm -f *.s *.s[0-9] *.i install1.texi config/ChangeLog
2112 -rm -f */=* */"#"* */*~*
2113 -rm -f */patch* */*.orig */*.rej
2114 -rm -f */*.dvi */*.oaux */*.d */*.[zZ] */*.gz
2115 -rm -f */*.tar */*.xtar */*diff */*.diff.* */*.tar.* */*.xtar.* */*diffs
2116 -rm -f */*lose */*.s */*.s[0-9] */*.i
2118 # Get rid of every file that's generated from some other file, except for `configure'.
2119 # Most of these files ARE PRESENT in the GCC distribution.
2121 @echo 'This command is intended for maintainers to use; it'
2122 @echo 'deletes files that may need special tools to rebuild.'
2123 $(MAKE) distclean bytecode.maintainer-clean lang.maintainer-clean
2124 -rm -f c-parse.y c-gperf.h
2125 -rm -f c-parse.c c-parse.h c-parse.output
2126 -rm -f cexp.c cexp.output TAGS
2127 -rm -f cpp.info* cpp.??s cpp.*aux
2128 -rm -f gcc.info* gcc.??s gcc.*aux
2130 # Entry points `install' and `uninstall'.
2131 # Also use `install-collect2' to install collect2 when the config files don't.
2133 # The semicolon is to prevent the install.sh -> install default rule
2134 # from doing anything. Having it run true helps avoid problems and
2135 # noise from versions of make which don't like to have null commands.
2136 install: $(INSTALL_TARGET) ; @true
2138 # Copy the compiler files into directories where they will be run.
2139 # Install the driver last so that the window when things are
2141 install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
2142 install-man install-info lang.install-normal install-driver
2144 # Do nothing while making gcc with a cross-compiler. The person who
2145 # makes gcc for the target machine has to know how to put a complete
2146 # gcc together by hand.
2147 install-build: force
2148 @echo You have to install gcc on your target machine by hand.
2150 # Run this on the target machine
2151 # to finish installation of cross compiler.
2152 install-cross-rest: install-float-h-cross
2154 # Install float.h for cross compiler.
2155 # Run this on the target machine!
2156 install-float-h-cross: installdirs
2157 # if [ -f enquire ] ; then true; else false; fi
2158 # Note: don't use -. We should fail right away if enquire was not made.
2159 ./enquire -f > $(tmpdir)/float.h
2160 -rm -f $(libsubdir)/include/float.h
2161 $(INSTALL_DATA) $(tmpdir)/float.h $(libsubdir)/include/float.h
2162 -rm -f $(tmpdir)/float.h
2163 chmod a-x $(libsubdir)/include/float.h
2165 # Create the installation directories.
2167 -if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; chmod a+rx $(prefix) ; fi
2168 -if [ -d $(exec_prefix) ] ; then true ; else mkdir $(exec_prefix) ; chmod a+rx $(exec_prefix) ; fi
2169 -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; chmod a+rx $(libdir) ; fi
2170 -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; chmod a+rx $(libdir)/gcc-lib ; fi
2171 # This dir isn't currently searched by cpp.
2172 # -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi
2173 -if [ -d $(libdir)/gcc-lib/$(target_alias) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias) ; chmod a+rx $(libdir)/gcc-lib/$(target_alias) ; fi
2174 -if [ -d $(libdir)/gcc-lib/$(target_alias)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias)/$(version) ; chmod a+rx $(libdir)/gcc-lib/$(target_alias)/$(version) ; fi
2175 -if [ -d $(libdir)/gcc-lib/$(target_alias)/$(version)/include ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias)/$(version)/include ; chmod a+rx $(libdir)/gcc-lib/$(target_alias)/$(version)/include ; fi
2176 -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi
2177 -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi
2178 -if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; chmod a+rx $(tooldir) ; fi
2179 -if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; chmod a+rx $(assertdir) ; fi
2180 -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; chmod a+rx $(infodir) ; fi
2181 # We don't use mkdir -p to create the parents of mandir,
2182 # because some systems don't support it.
2183 # Instead, we use this technique to create the immediate parent of mandir.
2184 -parent=`echo $(mandir)|sed -e 's@/[^/]*$$@@'`; \
2185 if [ -d $$parent ] ; then true ; else mkdir $$parent ; chmod a+rx $$parent ; fi
2186 -if [ -d $(mandir) ] ; then true ; else mkdir $(mandir) ; chmod a+rx $(mandir) ; fi
2188 # Install the compiler executables built during cross compilation.
2189 install-common: native installdirs $(EXTRA_PARTS) lang.install-common
2190 for file in $(COMPILERS); do \
2191 if [ -f $$file ] ; then \
2192 rm -f $(libsubdir)/$$file; \
2193 $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
2197 for file in $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2) ..; do \
2198 if [ x"$$file" != x.. ]; then \
2199 rm -f $(libsubdir)/$$file; \
2200 $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
2203 for file in $(EXTRA_PARTS) ..; do \
2204 if [ x"$$file" != x.. ]; then \
2205 rm -f $(libsubdir)/$$file; \
2206 $(INSTALL_DATA) $$file $(libsubdir)/$$file; \
2209 # Don't mess with specs if it doesn't exist yet.
2210 -if [ -f specs ] ; then \
2211 rm -f $(libsubdir)/specs; \
2212 $(INSTALL_DATA) specs $(libsubdir)/specs; \
2214 # Install protoize if it was compiled.
2215 -if [ -f protoize$(exeext) ]; \
2217 rm -f $(bindir)/protoize$(exeext); \
2218 $(INSTALL_PROGRAM) protoize$(exeext) $(bindir)/protoize$(exeext); \
2219 rm -f $(bindir)/unprotoize$(exeext); \
2220 $(INSTALL_PROGRAM) unprotoize$(exeext) $(bindir)/unprotoize$(exeext); \
2221 rm -f $(libsubdir)/SYSCALLS.c.X; \
2222 $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X; \
2223 chmod a-x $(libsubdir)/SYSCALLS.c.X; \
2225 -rm -f $(libsubdir)/cpp$(exeext)
2226 $(INSTALL_PROGRAM) cpp$(exeext) $(libsubdir)/cpp$(exeext)
2227 # Install gcov if it was compiled.
2228 -if [ -f gcov$(exeext) ]; \
2230 rm -f $(bindir)/gcov$(exeext); \
2231 $(INSTALL_PROGRAM) gcov$(exeext) $(bindir)/gcov$(exeext); \
2232 chmod a+x $(bindir)/gcov$(exeext); \
2235 # Install the driver program as $(target_alias)-gcc
2236 # and also as either gcc (if native) or $(tooldir)/bin/gcc.
2237 install-driver: xgcc
2238 -if [ -f gcc-cross$(exeext) ] ; then \
2239 rm -f $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
2240 $(INSTALL_PROGRAM) gcc-cross$(exeext) $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
2241 if [ -d $(tooldir)/bin/. ] ; then \
2242 rm -f $(tooldir)/bin/gcc$(exeext); \
2243 $(INSTALL_PROGRAM) gcc-cross$(exeext) $(tooldir)/bin/gcc$(exeext); \
2246 rm -f $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
2247 $(INSTALL_PROGRAM) xgcc$(exeext) $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
2248 rm -f $(bindir)/$(target_alias)-gcc-1$(exeext); \
2249 $(LN) $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target_alias)-gcc-1$(exeext); \
2250 mv $(bindir)/$(target_alias)-gcc-1$(exeext) $(bindir)/$(target_alias)-gcc$(exeext); \
2253 # Install the info files.
2254 # $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir
2255 # to do the install. The sed rule was copied from stmp-int-hdrs.
2256 install-info: doc installdirs lang.install-info
2257 -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info*
2258 for f in cpp.info* gcc.info*; do \
2259 realfile=`echo $$f | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
2260 $(INSTALL_DATA) $$f $(infodir)/$$realfile; \
2262 -chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info*
2264 # Install the man pages.
2265 install-man: installdirs $(srcdir)/gcc.1 $(srcdir)/cccp.1 lang.install-man
2266 -if [ -f gcc-cross ] ; then \
2267 rm -f $(mandir)/$(GCC_CROSS_NAME)$(manext); \
2268 $(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/$(GCC_CROSS_NAME)$(manext); \
2269 chmod a-x $(mandir)/$(GCC_CROSS_NAME)$(manext); \
2271 rm -f $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
2272 $(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
2273 chmod a-x $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
2275 -rm -f $(mandir)/cccp$(manext)
2276 -$(INSTALL_DATA) $(srcdir)/cccp.1 $(mandir)/cccp$(manext)
2277 -chmod a-x $(mandir)/cccp$(manext)
2279 # Install the library.
2280 install-libgcc: libgcc.a installdirs
2281 -if [ -f libgcc.a ] ; then \
2282 rm -f $(libsubdir)/libgcc.a; \
2283 $(INSTALL_DATA) libgcc.a $(libsubdir)/libgcc.a; \
2284 if $(RANLIB_TEST) ; then \
2285 (cd $(libsubdir); $(RANLIB) libgcc.a); else true; fi; \
2286 chmod a-x $(libsubdir)/libgcc.a; \
2289 # Install multiple versions of libgcc.a.
2290 install-multilib: stmp-multilib installdirs
2291 for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
2292 dir=`echo $$i | sed -e 's/;.*$$//'`; \
2293 if [ -d $(libsubdir)/$${dir} ]; then true; else mkdir $(libsubdir)/$${dir}; fi; \
2294 for f in libgcc.a $(EXTRA_MULTILIB_PARTS); do \
2295 rm -f $(libsubdir)/$${dir}/$${f}; \
2296 $(INSTALL_DATA) $${dir}/$${f} $(libsubdir)/$${dir}/$${f}; \
2298 if $(RANLIB_TEST); then \
2299 (cd $(libsubdir)/$${dir}; $(RANLIB) libgcc.a); else true; fi; \
2300 chmod a-x $(libsubdir)/$${dir}/libgcc.a; \
2303 # Install all the header files built in the include subdirectory.
2304 install-headers: install-include-dir $(INSTALL_HEADERS_DIR) $(INSTALL_ASSERT_H)
2305 # Fix symlinks to absolute paths in the installed include directory to
2306 # point to the installed directory, not the build directory.
2307 # Don't need to use LN_S here since we really do need ln -s and no substitutes.
2308 -files=`cd $(libsubdir)/include; find . -type l -print 2>/dev/null`; \
2309 if [ $$? -eq 0 ]; then \
2310 dir=`cd include; pwd`; \
2311 for i in $$files; do \
2312 dest=`ls -ld $(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \
2313 if expr "$$dest" : "$$dir.*" > /dev/null; then \
2314 rm -f $(libsubdir)/include/$$i; \
2315 ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \
2320 # Create or recreate the gcc private include file directory.
2321 install-include-dir: installdirs
2322 -rm -rf $(libsubdir)/include
2323 mkdir $(libsubdir)/include
2324 -chmod a+rx $(libsubdir)/include
2326 # Install the include directory using tar.
2327 install-headers-tar: stmp-headers $(STMP_FIXPROTO) install-include-dir
2329 tar -cf - .; exit 0) | (cd $(libsubdir)/include; tar $(TAROUTOPTS) - )
2330 # /bin/sh on some systems returns the status of the first tar,
2331 # and that can lose with GNU tar which always writes a full block.
2332 # So use `exit 0' to ignore its exit status.
2334 # Install the include directory using cpio.
2335 install-headers-cpio: stmp-headers $(STMP_FIXPROTO) install-include-dir
2336 (cd include; find . -print) | (cd include; cpio -pdum $(libsubdir)/include)
2338 # Put assert.h where it won't override GNU libc's assert.h.
2339 # It goes in a dir that is searched after GNU libc's headers;
2340 # thus, the following conditionals are no longer needed.
2341 # But it's not worth deleting them now.
2342 ## Don't replace the assert.h already there if it is not from GCC.
2343 ## This code would be simpler if it tested for -f ... && ! grep ...
2344 ## but supposedly the ! operator is missing in sh on some systems.
2345 install-assert-h: assert.h installdirs
2346 if [ -f $(assertdir)/assert.h ]; \
2348 if grep "__eprintf" $(assertdir)/assert.h >/dev/null; \
2350 rm -f $(assertdir)/assert.h; \
2351 $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
2352 chmod a-x $(assertdir)/assert.h; \
2356 rm -f $(assertdir)/assert.h; \
2357 $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
2358 chmod a-x $(assertdir)/assert.h; \
2361 # Use this target to install the program `collect2' under the name `ld'.
2362 install-collect2: collect2 installdirs
2363 $(INSTALL_PROGRAM) collect2$(exeext) $(libsubdir)/ld$(exeext)
2364 # Install the driver program as $(libsubdir)/gcc for collect2.
2365 $(INSTALL_PROGRAM) xgcc$(exeext) $(libsubdir)/gcc$(exeext)
2367 # Cancel installation by deleting the installed files.
2368 uninstall: lang.uninstall
2369 -rm -rf $(libsubdir)
2370 -rm -rf $(bindir)/$(GCC_INSTALL_NAME)$(exeext)
2371 -rm -rf $(bindir)/$(GCC_CROSS_NAME)$(exeext)
2372 -rm -rf $(bindir)/protoize$(exeext)
2373 -rm -rf $(bindir)/unprotoize$(exeext)
2374 -rm -rf $(mandir)/$(GCC_INSTALL_NAME)$(manext)
2375 -rm -rf $(mandir)/$(GCC_CROSS_NAME)$(manext)
2376 -rm -rf $(mandir)/cccp$(manext)
2377 -rm -rf $(mandir)/protoize$(manext)
2378 -rm -rf $(mandir)/unprotoize$(manext)
2380 # These targets are for the dejagnu testsuites. The file site.exp
2381 # contains global variables that all the testsuites will use.
2383 # Set to $(target_alias)/ for cross.
2384 target_subdir = @target_subdir@
2386 site.exp: ./config.status Makefile
2387 @echo "Making a new config file..."
2390 -@mv site.exp site.bak
2391 @echo "## these variables are automatically generated by make ##" > ./tmp0
2392 @echo "# Do not edit here. If you wish to override these values" >> ./tmp0
2393 @echo "# add them to the last section" >> ./tmp0
2394 @echo "set rootme \"`pwd`\"" >> ./tmp0
2395 @echo "set srcdir \"`cd ${srcdir}; pwd`\"" >> ./tmp0
2396 @echo "set host_triplet $(host_canonical)" >> ./tmp0
2397 @echo "set build_triplet $(build_canonical)" >> ./tmp0
2398 @echo "set target_triplet $(target)" >> ./tmp0
2399 @echo "set target_alias $(target_alias)" >> ./tmp0
2400 # CFLAGS is set even though it's empty to show we reserve the right to set it.
2401 @echo "set CFLAGS \"\"" >> ./tmp0
2402 @echo "set CXXFLAGS \"-I$(objdir)/../$(target_subdir)libio -I\$$srcdir/../libg++/src -I\$$srcdir/../libio -I\$$srcdir/../libstdc++ -I\$$srcdir/../libstdc++/stl -L$(objdir)/../$(target_subdir)libg++ -L$(objdir)/../$(target_subdir)libstdc++\"" >> ./tmp0
2403 # If newlib has been configured, we need to pass -B to gcc so it can find
2404 # newlib's crt0.o if it exists. This will cause a "path prefix not used"
2405 # message if it doesn't, but the testsuite is supposed to ignore the message -
2406 # it's too difficult to tell when to and when not to pass -B (not all targets
2407 # have crt0's). We could only add the -B if ../newlib/crt0.o exists, but that
2408 # seems like too selective a test.
2409 # ??? Another way to solve this might be to rely on linker scripts. Then
2410 # theoretically the -B won't be needed.
2411 # We also need to pass -L ../ld so that the linker can find ldscripts.
2412 @if [ -d $(objdir)/../$(target_subdir)newlib ] ; then \
2413 echo "set newlib_cflags \"-I$(objdir)/../$(target_subdir)newlib/targ-include -I\$$srcdir/../newlib/libc/include\"" >> ./tmp0; \
2414 echo "set newlib_ldflags \"-B$(objdir)/../$(target_subdir)newlib/\"" >> ./tmp0; \
2415 echo "append CFLAGS \" \$$newlib_cflags\"" >> ./tmp0; \
2416 echo "append CXXFLAGS \" \$$newlib_cflags\"" >> ./tmp0; \
2417 echo "append LDFLAGS \" \$$newlib_ldflags\"" >> ./tmp0; \
2420 @if [ -d $(objdir)/../ld ] ; then \
2421 echo "append LDFLAGS \" -L$(objdir)/../ld\"" >> ./tmp0; \
2424 @if [ $(build_canonical) != $(host_canonical) ] ; then \
2425 echo "set tmpdir /tmp" >> ./tmp0 ; \
2426 else echo "set tmpdir $(objdir)/testsuite" >> ./tmp0 ; \
2428 @echo "set srcdir \"\$${srcdir}/testsuite\"" >> ./tmp0
2429 @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
2430 @cat ./tmp0 > site.exp
2431 @cat site.bak | sed \
2432 -e '1,/^## All variables above are.*##/ d' >> site.exp
2435 CHECK_TARGETS = check-gcc check-g++ check-g77
2437 check: $(CHECK_TARGETS)
2439 testsuite/site.exp: site.exp
2440 if [ -d testsuite ]; then \
2445 rm -rf testsuite/site.exp
2446 cp site.exp testsuite/site.exp
2448 check-g++: testsuite/site.exp
2449 -rootme=`pwd`; export rootme; \
2450 srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
2452 EXPECT=${EXPECT} ; export EXPECT ; \
2453 if [ -f $${rootme}/../expect/expect ] ; then \
2454 TCL_LIBRARY=$${srcdir}/../tcl/library ; \
2455 export TCL_LIBRARY ; fi ; \
2456 $(RUNTEST) --tool g++ $(RUNTESTFLAGS)
2458 check-gcc: testsuite/site.exp
2459 -rootme=`pwd`; export rootme; \
2460 srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
2462 EXPECT=${EXPECT} ; export EXPECT ; \
2463 if [ -f $${rootme}/../expect/expect ] ; then \
2464 TCL_LIBRARY=$${srcdir}/../tcl/library ; \
2465 export TCL_LIBRARY ; fi ; \
2466 $(RUNTEST) --tool gcc $(RUNTESTFLAGS)
2468 check-g77: testsuite/site.exp
2469 -rootme=`pwd`; export rootme; \
2470 srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
2472 EXPECT=${EXPECT} ; export EXPECT ; \
2473 if [ -f $${rootme}/../expect/expect ] ; then \
2474 TCL_LIBRARY=$${srcdir}/../tcl/library ; \
2475 export TCL_LIBRARY ; fi ; \
2476 $(RUNTEST) --tool g77 $(RUNTESTFLAGS)
2478 # These exist for maintenance purposes.
2480 # Update the tags table.
2484 mv -f c-parse.[ch] objc-parse.c cexp.c =*.[chy] temp; \
2485 etags *.y *.h *.c; \
2489 # Create the distribution tar file.
2490 #dist: gcc-$(version).tar.gz
2493 gcc.xtar.gz: gcc.xtar
2494 gzip --best < gcc.xtar > tmp-gcc.xtar.gz
2495 mv tmp-gcc.xtar.gz gcc.xtar.gz
2497 #gcc-$(version).tar.gz: gcc-$(version).tar
2498 # gzip < gcc-$(version).tar > gcc-$(version).tar.gz
2500 #gcc-$(version).tar:
2502 # Make the distribution.
2503 tar -chf gcc.xtar gcc-$(version)
2505 # This target exists to do the initial work before the language specific
2507 distdir-start: doc $(srcdir)/INSTALL $(srcdir)/c-parse.y $(srcdir)/c-gperf.h \
2508 $(srcdir)/objc-parse.y $(srcdir)/c-parse.c $(srcdir)/objc-parse.c \
2510 @if grep -s "for version ${mainversion}" gcc.texi > /dev/null; \
2512 else echo "You must update the version number in \`gcc.texi'"; sleep 10;\
2514 # Update the version number in README
2515 awk '$$1 " " $$2 " " $$3 == "This directory contains" \
2516 { $$6 = version; print $$0 } \
2517 $$1 " " $$2 " " $$3 != "This directory contains"' \
2518 version=$(version) README > tmp.README
2519 mv tmp.README README
2520 -rm -rf gcc-$(version) tmp
2521 # Put all the files in a temporary subdirectory
2522 # which has the name that we want to have in the tar file.
2527 for file in *[0-9a-zA-Z+]; do \
2531 for file in *[0-9a-zA-Z+]; do \
2532 if test -d $$file && test "$$file" != RCS; then \
2533 mkdir ../tmp/config/$$file; \
2535 for subfile in *[0-9a-zA-Z+]; do \
2536 $(LN) $$subfile ../../tmp/config/$$file; \
2540 $(LN) $$file ../tmp/config; \
2544 for file in *[0-9a-zA-Z+]; do \
2545 $(LN) $$file ../tmp/ginclude; \
2548 for file in *[0-9a-zA-Z+]; do \
2549 $(LN) $$file ../tmp/objc; \
2553 # Finish making `distdir', after the languages have done their thing.
2555 mv tmp gcc-$(version)
2556 # Get rid of everything we don't want in the distribution. We'd want
2557 # this to use Makefile.in, but it doesn't have the `lang.foo' targets
2559 cd gcc-$(version); make extraclean
2561 distdir: distdir-start lang.distdir distdir-finish
2563 # make diff oldversion=M.N
2564 # creates a diff file between an older distribution and this one.
2565 # The -P option assumes this is GNU diff.
2567 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h \
2568 -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c \
2569 -x bi-parser.h -x TAGS \
2570 -x "gcc.??" -x "gcc.??s" -x gcc.aux -x "gcc.info*" \
2571 -x "cpp.??" -x "cpp.??s" -x cpp.aux -x "cpp.info*" \
2572 $(LANG_DIFF_EXCLUDES) \
2573 gcc-$(oldversion) gcc-$(version) > diffs
2576 # Only build the C compiler for stage1, because that is the only one that
2577 # we can guarantee will build with the native compiler, and also it is the
2578 # only thing useful for building stage2.
2579 $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)"
2581 # This used to define ALLOCA as empty, but that would lead to bad results
2582 # for a subsequent `make install' since that would not have ALLOCA empty.
2583 # To prevent `make install' from compiling alloca.o and then relinking cc1
2584 # because alloca.o is newer, we permit these recursive makes to compile
2585 # alloca.o. Then cc1 is newer, so it won't have to be relinked.
2586 $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
2588 $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
2590 bootstrap-lean: force
2591 # Only build the C compiler for stage1, because that is the only one that
2592 # we can guarantee will build with the native compiler, and also it is the
2593 # only thing useful for building stage2.
2594 $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)"
2596 # This used to define ALLOCA as empty, but that would lead to bad results
2597 # for a subsequent `make install' since that would not have ALLOCA empty.
2598 # To prevent `make install' from compiling alloca.o and then relinking cc1
2599 # because alloca.o is newer, we permit these recursive makes to compile
2600 # alloca.o. Then cc1 is newer, so it won't have to be relinked.
2601 $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
2604 $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
2607 $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
2609 $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
2612 $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
2614 # Compare the object files in the current directory with those in the
2617 # ./ avoids bug in some versions of tail.
2620 for file in *$(objext); do \
2621 tail +16c ./$$file > tmp-foo1; \
2622 tail +16c stage2/$$file > tmp-foo2 \
2623 && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
2625 for dir in tmp-foo $(SUBDIRS); do \
2626 if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2627 for file in $$dir/*$(objext); do \
2628 tail +16c ./$$file > tmp-foo1; \
2629 tail +16c stage2/$$file > tmp-foo2 \
2630 && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
2635 if [ -f .bad_compare ]; then \
2636 echo "Bootstrap comparison failure!"; \
2642 # ./ avoids bug in some versions of tail.
2645 for file in *$(objext); do \
2646 tail +16c ./$$file > tmp-foo1; \
2647 tail +16c stage2/$$file > tmp-foo2 \
2648 && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
2650 for dir in tmp-foo $(SUBDIRS); do \
2651 if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2652 for file in $$dir/*$(objext); do \
2653 tail +16c ./$$file > tmp-foo1; \
2654 tail +16c stage2/$$file > tmp-foo2 \
2655 && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
2660 if [ -f .bad_compare ]; then \
2661 echo "Bootstrap comparison failure!"; \
2664 else rm -rf stage2; \
2667 # Similar, but compare with stage3 directory
2669 for file in *$(objext); do \
2670 tail +16c ./$$file > tmp-foo1; \
2671 tail +16c stage3/$$file > tmp-foo2 2>/dev/null \
2672 && (cmp tmp-foo1 tmp-foo2 || echo $$file differs) || true; \
2674 for dir in tmp-foo $(SUBDIRS); do \
2675 if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2676 for file in $$dir/*$(objext); do \
2677 tail +16c ./$$file > tmp-foo1; \
2678 tail +16c stage3/$$file > tmp-foo2 2>/dev/null \
2679 && (cmp tmp-foo1 tmp-foo2 || echo $$file differs) || true; \
2685 # Compare the object files in the current directory with those in the
2686 # stage2 directory. Use gnu cmp (diffutils v2.4 or later) to avoid
2687 # running tail and the overhead of twice copying each object file.
2690 for file in *$(objext); do \
2691 cmp --ignore-initial=16 $$file stage2/$$file || true ; \
2693 for dir in tmp-foo $(SUBDIRS); do \
2694 if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2695 for file in $$dir/*$(objext); do \
2696 cmp --ignore-initial=16 $$file stage2/$$file || true ; \
2701 # Similar, but compare with stage3 directory
2703 for file in *$(objext); do \
2704 cmp --ignore-initial=16 $$file stage3/$$file || true ; \
2706 for dir in tmp-foo $(SUBDIRS); do \
2707 if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2708 for file in $$dir/*$(objext); do \
2709 cmp --ignore-initial=16 $$file stage3/$$file || true ; \
2714 # Copy the object files from a particular stage into a subdirectory.
2716 -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
2717 -for dir in . $(SUBDIRS) ; \
2719 if [ -d stage1/$$dir ] ; then true ; else mkdir stage1/$$dir ; fi ; \
2721 -mv $(STAGESTUFF) stage1
2722 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2723 # dir will work properly.
2724 -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage1 ; else true ; fi
2725 -if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage1 ; else true ; fi
2726 -if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage1 ; else true ; fi
2727 -rm -f stage1/libgcc.a
2729 -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libgcc.a; else true; fi
2730 -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
2731 cp stage1/$${f} . ; \
2734 stage1: force stage1-start lang.stage1
2737 -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
2738 -for dir in . $(SUBDIRS) ; \
2740 if [ -d stage2/$$dir ] ; then true ; else mkdir stage2/$$dir ; fi ; \
2742 -mv $(STAGESTUFF) stage2
2743 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2744 # dir will work properly.
2745 -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage2 ; else true ; fi
2746 -if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage2 ; else true ; fi
2747 -if [ -f collect-ld ] ; then $(LN_S) ../collect-ld$(exeext) stage2 ; else true ; fi
2748 -rm -f stage2/libgcc.a
2750 -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libgcc.a; else true; fi
2751 -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
2752 cp stage2/$${f} . ; \
2755 stage2: force stage2-start lang.stage2
2758 -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
2759 -for dir in . $(SUBDIRS) ; \
2761 if [ -d stage3/$$dir ] ; then true ; else mkdir stage3/$$dir ; fi ; \
2763 -mv $(STAGESTUFF) stage3
2764 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2765 # dir will work properly.
2766 -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage3 ; else true ; fi
2767 -if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage3 ; else true ; fi
2768 -if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage3 ; else true ; fi
2769 -rm -f stage3/libgcc.a
2771 -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libgcc.a; else true; fi
2772 -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
2773 cp stage3/$${f} . ; \
2776 stage3: force stage3-start lang.stage3
2779 -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
2780 -for dir in . $(SUBDIRS) ; \
2782 if [ -d stage4/$$dir ] ; then true ; else mkdir stage4/$$dir ; fi ; \
2784 -mv $(STAGESTUFF) stage4
2785 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2786 # dir will work properly.
2787 -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage4 ; else true ; fi
2788 -if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage4 ; else true ; fi
2789 -if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage4 ; else true ; fi
2790 -rm -f stage4/libgcc.a
2792 -if $(RANLIB_TEST) ; then $(RANLIB) stage4/libgcc.a; else true; fi
2793 -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
2794 cp stage4/$${f} . ; \
2797 stage4: force stage4-start lang.stage4
2799 # Copy just the executable files from a particular stage into a subdirectory,
2800 # and delete the object files. Use this if you're just verifying a version
2801 # that is pretty sure to work, and you are short of disk space.
2802 risky-stage1: stage1
2805 risky-stage2: stage2
2808 risky-stage3: stage3
2811 risky-stage4: stage4
2814 #In GNU Make, ignore whether `stage*' exists.
2815 .PHONY: stage1 stage2 stage3 stage4 clean maintainer-clean TAGS bootstrap
2816 .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4