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 # WARN_CFLAGS are the warning flags to pass to stage2 and stage3. It is
57 # separate from BOOT_CFLAGS because people tend to override optimization
58 # flags and we'd like them to still have warnings turned on. They are free
59 # to explicitly turn warnings off if they wish.
60 # XCFLAGS is used for most compilations but not when using the GCC just built.
61 # TCFLAGS is used for compilations with the GCC just built.
65 BOOT_CFLAGS = -O2 $(CFLAGS)
66 WARN_CFLAGS = -W -Wall
67 # These exists to be overridden by the x-* and t-* files, respectively.
84 # on sysV, define this as cp.
86 # Some systems may be missing symbolic links, regular links, or both.
87 # Allow configure to check this and use "ln -s", "ln", or "cp" as appropriate.
90 # These permit overriding just for certain files.
91 INSTALL_PROGRAM = @INSTALL_PROGRAM@
92 INSTALL_DATA = @INSTALL_DATA@
96 # For GNUmake: let us decide what gets passed to recursive makes.
100 # Define this as & to perform parallel make on a Sequent.
101 # Note that this has some bugs, and it seems currently necessary
102 # to compile all the gen* files first by hand to avoid erroneous results.
105 # How to invoke ranlib.
107 # Test to use to see whether ranlib exists on the system.
108 RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
110 # Compiler to use for compiling libgcc1.a.
111 # OLDCC should not be the GNU C compiler,
112 # since that would compile typical libgcc1.a functions such as mulsi3
113 # into infinite recursions.
116 # CFLAGS for use with OLDCC, for compiling libgcc1.a.
117 # NOTE: -O does not work on some Unix systems!
120 # Version of ar to use when compiling libgcc1.a.
124 # Target to use when installing include directory. Either
125 # install-headers-tar or install-headers-cpio.
126 INSTALL_HEADERS_DIR = @build_install_headers_dir@
128 # Header files that are made available under the same name
129 # to programs compiled with GCC.
130 USER_H = $(srcdir)/ginclude/stdarg.h $(srcdir)/ginclude/stddef.h \
131 $(srcdir)/ginclude/varargs.h $(srcdir)/ginclude/va-alpha.h \
132 $(srcdir)/ginclude/va-h8300.h $(srcdir)/ginclude/va-i860.h \
133 $(srcdir)/ginclude/va-i960.h $(srcdir)/ginclude/va-mips.h \
134 $(srcdir)/ginclude/va-m88k.h $(srcdir)/ginclude/va-mn10200.h \
135 $(srcdir)/ginclude/va-mn10300.h $(srcdir)/ginclude/va-pa.h \
136 $(srcdir)/ginclude/va-pyr.h $(srcdir)/ginclude/va-sparc.h \
137 $(srcdir)/ginclude/va-clipper.h $(srcdir)/ginclude/va-spur.h \
138 $(srcdir)/ginclude/va-m32r.h $(srcdir)/ginclude/va-sh.h \
139 $(srcdir)/ginclude/va-v850.h $(srcdir)/ginclude/va-arc.h \
140 $(srcdir)/ginclude/iso646.h $(srcdir)/ginclude/va-ppc.h \
141 $(srcdir)/ginclude/proto.h $(EXTRA_HEADERS) \
142 $(LANG_EXTRA_HEADERS)
144 # Target to use whe installing assert.h. Some systems may
145 # want to set this empty.
146 INSTALL_ASSERT_H = install-assert-h
148 # The GCC to use for compiling libgcc2.a, enquire, and libgcc1-test.
149 # Usually the one we just built.
150 # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
151 GCC_FOR_TARGET = ./xgcc -B./
153 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
154 # It omits XCFLAGS, and specifies -B./.
155 # It also specifies -I./include to find, e.g., stddef.h.
156 GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) -I./include $(TCFLAGS)
158 # Special flags for compiling enquire.
159 # We disable optimization to make floating point more reliable.
160 ENQUIRE_CFLAGS = -DNO_MEM -DNO_LONG_DOUBLE_IO -O0
161 ENQUIRE_LDFLAGS = $(LDFLAGS)
163 # Sed command to transform gcc to installed name. Overwritten by configure.
164 program_transform_name = @program_transform_name@
165 program_transform_cross_name = s,^,$(target_alias)-,
167 # Tools to use when building a cross-compiler.
168 # These are used because `configure' appends `cross-make'
169 # to the makefile when making a cross-compiler.
171 TARGET_TOOLPREFIX = $(tooldir)/bin/
172 AR_FOR_TARGET = $(TARGET_TOOLPREFIX)ar
173 AR_FOR_TARGET_FLAGS = rc
174 RANLIB_FOR_TARGET = $(TARGET_TOOLPREFIX)ranlib
175 RANLIB_TEST_FOR_TARGET = [ -f $(TARGET_TOOLPREFIX)ranlib ]
177 # Dir to search for system headers. Overridden by cross-make.
178 SYSTEM_HEADER_DIR = /usr/include
180 # Control whether to run fixproto.
181 STMP_FIXPROTO = stmp-fixproto
183 # Test to see whether <float.h> exists in the system header files,
184 # and is not derived from GCC.
186 [ -f $(SYSTEM_HEADER_DIR)/float.h ] && \
187 if grep 'ifndef _FLOAT_H___' $(SYSTEM_HEADER_DIR)/float.h >/dev/null; \
191 # Test to see whether <limits.h> exists in the system header files.
192 LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ]
194 # There may be a premade insn-attrtab.c for this machine.
195 # (You could rebuild it with genattrtab as usual, but it takes a long time.)
196 # PREMADE_ATTRTAB is the file name of the file to use.
197 # PREMADE_ATTRTAB_MD is the md file it corresponds to.
198 PREMADE_ATTRTAB_MD = Makefile # Guaranteed not to cmp equal to md.
202 target_alias=@target_alias@
203 xmake_file=@dep_host_xmake_file@
204 tmake_file=@dep_tmake_file@
205 out_file=$(srcdir)/config/@out_file@
206 out_object_file=@out_object_file@
207 md_file=$(srcdir)/config/@md_file@
208 tm_file=@tm_file_list@
209 build_xm_file=@build_xm_file_list@
210 host_xm_file=@host_xm_file_list@
211 lang_specs_files=@lang_specs_files@
212 lang_options_files=@lang_options_files@
213 GCC_THREAD_FILE=@thread_file@
214 GTHREAD_FLAGS=@gthread_flags@
216 mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
218 # Common prefix for installation directories.
219 # NOTE: This directory must exist when you start installation.
221 # Directory in which to put localized header files. On the systems with
222 # gcc as the native cc, `local_prefix' may not be `prefix' which is
224 # NOTE: local_prefix *should not* default from prefix.
225 local_prefix = @local_prefix@
226 # Directory in which to put host dependent programs and libraries
227 exec_prefix = @exec_prefix@
228 # Directory in which to put the executable for the command `gcc'
230 # Directory in which to put the directories used by the compiler.
232 # Directory in which the compiler finds executables, libraries, etc.
233 libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(version)
234 # Directory in which the compiler finds g++ includes.
235 gxx_include_dir= @gxx_include_dir@
236 # Directory in which the old g++ header files may be found.
237 old_gxx_include_dir= $(libdir)/g++-include
238 # Directory to search for site-specific includes.
239 includedir = $(local_prefix)/include
240 # assertdir is overridden in cross-make.
241 # (But this currently agrees with what is in cross-make.)
242 assertdir = $(tooldir)/include
243 # where the info files go
245 # Extension (if any) to put in installed man-page filename.
248 exeext = @host_exeext@
249 build_exeext = @build_exeext@
251 # Directory in which to put man pages.
252 mandir = @mandir@/man1
253 # Directory in which to find other cross-compilation tools and headers.
254 # Used in install-cross.
255 tooldir = $(exec_prefix)/$(target_alias)
256 # Dir for temp files.
259 # Additional system libraries to link with.
262 # Change this to a null string if obstacks are installed in the
266 # Specify the rule for actually making libgcc.a,
268 # and the rule for installing it.
269 INSTALL_LIBGCC = install-libgcc
271 # Specify the rule for actually making libgcc1.a.
272 # The value may be empty; that means to do absolutely nothing
273 # with or for libgcc1.a.
276 # Specify the rule for making libgcc1.a for a cross-compiler.
277 # The default rule assumes that libgcc1.a is supplied by the user.
278 CROSS_LIBGCC1 = libgcc1.cross
280 # Specify the rule for actually making libgcc2.a.
283 # Options to use when compiling libgcc2.a.
284 # -g1 causes output of debug info only for file-scope entities.
285 # we use this here because that should be enough, and also
286 # so that -g1 will be tested.
288 # -fexceptions is necessary for eh.o now that the exceptions are
289 # the default for g++ only.
290 LIBGCC2_DEBUG_CFLAGS = -g1
291 LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) $(GTHREAD_FLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -fexceptions @inhibit_libc@
293 # Additional options to use when compiling libgcc2.a.
294 # Some targets override this to -Iinclude
297 # Additional target-dependent options for compiling libgcc2.a.
298 TARGET_LIBGCC2_CFLAGS =
300 # Things which must be built before building libgcc2.a.
301 # Some targets override this to stmp-int-hdrs
304 # Enquire target (This is a variable so that a target can choose not to
308 # libgcc1-test target (must also be overridable for a target)
309 LIBGCC1_TEST = libgcc1-test
311 # List of extra executables that should be compiled for this target machine
312 # that are used for compiling from source code to object code.
313 # The rules for compiling them should be in the t-* file for the machine.
314 EXTRA_PASSES =@extra_passes@
316 # Like EXTRA_PASSES, but these are used when linking.
317 EXTRA_PROGRAMS = @extra_programs@
319 # List of extra object files that should be compiled for this target machine.
320 # The rules for compiling them should be in the t-* file for the machine.
321 EXTRA_PARTS = @extra_parts@
323 # List of extra object files that should be compiled and linked with
324 # compiler proper (cc1, cc1obj, cc1plus).
325 EXTRA_OBJS = @extra_objs@
327 # List of extra object files that should be compiled and linked with
329 EXTRA_GCC_OBJS =@host_extra_gcc_objs@
331 # List of additional header files to install.
332 # Often this is edited directly by `configure'.
333 EXTRA_HEADERS =@extra_headers_list@
335 # Set this to `ld' to enable use of collect2.
336 USE_COLLECT2 = @will_use_collect2@
337 MAYBE_USE_COLLECT2 = @maybe_use_collect2@
338 # It is convenient for configure to add the assignment at the beginning,
339 # so don't override it here.
342 # List of extra C and assembler files to add to libgcc1.a.
343 # Assembler files should have names ending in `.asm'.
346 # List of extra C and assembler files to add to libgcc2.a.
347 # Assembler files should have names ending in `.asm'.
350 # Default float.h source to use for cross-compiler.
351 # This is overridden by configure.
352 CROSS_FLOAT_H=$(srcdir)/config/float-@float_format@.h
354 # Program to convert libraries.
357 # Control whether header files are installed.
358 INSTALL_HEADERS=install-headers
360 # Options for tar when copying trees. So HPUX can override it.
363 # Select which version of fixincludes to use (I.E. regular versus SVR4)
364 # This value is overridden directly by configure.
365 FIXINCLUDES = @fixincludes@
367 # Additional directories of header files to run fixincludes on.
368 # These should be directories searched automatically by default
369 # just as /usr/include is.
370 # *Do not* use this for directories that happen to contain
371 # header files, but are not searched automatically by default.
372 # On most systems, this is empty.
373 OTHER_FIXINCLUDES_DIRS=
375 # A list of all the language-specific executables.
376 # This is overridden by configure.
377 COMPILERS = cc1$(exeext) @all_compilers@
379 # List of things which should already be built whenever we try to use xgcc
380 # to compile anything (without linking).
381 GCC_PASSES=xgcc cc1 cpp $(EXTRA_PASSES)
383 # List of things which should already be built whenever we try to use xgcc
385 GCC_PARTS=$(GCC_PASSES) $(LIBGCC) $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS)
387 # Directory to link to, when using the target `maketest'.
390 # Guaranteed to not exist when not passing md through cpp.
391 # This value is overridden directly by configure.
392 MD_FILE = md-cpp-not-used
394 # Flags to use when cross-building GCC.
395 # Prefix to apply to names of object files when using them
396 # to run on the machine we are compiling on.
398 # Prefix to apply to names of object files when compiling them
399 # to run on the machine we are compiling on.
400 # The default for this variable is chosen to keep these rules
401 # out of the way of the other rules for compiling the same source files.
404 HOST_CFLAGS=$(ALL_CFLAGS)
406 HOST_LDFLAGS=$(LDFLAGS)
407 HOST_CPPFLAGS=$(ALL_CPPFLAGS)
408 HOST_ALLOCA=$(ALLOCA)
409 HOST_MALLOC=$(MALLOC)
410 HOST_OBSTACK=$(OBSTACK)
412 # Actual name to use when installing a native compiler.
413 GCC_INSTALL_NAME = `t='$(program_transform_name)'; echo gcc | sed -e $$t`
415 # Actual name to use when installing a cross-compiler.
416 GCC_CROSS_NAME = `t='$(program_transform_cross_name)'; echo gcc | sed -e $$t`
418 # Choose the real default target.
421 # Choose the real install target.
422 INSTALL_TARGET=install-normal
424 # Source for float.h. Overridden by cross-make.
427 # Setup the testing framework, if you have one
428 EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
429 echo $${rootme}/../expect/expect ; \
430 else echo expect ; fi`
432 RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
433 echo $${srcdir}/../dejagnu/runtest ; \
434 else echo runtest; fi`
437 # Extra symbols for fixproto to define when parsing headers.
440 # Extra flags to use when compiling crt{begin,end}.o.
443 # Extra flags to use when compiling [m]crt0.o.
446 # "t" or nothing, for building multilibbed versions of, say, crtbegin.o.
449 # End of variables for you to override.
451 # Definition of `all' is here so that new rules inserted by sed
452 # do not specify the default target.
453 # The real definition is under `all.internal' (for native compilers)
454 # or `all.cross' (for cross compilers).
457 # This tells GNU Make version 3 not to put all variables in the environment.
460 # sed inserts variable overrides after the following line.
474 # Now figure out from those variables how to compile and link.
478 # IN_GCC tells obstack.h that we are using gcc's <stddef.h> file.
479 # ??? IN_GCC should be obsolete now.
480 INTERNAL_CFLAGS = $(CROSS) -DIN_GCC @extra_c_flags@
482 # This is the variable actually used when we compile.
483 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS) \
484 @DEFS@ $(SCHED_CFLAGS)
487 ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
489 # Even if ALLOCA is set, don't use it if compiling with GCC.
490 USE_ALLOCA= ${ALLOCA}
491 USE_HOST_ALLOCA= ` case "${HOST_ALLOCA}" in ?*) echo ${HOST_PREFIX}${HOST_ALLOCA} ;; esac `
492 USE_HOST_MALLOC= ` case "${HOST_MALLOC}" in ?*) echo ${HOST_PREFIX}${HOST_MALLOC} ;; esac `
493 USE_HOST_OBSTACK= ` case "${HOST_OBSTACK}" in ?*) echo ${HOST_PREFIX}${HOST_OBSTACK} ;; esac `
495 # Dependency on obstack, alloca, malloc or whatever library facilities
496 # are not installed in the system libraries.
497 # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
498 LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC)
500 # Likewise, for use in the tools that must run on this machine
501 # even if we are cross-building GCC.
502 # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
503 HOST_LIBDEPS= $(HOST_PREFIX)$(HOST_OBSTACK) $(HOST_PREFIX)$(HOST_ALLOCA) $(HOST_PREFIX)$(HOST_MALLOC)
505 # How to link with both our special library facilities
506 # and the system's installed libraries.
507 LIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC) $(CLIB)
509 # Likewise, for use in the tools that must run on this machine
510 # even if we are cross-building GCC.
511 HOST_LIBS = $(USE_HOST_OBSTACK) $(USE_HOST_ALLOCA) $(USE_HOST_MALLOC) \
514 HOST_RTL = $(HOST_PREFIX)rtl.o
515 HOST_RTLANAL = $(HOST_PREFIX)rtlanal.o
516 HOST_PRINT = $(HOST_PREFIX)print-rtl.o
518 # Specify the directories to be searched for header files.
519 # Both . and srcdir are used, in that order,
520 # so that tm.h and config.h will be found in the compilation
521 # subdirectory rather than in the source directory.
522 INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config
524 # Always use -I$(srcdir)/config when compiling.
526 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
528 # This tells GNU make version 3 not to export all the variables
529 # defined in this file into the environment.
532 # Support for additional languages (other than c and objc).
533 # ??? objc can be supported this way too (leave for later).
535 # These next lines are overridden by configure.
536 LANG_MAKEFILES = @all_lang_makefiles@
537 LANG_STAGESTUFF = @all_stagestuff@
538 LANG_DIFF_EXCLUDES = @all_diff_excludes@
539 LANG_LIB2FUNCS = @all_lib2funcs@
540 LANG_EXTRA_HEADERS = @all_headers@
542 # Flags to pass to recursive makes.
543 # CC is set by configure. Hosts without symlinks need special handling
544 # because we need CC="stage1/xgcc -Bstage1/" to work in the language
546 # ??? The choices here will need some experimenting with.
548 "AR_FLAGS=$(AR_FLAGS)" \
549 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
551 "BISONFLAGS=$(BISONFLAGS)" \
552 "CC=@cc_set_by_configure@" \
555 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
556 "LDFLAGS=$(LDFLAGS)" \
558 "LEXFLAGS=$(LEXFLAGS)" \
561 "MAKEINFO=$(MAKEINFO)" \
562 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
563 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
564 "RANLIB_TEST_FOR_TARGET=$(RANLIB_TEST_FOR_TARGET)" \
566 "STAGE_PREFIX=@stage_prefix_set_by_configure@" \
568 "build_exeext=$(build_exeext)" \
570 "exec_prefix=$(exec_prefix)" \
572 "local_prefix=$(local_prefix)" \
573 "gxx_include_dir=$(gxx_include_dir)" \
574 "tooldir=$(tooldir)" \
576 "libsubdir=$(libsubdir)"
578 # Lists of files for various purposes.
580 # Language-specific object files for C and Objective C.
581 C_AND_OBJC_OBJS = c-lex.o c-pragma.o c-decl.o c-typeck.o c-convert.o \
582 c-aux-info.o c-common.o c-iterate.o @extra_c_objs@
584 # Language-specific object files for C.
585 C_OBJS = c-parse.o c-lang.o $(C_AND_OBJC_OBJS)
587 SCHED_PREFIX = @sched_prefix@
588 SCHED_CFLAGS = @sched_cflags@
590 # Language-independent object files.
591 OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
592 function.o stmt.o except.o expr.o calls.o expmed.o explow.o optabs.o \
593 varasm.o rtl.o print-rtl.o rtlanal.o emit-rtl.o genrtl.o real.o regmove.o \
594 dbxout.o sdbout.o dwarfout.o dwarf2out.o xcoffout.o bitmap.o alias.o \
595 integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \
596 regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o \
597 insn-peep.o reorg.o $(SCHED_PREFIX)sched.o final.o recog.o reg-stack.o \
598 insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \
599 profile.o insn-attrtab.o $(out_object_file) getpwd.o $(EXTRA_OBJS) convert.o
601 # GEN files are listed separately, so they can be built before doing parallel
602 # makes for cc1 or cc1plus. Otherwise sequent parallel make attempts to load
603 # them before rtl.o is compiled.
604 GEN= genemit genoutput genrecog genextract genflags gencodes genconfig \
608 # Uncomment this line if you want to use cppmain (w/cpplib) as cpp.
611 # Files to be copied away after each stage in building.
612 STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \
613 insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
614 insn-attr.h insn-attrtab.c insn-opinit.c genrtl.c genrtl.h \
615 stamp-flags stamp-config stamp-codes stamp-mlib \
616 stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \
617 stamp-attr stamp-attrtab stamp-opinit stamp-crt stamp-crtS stamp-crt0 \
618 genemit$(build_exeext) genoutput$(build_exeext) genrecog$(build_exeext) \
619 genextract$(build_exeext) genflags$(build_exeext) gencodes$(build_exeext) \
620 genconfig$(build_exeext) genpeep$(build_exeext) genattrtab$(build_exeext) \
621 genattr$(build_exeext) genopinit$(build_exeext) gengenrtl$(build_exeext) \
622 xgcc$(exeext) cc1$(exeext) cpp$(exeext) $(EXTRA_PASSES) \
623 $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) \
624 $(CCCP)$(exeext) cc1obj$(exeext) enquire$(exeext) \
625 protoize$(exeext) unprotoize$(exeext) \
626 specs collect2$(exeext) $(USE_COLLECT2) underscore.c \
628 *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop \
629 *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack \
633 # Members of libgcc1.a.
634 LIB1FUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
635 _lshrsi3 _ashrsi3 _ashlsi3 \
636 _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \
637 _fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \
638 _addsf3 _negsf2 _subsf3 _mulsf3 _divsf3 \
639 _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
640 _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2
642 # Library members defined in libgcc2.c.
643 LIB2FUNCS = _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
644 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 \
645 _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \
646 _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
647 _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \
648 _fixtfdi _fixunstfdi _floatditf \
649 __gcc_bcmp _varargs __dummy _eprintf \
650 _bb _shtab _clear_cache _trampoline __main _exit \
653 FPBIT_FUNCS = _pack_sf _unpack_sf _addsub_sf _mul_sf _div_sf \
654 _fpcmp_parts_sf _compare_sf _eq_sf _ne_sf _gt_sf _ge_sf \
655 _lt_sf _le_sf _si_to_sf _sf_to_si _negate_sf _make_sf \
658 DPBIT_FUNCS = _pack_df _unpack_df _addsub_df _mul_df _div_df \
659 _fpcmp_parts_df _compare_df _eq_df _ne_df _gt_df _ge_df \
660 _lt_df _le_df _si_to_df _df_to_si _negate_df _make_df \
663 # The files that "belong" in CONFIG_H are deliberately omitted
664 # because having them there would not be useful in actual practice.
665 # All they would do is cause complete recompilation every time
666 # one of the machine description files is edited.
667 # That may or may not be what one wants to do.
668 # If it is, rm *.o is an easy way to do it.
669 # CONFIG_H = $(host_xm_file) $(tm_file)
671 RTL_BASE_H = rtl.h rtl.def gansidecl.h machmode.h machmode.def
672 RTL_H = $(RTL_BASE_H) genrtl.h
673 TREE_H = tree.h real.h tree.def gansidecl.h machmode.h machmode.def
674 BASIC_BLOCK_H = basic-block.h bitmap.h
675 DEMANGLE_H = demangle.h gansidecl.h
676 RECOG_H = recog.h gansidecl.h
678 # Language makefile fragments.
680 # The following targets define the interface between us and the languages.
682 # all.build, all.cross, start.encap, rest.encap,
684 # install-normal, install-common, install-info, install-man,
685 # uninstall, distdir,
686 # mostlyclean, clean, distclean, extraclean, maintainer-clean,
687 # stage1, stage2, stage3, stage4
689 # Each language is linked in with a series of hooks (since we can't use `::'
690 # targets). The name of each hooked is "lang.${target_name}" (eg: lang.info).
691 # Configure computes and adds these here.
696 # sed inserts language fragments after the following line.
697 ####language fragments
700 # End of language makefile fragments.
702 # Avoid a lot of time thinking about remaking Makefile.in and *.def.
705 Makefile: $(srcdir)/Makefile.in config.status $(srcdir)/version.c \
706 $(xmake_file) $(tmake_file) $(LANG_MAKEFILES)
707 $(SHELL) $(srcdir)/configure.frag $(srcdir) "$(SUBDIRS)" \
708 "$(xmake_file)" "$(tmake_file)"
709 cp config.status config.run
713 $(srcdir)/configure: $(srcdir)/configure.in
714 cd $(srcdir); autoconf
716 # cstamp-h.in controls rebuilding of config.in.
717 # It is named cstamp-h.in and not stamp-h.in so the mostlyclean rule doesn't
718 # delete it. A stamp file is needed as autoheader won't update the file if
719 # nothing has changed.
720 # It remains in the source directory and is part of the distribution.
721 # This follows what is done in shellutils, fileutils, etc.
722 # "echo timestamp" is used instead of touch to be consistent with other
723 # packages that use autoconf (??? perhaps also to avoid problems with patch?).
724 # ??? Newer versions have a maintainer mode that may be useful here.
725 $(srcdir)/config.in: $(srcdir)/cstamp-h.in
726 $(srcdir)/cstamp-h.in: $(srcdir)/configure.in $(srcdir)/acconfig.h
727 cd $(srcdir) && autoheader
728 echo timestamp > $(srcdir)/cstamp-h.in
729 auto-config.h: cstamp-h ; @true
730 cstamp-h: config.in config.status
731 CONFIG_HEADERS=auto-config.h:config.in $(SHELL) config.status
733 # Really, really stupid make features, such as SUN's KEEP_STATE, may force
734 # a target to build even if it is up-to-date. So we must verify that
735 # config.status does not exist before failing.
736 config.status: configure version.c
737 @if [ ! -f config.status ] ; then \
738 echo You must configure gcc. Look at the INSTALL file for details.; \
741 $(SHELL) config.status --recheck; \
744 all.internal: start.encap rest.encap
745 # This is what to compile if making a cross-compiler.
746 # Note that we can compile enquire using the cross-compiler just built,
747 # although we can't run it on this machine.
748 all.cross: native gcc-cross specs stmp-headers $(LIBGCC) $(STMP_FIXPROTO) \
749 $(LIBGCC1_TEST) $(EXTRA_PARTS) lang.all.cross
750 # This is what to compile if making gcc with a cross-compiler.
751 all.build: native xgcc $(EXTRA_PARTS) lang.all.build
752 # This is what must be made before installing GCC and converting libraries.
753 start.encap: native xgcc specs $(LIBGCC1) xlimits.h lang.start.encap
754 # These can't be made until after GCC can run.
755 rest.encap: stmp-headers $(LIBGCC) $(STMP_FIXPROTO) $(EXTRA_PARTS) lang.rest.encap
756 # This is what is made with the host's compiler
757 # whether making a cross compiler or not.
758 native: config.status auto-config.h cpp $(LANGUAGES) \
759 $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2)
761 # Define the names for selecting languages in LANGUAGES.
765 # Tell GNU make these are phony targets.
766 .PHONY: C c PROTO proto
768 # On the target machine, finish building a cross compiler.
769 # This does the things that can't be done on the host machine.
770 rest.cross: $(LIBGCC) gfloat.h specs
772 # Verify that it works to compile and link libgcc1-test.
773 # If it does, then there are sufficient replacements for libgcc1.a.
774 libgcc1-test: libgcc1-test.o native $(GCC_PARTS)
775 @echo "Testing libgcc1. Ignore linker warning messages."
776 $(GCC_FOR_TARGET) $(GCC_CFLAGS) libgcc1-test.o -o libgcc1-test \
777 -nostartfiles -nostdlib `$(GCC_FOR_TARGET) --print-libgcc-file-name`
778 libgcc1-test.o: libgcc1-test.c native xgcc
779 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -c $(srcdir)/libgcc1-test.c
781 # Recompile all the language-independent object files.
782 # This is used only if the user explicitly asks for it.
783 compilations: ${OBJS}
785 # Create a list of the language-independent object files so the language
786 # subdirectories needn't mention their names explicitly.
787 stamp-objlist: $(OBJS)
788 echo " $(OBJS)" | sed -e 's, \([a-z0-9]\), ../\1,g' -e 's/\.o/$(objext)/g' >stamp-objlist
790 # We call this executable `xgcc' rather than `gcc'
791 # to avoid confusion if the current directory is in the path
792 # and CC is `gcc'. It is renamed to `gcc' when it is installed.
793 xgcc: gcc.o version.o choose-temp.o pexecute.o prefix.o version.o \
794 $(LIBDEPS) $(EXTRA_GCC_OBJS)
795 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o prefix.o version.o \
796 choose-temp.o pexecute.o $(EXTRA_GCC_OBJS) $(LIBS)
798 # Dump a specs file to make -B./ read these specs over installed ones.
800 $(GCC_FOR_TARGET) -dumpspecs > tmp-specs
803 # We do want to create an executable named `xgcc', so we can use it to
805 # Also create gcc-cross, so that install-common will install properly.
807 cp xgcc$(exeext) gcc-cross$(exeext)
809 cc1: $(P) $(C_OBJS) $(OBJS) $(LIBDEPS)
810 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) $(OBJS) $(LIBS)
812 # Copy float.h from its source.
815 cp $(FLOAT_H) gfloat.h
817 # Create float.h source for the native machine.
818 # Make it empty if we can use the system float.h without changes.
820 -./enquire -f > tmp-float.h
821 grep '#define [^_]' tmp-float.h >/dev/null || true > tmp-float.h
822 mv tmp-float.h float.h-nat
824 # Create a dummy float.h source for a cross-compiler.
825 # ??? This isn't used anymore. Should we create config/float-unkn.h
826 # and make that the default float_format in configure?
828 echo "#ifndef __GCC_FLOAT_NOT_NEEDED" > t-float.h-cross
829 echo "#error float.h values not known for cross-compiler" >> t-float.h-cross
830 echo "#endif" >> t-float.h-cross
831 mv t-float.h-cross float.h-cross
833 # Used to compile enquire with standard cc, but have forgotten why.
834 # Let's try with GCC.
835 enquire: enquire.o $(GCC_PARTS)
836 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ENQUIRE_LDFLAGS) enquire.o -o $@
837 enquire.o: $(srcdir)/enquire.c $(GCC_PASSES) stmp-int-hdrs
838 rm -f include/float.h
839 if $(FLOAT_H_TEST); then \
840 SYS_FLOAT_H_WRAP=1; \
842 SYS_FLOAT_H_WRAP=0; \
844 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(ENQUIRE_CFLAGS) \
845 -DSYS_FLOAT_H_WRAP=$$SYS_FLOAT_H_WRAP \
846 -I. -c $(srcdir)/enquire.c
848 # Build the version of limits.h that we will install.
849 xlimits.h: glimits.h limitx.h limity.h
850 if $(LIMITS_H_TEST) ; then \
851 cat $(srcdir)/limitx.h $(srcdir)/glimits.h $(srcdir)/limity.h > tmp-xlimits.h; \
853 cat $(srcdir)/glimits.h > tmp-xlimits.h; \
855 mv tmp-xlimits.h xlimits.h
858 # This is done in two parts because some functions, in libgcc1.c,
859 # must be compiled with something other than GCC,
860 # while the rest, in libgcc2.c, must be compiled with xgcc.
861 # That means we can't do libgcc2.c until after xgcc, cc1, etc.
863 # Use this as value of LIBGCC1 to cause conversion to GNU library format.
864 # LIBCONVERT should put its output in libgcc1.conv.
865 libgcc1.conv: libgcc1.a
866 $(LIBCONVERT) libgcc1.a libgcc1.conv
868 # Use this as value of LIBGCC1 to inhibit use of libgcc1.c entirely.
869 # Make an empty file instead.
870 libgcc1.null: $(GCC_PASSES)
871 echo "__foo () {}" > dummy.c
872 $(GCC_FOR_TARGET) $(GCC_CFLAGS) -c dummy.c
873 $(OLDAR) $(OLDAR_FLAGS) libgcc1.null dummy$(objext)
874 rm -f dummy$(objext) dummy.c
876 # This is $(LIBGCC1) for a cross-compiler.
877 # We have no automatic way of building libgcc1.a,
878 # so it's up to the installer to find a way to do that.
879 # This rule deliberately does not depend on libgcc1.a
880 # so that it will fail if the installer hasn't provided it.
882 mv libgcc1.a libgcc1.cross || (echo You must find a way to make libgcc1.a; false)
884 # Compile the library of arithmetic subroutines with the native compiler.
885 # Don't compile it with GCC!
886 # (That would cause most arithmetic functions to call themselves.)
888 # NOTE: If you modify these rules substantially, please be sure to
889 # check at least config/i386/t-sco5 and possibly other makefile
891 libgcc1.a: libgcc1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status
893 # Actually build it in tmplibgcc1.a, then rename at end,
894 # so that libgcc1.a itself remains nonexistent if compilation is aborted.
895 # -e causes any failing command to make this rule fail.
896 # -e doesn't work in certain shells, so we test $$? as well.
897 # lynx has a broken ar, it always complains when the initial library is
898 # empty, thus this command works only if we don't do -e
899 # There is a trailing backslash (\) deleted from the following line.
901 for name in $(LIB1FUNCS); \
904 rm -f $${name}$(objext); \
905 $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -c -DL$${name} $(srcdir)/libgcc1.c; \
906 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
907 mv libgcc1$(objext) $${name}$(objext); \
908 $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \
909 rm -f $${name}$(objext); \
911 # Some shells crash when a loop has no items.
912 # So make sure there is always at least one--`..'.
914 # We don't use -e here because there are if statements
915 # that should not make the command give up when the if condition is false.
916 # Instead, we test for failure after each command where it matters.
917 for file in .. $(LIB1FUNCS_EXTRA); \
919 if [ x$${file} != x.. ]; then \
920 name=`echo $${file} | sed -e 's/[.][cS]$$//' -e 's/[.]asm$$//'`; \
922 if [ $${name}.asm = $${file} ]; then \
923 cp $${file} $${name}.s || exit 1; file=$${name}.s; \
925 $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -c $${file}; \
926 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
927 $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \
928 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
929 rm -f $${name}.s $${name}$(objext); \
933 -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc1.a; else true; fi
934 mv tmplibgcc1.a libgcc1.a
936 # Build libgcc1.a from assembler source. LIB1ASMFUNCS is the list of
937 # functions. LIB1ASMSRC is the name of the source file in the config
939 libgcc1-asm.a: libgcc2.ready config.status $(srcdir)/config/$(LIB1ASMSRC)
940 -rm -f tmplibgcc1.a libgcc1.S
941 cp $(srcdir)/config/$(LIB1ASMSRC) libgcc1.S
942 # Actually build it in tmplibgcc1.a, then rename at end,
943 # so that libgcc1-asm.a itself remains nonexistent if compilation is aborted.
944 # -e causes any failing command to make this rule fail.
945 # -e doesn't work in certain shells, so we test $$? as well.
946 # lynx has a broken ar, it always complains when the initial library is
947 # empty, thus this command works only if we don't do -e
948 # There is a trailing backslash (\) deleted from the following line.
950 for name in $(LIB1ASMFUNCS); \
953 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} libgcc1.S; \
954 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
955 mv libgcc1$(objext) $${name}$(objext); \
956 $(AR) $(AR_FLAGS) tmplibgcc1.a $${name}$(objext); \
957 rm -f $${name}$(objext); \
960 mv tmplibgcc1.a libgcc1-asm.a
962 # Generate assembly versions of the functions required for libgcc1.
963 # You'll still need to massage the code by hand (possibly hacking
964 # underscores and local labels) but this will get you started.
965 libgcc1.S: libgcc1.c $(CONFIG_H) config.status
968 for name in $(LIB1FUNCS); \
971 $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -S -DL$${name} $(srcdir)/libgcc1.c; \
972 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
973 echo '#ifdef ' L$${name} >> libgcc1.S; \
974 cat libgcc1.s >> libgcc1.S; \
975 echo '#endif /*' L$${name} '*/' >> libgcc1.S; \
976 echo "" >> libgcc1.S; \
979 # Compiling libgcc2.a requires making sure that cc1, etc. have been compiled.
980 # But recompiling cc1 should not force recompilation of libgcc2.a.
981 # If you want to force recompilation, delete libgcc2.a.
982 libgcc2.ready: $(GCC_PASSES) $(LIBGCC2_DEPS) stmp-int-hdrs
983 -if [ -f libgcc2.ready ] ; then \
986 touch libgcc2.ready; \
989 LIB2ADD = $(srcdir)/frame.c $(LIB2FUNCS_EXTRA) $(LANG_LIB2FUNCS)
990 libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(FPBIT) $(DPBIT) $(LIB2ADD) \
991 machmode.h longlong.h frame.h gansidecl.h gbl-ctors.h config.status
992 # Actually build it in tmplibgcc2.a, then rename at end,
993 # so that libgcc2.a itself remains nonexistent if compilation is aborted.
995 # -e causes any failing command to make this rule fail.
996 # -e doesn't work in certain shells, so we test $$? as well.
997 # lynx has a broken ar, it always complains when the initial library is
998 # empty, thus this command works only if we don't do -e
999 # There is a trailing backslash (\) deleted from the following line.
1001 for name in $(LIB2FUNCS); \
1004 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
1005 $(srcdir)/libgcc2.c -o $${name}$(objext); \
1006 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
1007 $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}$(objext); \
1008 rm -f $${name}$(objext); \
1010 if [ x$(FPBIT) != x ]; then \
1011 for name in $(FPBIT_FUNCS); \
1014 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
1015 -DFINE_GRAINED_LIBRARIES $(FPBIT) -o $${name}$(objext); \
1016 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
1017 $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}$(objext); \
1018 rm -f $${name}$(objext); \
1021 if [ x$(DPBIT) != x ]; then \
1022 for name in $(DPBIT_FUNCS); \
1025 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
1026 -DFINE_GRAINED_LIBRARIES $(DPBIT) -o $${name}$(objext); \
1027 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
1028 $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}$(objext); \
1029 rm -f $${name}$(objext); \
1032 # Some shells crash when a loop has no items.
1033 # So make sure there is always at least one--`..'.
1035 # We don't use -e here because there are if statements
1036 # that should not make the command give up when the if condition is false.
1037 # Instead, we test for failure after each command where it matters.
1038 for file in $(LIB2ADD); do \
1039 name=`echo $${file} | sed -e 's/[.][cSo]$$//' -e 's/[.]asm$$//' -e 's/[.]txt$$//'`; \
1040 oname=` echo $${name} | sed -e 's,.*/,,'`; \
1041 if [ $${name}.txt = $${file} ]; then \
1042 for f in .. `cat $${file}`; do if [ x$${f} != x.. ]; then \
1043 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1044 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" \
1045 CFLAGS="$(CFLAGS)" HOST_PREFIX="$(HOST_PREFIX)" \
1046 HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1047 LANGUAGES="$(LANGUAGES)" \
1048 LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $${f}; \
1049 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
1050 $(AR) $(AR_FLAGS) tmplibgcc2.a $${f}; \
1056 if [ $${name}.asm = $${file} ]; then \
1057 cp $${file} $${name}.s || exit 1; file=$${name}.s; \
1059 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
1060 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
1061 $(AR) $(AR_FLAGS) tmplibgcc2.a $${oname}$(objext); \
1062 rm -f $${name}.s $${oname}$(objext); \
1065 mv tmplibgcc2.a libgcc2.a
1066 # These lines were deleted from above the mv command
1067 # because ranlibing libgcc.a itself should suffice.
1068 # -if [ x${HPUX_GAS} = x ] ; then \
1069 # if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc2.a; else true; fi; \
1072 # Combine the various libraries into a single library, libgcc.a.
1073 libgcc.a: $(LIBGCC1) $(LIBGCC2)
1074 -rm -rf tmplibgcc.a libgcc.a tmpcopy
1076 -if [ x$(LIBGCC1) != x ]; \
1077 then (cd tmpcopy; $(AR) x ../$(LIBGCC1)); \
1080 # Some versions of ar (specifically the one in RISC/os 5.x), create an
1081 # unwritable table of contents file, and then print an error message when
1082 # the second ar command tries to overwrite this file. To avoid the error
1083 # message from ar, we make sure all files are writable.
1084 -(cd tmpcopy; chmod +w * > /dev/null 2>&1)
1085 (cd tmpcopy; $(AR) x ../$(LIBGCC2))
1086 (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *$(objext))
1088 -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
1089 # Actually build it in tmplibgcc.a, then rename at end,
1090 # so that libgcc.a itself remains nonexistent if compilation is aborted.
1091 mv tmplibgcc.a libgcc.a
1093 # Use the genmultilib shell script to generate the information the gcc
1094 # driver program needs to select the library directory based on the
1096 multilib.h: stamp-mlib; @true
1097 stamp-mlib: $(srcdir)/genmultilib Makefile
1098 $(SHELL) $(srcdir)/genmultilib \
1099 "$(MULTILIB_OPTIONS)" \
1100 "$(MULTILIB_DIRNAMES)" \
1101 "$(MULTILIB_MATCHES)" \
1102 "$(MULTILIB_EXCEPTIONS)" \
1103 "$(MULTILIB_EXTRA_OPTS)" > tmp-mlib.h
1104 $(srcdir)/move-if-change tmp-mlib.h multilib.h
1107 # Build multiple copies of libgcc.a, one for each target switch.
1108 stmp-multilib: $(LIBGCC1) libgcc2.c libgcc2.ready $(CONFIG_H) \
1109 frame.h gansidecl.h \
1110 $(LIB2ADD) machmode.h longlong.h gbl-ctors.h config.status
1111 for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
1112 dir=`echo $$i | sed -e 's/;.*$$//'`; \
1113 flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
1114 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1115 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
1116 RANLIB="$(RANLIB)" RANLIB_TEST="$(RANLIB_TEST)" \
1117 LANGUAGES="$(LANGUAGES)" \
1118 HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1119 LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS) $${flags}" \
1120 MULTILIB_CFLAGS="$${flags}" \
1121 LIBGCC1="$(LIBGCC1)" LIBGCC2="$(LIBGCC2)" \
1122 dir="$${dir}" stmp-multilib-sub; \
1123 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
1127 # Subroutine of stmp-multilib so make -n works.
1130 if [ -d $(dir) ]; then \
1132 rm -f libgcc.a $(EXTRA_MULTILIB_PARTS); \
1135 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1136 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
1137 HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1138 LANGUAGES="$(LANGUAGES)" \
1139 LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC2)
1140 if [ x$(LIBGCC1) != xlibgcc1-asm.a ]; \
1142 else rm -f $(LIBGCC1); \
1144 if [ x$(LIBGCC1) != xlibgcc1-asm.a ]; \
1147 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1148 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
1149 HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1150 LANGUAGES="$(LANGUAGES)" \
1151 LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC1); \
1153 rm -rf tmplibgcc.a tmpcopy
1155 if [ x$(LIBGCC1) != x ]; \
1156 then (cd tmpcopy; $(AR) x ../$(LIBGCC1)); \
1159 (cd tmpcopy; $(AR) x ../$(LIBGCC2))
1160 (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *$(objext))
1161 rm -rf libgcc2.a tmpcopy
1162 if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
1163 if [ -d $(dir) ]; then true; else mkdir $(dir); fi
1164 mv tmplibgcc.a $(dir)/libgcc.a
1165 for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
1166 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1167 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
1168 HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1169 LANGUAGES="$(LANGUAGES)" \
1170 MULTILIB_CFLAGS="$(MULTILIB_CFLAGS)" T="t" t$${f}; \
1171 mv t$${f} $(dir)/$${f}; \
1175 # Compile two additional files that are linked with every program
1176 # linked using GCC on systems using COFF or ELF, for the sake of C++
1178 $(T)crtbegin.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) \
1179 defaults.h frame.h gbl-ctors.h
1180 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
1181 -finhibit-size-directive -fno-inline-functions -fno-exceptions $(CRTSTUFF_T_CFLAGS) \
1182 -c $(srcdir)/crtstuff.c -DCRT_BEGIN -o $(T)crtbegin$(objext)
1184 $(T)crtend.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) \
1185 defaults.h frame.h gbl-ctors.h
1186 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
1187 -finhibit-size-directive -fno-inline-functions -fno-exceptions $(CRTSTUFF_T_CFLAGS) \
1188 -c $(srcdir)/crtstuff.c -DCRT_END -o $(T)crtend$(objext)
1190 # On some systems we also want to install versions of these files
1191 # compiled using PIC for use in shared libraries.
1192 crtbeginS.o crtendS.o: stamp-crtS ; @true
1194 stamp-crtS: crtstuff.c $(GCC_PASSES) $(CONFIG_H) \
1195 defaults.h frame.h gbl-ctors.h
1196 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS_S) \
1197 -DCRT_BEGIN -finhibit-size-directive -fno-inline-functions \
1198 -g0 -c $(srcdir)/crtstuff.c
1199 mv crtstuff$(objext) crtbeginS$(objext)
1200 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS_S) \
1201 -DCRT_END -finhibit-size-directive -fno-inline-functions \
1202 -g0 -c $(srcdir)/crtstuff.c -o crtendS$(objext)
1205 # Compile the start modules crt0.o and mcrt0.o that are linked with every program
1206 crt0.o: stamp-crt0 ; @true
1207 mcrt0.o: stamp-crt0; @true
1209 stamp-crt0: $(CRT0_S) $(MCRT0_S) $(GCC_PASSES) $(CONFIG_H)
1210 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(CRT0STUFF_T_CFLAGS) \
1211 -o crt0.o -c $(CRT0_S)
1212 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(CRT0STUFF_T_CFLAGS) \
1213 -o mcrt0.o -c $(MCRT0_S)
1216 # Compiling object files from source files.
1218 # Note that dependencies on obstack.h are not written
1219 # because that file is not part of GCC.
1221 # C language specific files.
1223 c-parse.o : $(srcdir)/c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \
1224 $(srcdir)/c-parse.h c-tree.h input.h flags.h
1225 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/c-parse.c
1226 $(srcdir)/c-parse.h: $(srcdir)/c-parse.c
1227 $(srcdir)/c-parse.c: $(srcdir)/c-parse.y
1228 cd $(srcdir); $(BISON) $(BISONFLAGS) -d c-parse.y -o c-parse.c
1229 $(srcdir)/c-parse.y: c-parse.in
1230 echo '/*WARNING: This file is automatically generated!*/' >tmp-c-parse.y
1231 sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \
1232 -e "/^ifc$$/d" -e "/^end ifc$$/d" \
1233 $(srcdir)/c-parse.in >>tmp-c-parse.y
1234 $(srcdir)/move-if-change tmp-c-parse.y $(srcdir)/c-parse.y
1236 $(srcdir)/c-gperf.h: c-parse.gperf
1237 gperf -p -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,3,$$ \
1238 $(srcdir)/c-parse.gperf >tmp-gperf.h
1239 $(srcdir)/move-if-change tmp-gperf.h $(srcdir)/c-gperf.h
1241 c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h output.h
1242 c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h output.h
1243 c-lang.o : c-lang.c $(CONFIG_H) $(TREE_H)
1244 c-lex.o : c-lex.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-lex.h c-tree.h \
1245 $(srcdir)/c-parse.h input.h flags.h $(srcdir)/c-gperf.h c-pragma.h
1246 c-aux-info.o : c-aux-info.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
1247 c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H) flags.h
1248 c-pragma.o: c-pragma.c $(CONFIG_H) $(TREE_H) except.h function.h \
1249 defaults.h c-pragma.h
1250 c-iterate.o: c-iterate.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h flags.h
1252 # To make a configuration always use collect2, set USE_COLLECT2 to ld.
1255 $(LN) collect2$(exeext) ld$(exeext)
1257 collect2: collect2.o tlink.o hash.o cplus-dem.o underscore.o version.o \
1258 choose-temp.o $(LIBDEPS)
1259 # Don't try modifying collect2 (aka ld) in place--it might be linking this.
1260 -rm -f collect2$(exeext)
1261 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ collect2.o tlink.o hash.o \
1262 cplus-dem.o underscore.o version.o choose-temp.o $(LIBS)
1264 collect2.o : collect2.c $(CONFIG_H) gansidecl.h gstab.h obstack.h $(DEMANGLE_H)
1265 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1266 -DTARGET_MACHINE=\"$(target_alias)\" $(MAYBE_USE_COLLECT2) \
1267 -c `echo $(srcdir)/collect2.c | sed 's,^\./,,'`
1269 tlink.o: tlink.c $(DEMANGLE_H) hash.h $(CONFIG_H)
1270 hash.o: hash.c hash.h
1271 cplus-dem.o: cplus-dem.c $(DEMANGLE_H)
1273 underscore.c: stamp-under ; @true
1275 stamp-under: $(GCC_PASSES)
1276 echo "int xxy_us_dummy;" >tmp-dum.c
1277 $(GCC_FOR_TARGET) -S tmp-dum.c
1278 echo '/*WARNING: This file is automatically generated!*/' >tmp-under.c
1279 if grep _xxy_us_dummy tmp-dum.s > /dev/null ; then \
1280 echo "int prepends_underscore = 1;" >>tmp-under.c; \
1282 echo "int prepends_underscore = 0;" >>tmp-under.c; \
1284 $(srcdir)/move-if-change tmp-under.c underscore.c
1285 -rm -f tmp-dum.c tmp-dum.s
1288 # A file used by all variants of C.
1290 c-common.o : c-common.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
1292 # Language-independent files.
1295 -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
1296 -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
1297 -DDEFAULT_TARGET_VERSION=\"$(version)\" \
1298 -DDEFAULT_TARGET_MACHINE=\"$(target_alias)\" \
1299 -DTOOLDIR_BASE_PREFIX=\"$(exec_prefix)/\"
1300 gcc.o: gcc.c $(CONFIG_H) gansidecl.h system.h multilib.h Makefile \
1302 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1304 -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'`
1306 dumpvers: dumpvers.c
1308 version.o: version.c
1309 obstack.o: obstack.c $(CONFIG_H)
1310 choose-temp.o: choose-temp.c $(CONFIG_H) gansidecl.h
1311 pexecute.o: pexecute.c $(CONFIG_H) gansidecl.h
1312 prefix.o: prefix.c $(CONFIG_H) gansidecl.h Makefile
1313 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1314 -DPREFIX=\"$(prefix)\" \
1315 -c `echo $(srcdir)/prefix.c | sed 's,^\./,,'`
1317 convert.o: convert.c $(CONFIG_H) $(TREE_H) flags.h convert.h
1319 tree.o : tree.c $(CONFIG_H) $(TREE_H) flags.h function.h
1320 print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
1321 stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) flags.h function.h
1322 fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H) flags.h system.h
1323 toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) \
1324 flags.h input.h insn-attr.h xcoffout.h defaults.h output.h \
1325 $(lang_options_files)
1326 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(MAYBE_USE_COLLECT2) \
1327 -DTARGET_NAME=\"$(target_alias)\" \
1328 -c `echo $(srcdir)/toplev.c | sed 's,^\./,,'`
1330 rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
1332 print-rtl.o : print-rtl.c $(CONFIG_H) $(RTL_H)
1333 rtlanal.o : rtlanal.c $(CONFIG_H) $(RTL_H)
1335 varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h function.h \
1336 defaults.h insn-codes.h expr.h hard-reg-set.h regs.h xcoffout.h \
1338 function.o : function.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \
1339 insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
1341 stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \
1342 insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h except.h \
1344 except.o : except.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \
1345 insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
1346 $(RECOG_H) output.h except.h
1347 expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h regs.h \
1348 insn-flags.h insn-codes.h expr.h insn-config.h $(RECOG_H) output.h \
1349 typeclass.h hard-reg-set.h
1350 calls.o : calls.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h \
1352 expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
1353 insn-flags.h insn-config.h insn-codes.h expr.h $(RECOG_H) real.h
1354 explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h hard-reg-set.h \
1355 insn-config.h expr.h $(RECOG_H) insn-flags.h insn-codes.h
1356 optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
1357 insn-flags.h insn-config.h insn-codes.h expr.h $(RECOG_H) reload.h
1358 dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h regs.h \
1359 insn-config.h reload.h gstab.h xcoffout.h defaults.h output.h
1360 sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h except.h \
1361 function.h expr.h output.h hard-reg-set.h regs.h defaults.h real.h \
1362 insn-config.h obstack.h xcoffout.h c-pragma.h
1363 dwarfout.o : dwarfout.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf.h flags.h \
1364 insn-config.h reload.h output.h defaults.h
1365 dwarf2out.o : dwarf2out.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf2.h flags.h \
1366 insn-config.h insn-codes.h reload.h output.h defaults.h hard-reg-set.h \
1368 xcoffout.o : xcoffout.c $(CONFIG_H) $(TREE_H) $(RTL_H) xcoffout.h flags.h
1369 emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h except.h \
1370 function.h regs.h insn-config.h insn-codes.h $(RECOG_H) real.h expr.h \
1371 obstack.h hard-reg-set.h
1372 real.o : real.c $(CONFIG_H) $(TREE_H)
1373 getpwd.o : getpwd.c $(CONFIG_H)
1375 integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h integrate.h \
1376 insn-flags.h insn-config.h insn-codes.h expr.h real.h regs.h function.h \
1377 output.h $(RECOG_H) except.h
1379 jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \
1380 insn-config.h insn-codes.h insn-flags.h $(RECOG_H) expr.h real.h except.h
1381 stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h
1383 cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h \
1384 insn-config.h insn-codes.h $(RECOG_H) expr.h
1385 profile.o : profile.c $(CONFIG_H) $(RTL_H) flags.h insn-flags.h gcov-io.h \
1386 $(TREE_H) output.h regs.h
1387 loop.o : loop.c $(CONFIG_H) $(RTL_H) flags.h loop.h insn-config.h \
1388 insn-flags.h insn-codes.h regs.h hard-reg-set.h $(RECOG_H) expr.h real.h
1389 unroll.o : unroll.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \
1390 integrate.h regs.h $(RECOG_H) flags.h expr.h loop.h
1391 flow.o : flow.c $(CONFIG_H) $(RTL_H) flags.h insn-config.h \
1392 $(BASIC_BLOCK_H) regs.h hard-reg-set.h output.h
1393 combine.o : combine.c $(CONFIG_H) $(RTL_H) flags.h \
1394 insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
1395 $(BASIC_BLOCK_H) $(RECOG_H) real.h hard-reg-set.h
1396 regclass.o : regclass.c $(CONFIG_H) $(RTL_H) hard-reg-set.h flags.h \
1397 $(BASIC_BLOCK_H) regs.h insn-config.h $(RECOG_H) reload.h real.h
1398 local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) flags.h $(BASIC_BLOCK_H) \
1399 regs.h hard-reg-set.h insn-config.h $(RECOG_H) output.h
1400 bitmap.o : bitmap.c $(CONFIG_H) $(RTL_H) flags.h $(BASIC_BLOCK_H) regs.h
1401 global.o : global.c $(CONFIG_H) $(RTL_H) flags.h \
1402 $(BASIC_BLOCK_H) regs.h hard-reg-set.h insn-config.h output.h
1404 reload.o : reload.c $(CONFIG_H) $(RTL_H) flags.h output.h expr.h\
1405 reload.h $(RECOG_H) hard-reg-set.h insn-config.h insn-codes.h regs.h real.h
1406 reload1.o : reload1.c $(CONFIG_H) $(RTL_H) real.h flags.h expr.h \
1407 reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
1408 $(BASIC_BLOCK_H) $(RECOG_H) output.h
1409 caller-save.o : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \
1410 regs.h hard-reg-set.h insn-codes.h insn-config.h $(BASIC_BLOCK_H) $(RECOG_H) \
1412 reorg.o : reorg.c $(CONFIG_H) $(RTL_H) conditions.h hard-reg-set.h \
1413 $(BASIC_BLOCK_H) regs.h insn-config.h insn-codes.h insn-attr.h \
1414 insn-flags.h $(RECOG_H) flags.h output.h expr.h
1415 alias.o : alias.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \
1417 regmove.o : regmove.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \
1418 recog.h output.h reload.h regs.h hard-reg-set.h flags.h expr.h insn-flags.h
1419 $(SCHED_PREFIX)sched.o : $(SCHED_PREFIX)sched.c $(CONFIG_H) $(RTL_H) \
1420 $(BASIC_BLOCK_H) regs.h hard-reg-set.h flags.h insn-config.h \
1421 insn-attr.h system.h
1422 final.o : final.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h regs.h \
1423 $(RECOG_H) conditions.h insn-config.h insn-attr.h except.h real.h output.h \
1424 hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h
1425 recog.o : recog.c $(CONFIG_H) $(RTL_H) \
1426 regs.h $(RECOG_H) hard-reg-set.h flags.h insn-config.h insn-attr.h \
1427 insn-flags.h insn-codes.h real.h
1428 reg-stack.o : reg-stack.c $(CONFIG_H) $(RTL_H) $(TREE_H) \
1429 regs.h hard-reg-set.h flags.h insn-config.h insn-flags.h
1431 $(out_object_file): $(out_file) $(CONFIG_H) $(TREE_H) \
1432 $(RTL_H) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
1433 insn-flags.h output.h insn-attr.h insn-codes.h
1434 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(out_file)
1436 # Build auxiliary files that support ecoff format.
1437 mips-tfile: mips-tfile.o version.o $(LIBDEPS)
1438 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tfile.o version.o $(LIBS)
1440 mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H)
1442 mips-tdump: mips-tdump.o version.o $(LIBDEPS)
1443 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tdump.o version.o $(LIBS)
1445 mips-tdump.o : mips-tdump.c $(CONFIG_H) $(RTL_H)
1447 # Build file to support OSF/rose half-pic format.
1448 halfpic.o: halfpic.c $(CONFIG_H) $(RTL_H) $(TREE_H)
1450 # Normally this target is not used; but it is used if you
1451 # define ALLOCA=alloca.o. In that case, you must get a suitable alloca.c
1452 # from the GNU Emacs distribution.
1454 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(ALLOCA_FLAGS) \
1455 -c `echo $(srcdir)/alloca.c | sed 's,^\./,,'`
1458 # Generate header and source files from the machine description,
1461 .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
1462 insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
1463 insn-attr.h insn-attrtab.c
1465 # The following pair of rules has this effect:
1466 # genconfig is run only if the md has changed since genconfig was last run;
1467 # but the file insn-config.h is touched only when its contents actually change.
1469 # Each of the other insn-* files is handled by a similar pair of rules.
1471 # This causes an anomaly in the results of make -n
1472 # because insn-* is older than stamp-*
1473 # and thus make -n thinks that insn-* will be updated
1474 # and force recompilation of things that depend on it.
1475 # We use move-if-change precisely to avoid such recompilation.
1476 # But there is no way to teach make -n that it will be avoided.
1478 # Each of the insn-*.[ch] rules has a semicolon at the end,
1479 # for otherwise the system Make on SunOS 4.1 never tries
1480 # to recompile insn-*.o. To avoid problems and extra noise from
1481 # versions of make which don't like empty commands (nothing after the
1482 # trailing `;'), we call true for each.
1484 insn-config.h: stamp-config ; @true
1485 stamp-config : $(md_file) genconfig $(srcdir)/move-if-change
1486 ./genconfig $(md_file) > tmp-config.h
1487 $(srcdir)/move-if-change tmp-config.h insn-config.h
1490 insn-flags.h: stamp-flags ; @true
1491 stamp-flags : $(md_file) genflags $(srcdir)/move-if-change
1492 ./genflags $(md_file) > tmp-flags.h
1493 $(srcdir)/move-if-change tmp-flags.h insn-flags.h
1496 insn-codes.h: stamp-codes ; @true
1497 stamp-codes : $(md_file) gencodes $(srcdir)/move-if-change
1498 ./gencodes $(md_file) > tmp-codes.h
1499 $(srcdir)/move-if-change tmp-codes.h insn-codes.h
1502 insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h real.h output.h \
1503 insn-config.h insn-flags.h insn-codes.h
1504 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c
1506 insn-emit.c: stamp-emit ; @true
1507 stamp-emit : $(md_file) genemit $(srcdir)/move-if-change
1508 ./genemit $(md_file) > tmp-emit.c
1509 $(srcdir)/move-if-change tmp-emit.c insn-emit.c
1512 insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h $(RECOG_H) \
1513 real.h output.h flags.h
1514 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-recog.c
1516 insn-recog.c: stamp-recog ; @true
1517 stamp-recog : $(md_file) genrecog $(srcdir)/move-if-change
1518 ./genrecog $(md_file) > tmp-recog.c
1519 $(srcdir)/move-if-change tmp-recog.c insn-recog.c
1522 insn-opinit.o : insn-opinit.c $(CONFIG_H) $(RTL_H) insn-codes.h insn-flags.h \
1523 insn-config.h flags.h $(RECOG_H) expr.h reload.h
1524 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-opinit.c
1526 insn-opinit.c: stamp-opinit ; @true
1527 stamp-opinit : $(md_file) genopinit $(srcdir)/move-if-change
1528 ./genopinit $(md_file) > tmp-opinit.c
1529 $(srcdir)/move-if-change tmp-opinit.c insn-opinit.c
1532 insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H)
1533 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-extract.c
1535 insn-extract.c: stamp-extract ; @true
1536 stamp-extract : $(md_file) genextract $(srcdir)/move-if-change
1537 ./genextract $(md_file) > tmp-extract.c
1538 $(srcdir)/move-if-change tmp-extract.c insn-extract.c
1541 insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h output.h real.h
1542 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-peep.c
1544 insn-peep.c: stamp-peep ; @true
1545 stamp-peep : $(md_file) genpeep $(srcdir)/move-if-change
1546 ./genpeep $(md_file) > tmp-peep.c
1547 $(srcdir)/move-if-change tmp-peep.c insn-peep.c
1550 insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) regs.h real.h output.h \
1551 insn-attr.h insn-config.h
1552 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-attrtab.c
1554 insn-attr.h: stamp-attr ; @true
1555 stamp-attr : $(md_file) genattr $(srcdir)/move-if-change
1556 ./genattr $(md_file) > tmp-attr.h
1557 $(srcdir)/move-if-change tmp-attr.h insn-attr.h
1560 insn-attrtab.c: stamp-attrtab ; @true
1561 stamp-attrtab : $(md_file) genattrtab $(srcdir)/move-if-change
1562 if cmp -s $(PREMADE_ATTRTAB_MD) $(md_file); \
1564 echo Using $(PREMADE_ATTRTAB); \
1565 cp $(PREMADE_ATTRTAB) tmp-attrtab.c; \
1567 ./genattrtab $(md_file) > tmp-attrtab.c; \
1569 $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c
1572 insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h real.h conditions.h \
1573 hard-reg-set.h insn-config.h insn-flags.h insn-attr.h output.h $(RECOG_H) \
1575 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-output.c
1577 insn-output.c: stamp-output ; @true
1578 stamp-output : $(md_file) genoutput $(srcdir)/move-if-change
1579 ./genoutput $(md_file) > tmp-output.c
1580 $(srcdir)/move-if-change tmp-output.c insn-output.c
1583 genrtl.o : genrtl.c $(CONFIG_H) $(RTL_H)
1584 genrtl.c genrtl.h : stamp-genrtl
1585 @true # force gnu make to recheck modification times.
1587 stamp-genrtl: gengenrtl $(srcdir)/move-if-change $(RTL_BASE_H)
1588 ./gengenrtl tmp-genrtl.h tmp-genrtl.c
1589 $(srcdir)/move-if-change tmp-genrtl.h genrtl.h
1590 $(srcdir)/move-if-change tmp-genrtl.c genrtl.c
1594 # Compile the programs that generate insn-* from the machine description.
1595 # They are compiled with $(HOST_CC), and associated libraries,
1596 # since they need to run on this machine
1597 # even if GCC is being compiled to run on some other machine.
1599 # $(CONFIG_H) is omitted from the deps of the gen*.o
1600 # because these programs don't really depend on anything
1601 # about the target machine. They do depend on config.h itself,
1602 # since that describes the host machine.
1604 # Pass the md file through cpp if the target requests it.
1605 $(MD_FILE): $(MD_DEPS)
1607 $(MD_CPP) $(MD_CPPFLAGS) $(md_file) | sed 's/^# /; /g' > tmp-$@
1610 genconfig : genconfig.o $(HOST_RTL) $(HOST_LIBDEPS)
1611 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1612 genconfig.o $(HOST_RTL) $(HOST_LIBS)
1614 genconfig.o : genconfig.c $(RTL_H) $(build_xm_file)
1615 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconfig.c
1617 genflags : genflags.o $(HOST_RTL) $(HOST_LIBDEPS)
1618 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1619 genflags.o $(HOST_RTL) $(HOST_LIBS)
1621 genflags.o : genflags.c $(RTL_H) $(build_xm_file)
1622 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genflags.c
1624 gencodes : gencodes.o $(HOST_RTL) $(HOST_LIBDEPS)
1625 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1626 gencodes.o $(HOST_RTL) $(HOST_LIBS)
1628 gencodes.o : gencodes.c $(RTL_H) $(build_xm_file)
1629 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencodes.c
1631 genemit : genemit.o $(HOST_RTL) $(HOST_LIBDEPS)
1632 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1633 genemit.o $(HOST_RTL) $(HOST_LIBS)
1635 genemit.o : genemit.c $(RTL_H) $(build_xm_file)
1636 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genemit.c
1638 genopinit : genopinit.o $(HOST_RTL) $(HOST_LIBDEPS)
1639 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1640 genopinit.o $(HOST_RTL) $(HOST_LIBS)
1642 genopinit.o : genopinit.c $(RTL_H) $(build_xm_file)
1643 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genopinit.c
1645 genrecog : genrecog.o $(HOST_RTL) $(HOST_LIBDEPS)
1646 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1647 genrecog.o $(HOST_RTL) $(HOST_LIBS)
1649 genrecog.o : genrecog.c $(RTL_H) $(build_xm_file)
1650 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genrecog.c
1652 genextract : genextract.o $(HOST_RTL) $(HOST_LIBDEPS)
1653 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1654 genextract.o $(HOST_RTL) $(HOST_LIBS)
1656 genextract.o : genextract.c $(RTL_H) $(build_xm_file) insn-config.h
1657 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genextract.c
1659 genpeep : genpeep.o $(HOST_RTL) $(HOST_LIBDEPS)
1660 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1661 genpeep.o $(HOST_RTL) $(HOST_LIBS)
1663 genpeep.o : genpeep.c $(RTL_H) $(build_xm_file)
1664 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpeep.c
1666 genattr : genattr.o $(HOST_RTL) $(HOST_LIBDEPS)
1667 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1668 genattr.o $(HOST_RTL) $(HOST_LIBS)
1670 genattr.o : genattr.c $(RTL_H) $(build_xm_file)
1671 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattr.c
1673 genattrtab : genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBDEPS)
1674 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1675 genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBS)
1677 genattrtab.o : genattrtab.c $(RTL_H) $(build_xm_file) insn-config.h
1678 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c
1680 genoutput : genoutput.o $(HOST_RTL) $(HOST_LIBDEPS)
1681 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1682 genoutput.o $(HOST_RTL) $(HOST_LIBS)
1684 genoutput.o : genoutput.c $(RTL_H) $(build_xm_file)
1685 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genoutput.c
1687 gengenrtl : gengenrtl.o $(HOST_LIBDEPS)
1688 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1689 gengenrtl.o $(HOST_LIBS)
1691 gengenrtl.o : gengenrtl.c $(RTL_BASE_H)
1692 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gengenrtl.c
1695 # Compile the libraries to be used by gen*.
1696 # If we are not cross-building, gen* use the same .o's that cc1 will use,
1697 # and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict
1698 # with the rules for rtl.o, alloca.o, etc.
1699 $(HOST_PREFIX_1)rtl.o: $(srcdir)/rtl.c $(CONFIG_H) $(RTL_H)
1700 rm -f $(HOST_PREFIX)rtl.c
1701 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtl.c > $(HOST_PREFIX)rtl.c
1702 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtl.c
1704 $(HOST_PREFIX_1)print-rtl.o: $(srcdir)/print-rtl.c $(CONFIG_H) $(RTL_H)
1705 rm -f $(HOST_PREFIX)print-rtl.c
1706 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/print-rtl.c > $(HOST_PREFIX)print-rtl.c
1707 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)print-rtl.c
1709 $(HOST_PREFIX_1)rtlanal.o: $(srcdir)/rtlanal.c $(CONFIG_H) $(RTL_H)
1710 rm -f $(HOST_PREFIX)rtlanal.c
1711 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtlanal.c > $(HOST_PREFIX)rtlanal.c
1712 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtlanal.c
1714 $(HOST_PREFIX_1)alloca.o: alloca.c
1715 rm -f $(HOST_PREFIX)alloca.c
1716 cp $(srcdir)/alloca.c $(HOST_PREFIX)alloca.c
1717 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)alloca.c
1719 $(HOST_PREFIX_1)obstack.o: obstack.c
1720 rm -f $(HOST_PREFIX)obstack.c
1721 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/obstack.c > $(HOST_PREFIX)obstack.c
1722 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)obstack.c
1724 $(HOST_PREFIX_1)malloc.o: malloc.c
1725 rm -f $(HOST_PREFIX)malloc.c
1726 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/malloc.c > $(HOST_PREFIX)malloc.c
1727 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)malloc.c
1729 # This satisfies the dependency that we get if you cross-compile a compiler
1730 # that does not need to compile alloca, malloc or whatever.
1732 touch $(HOST_PREFIX_1)
1735 # Remake cpp and protoize.
1737 # Making the preprocessor
1740 $(LN) $(CCCP)$(exeext) cpp$(exeext)
1741 cccp: cccp.o cexp.o version.o prefix.o $(LIBDEPS)
1742 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cccp.o cexp.o prefix.o \
1744 cexp.o: $(srcdir)/cexp.c $(CONFIG_H)
1745 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/cexp.c
1746 $(srcdir)/cexp.c: $(srcdir)/cexp.y
1747 cd $(srcdir); $(BISON) -o cexp.c cexp.y
1749 cccp.o: cccp.c $(CONFIG_H) pcp.h version.c config.status
1750 # The reason we use $(libdir)/g++-include rather than using libsubdir
1751 # is for compatibility with the current version of libg++.
1752 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1753 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1754 -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
1755 -DOLD_GPLUSPLUS_INCLUDE_DIR=\"$(old_gxx_include_dir)\" \
1756 -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1757 -DCROSS_INCLUDE_DIR=\"$(tooldir)/sys-include\" \
1758 -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1759 -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
1761 cppmain: cppmain.o cpplib.o cpphash.o cppalloc.o cpperror.o cppexp.o \
1762 prefix.o version.o $(LIBDEPS)
1763 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cppmain.o cpplib.o cpphash.o \
1764 cppalloc.o cpperror.o cppexp.o prefix.o version.o $(LIBS)
1766 cppmain.o: cppmain.c $(CONFIG_H) cpplib.h
1768 cpplib.o: cpplib.c $(CONFIG_H) cpplib.h cpphash.h config.status
1769 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1770 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1771 -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
1772 -DOLD_GPLUSPLUS_INCLUDE_DIR=\"$(old_gxx_include_dir)\" \
1773 -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1774 -DCROSS_INCLUDE_DIR=\"$(tooldir)/sys-include\" \
1775 -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1776 -c `echo $(srcdir)/cpplib.c | sed 's,^\./,,'`
1778 cpperror.o: cpperror.c $(CONFIG_H) cpplib.h
1780 cppexp.o: cppexp.c $(CONFIG_H) cpplib.h
1782 cpphash.o: cpphash.c cpplib.h cpphash.h
1784 cppalloc.o: cppalloc.c $(CONFIG_H)
1786 # Note for the stamp targets, we run the program `true' instead of
1787 # having an empty command (nothing following the semicolon).
1789 proto: config.status protoize unprotoize SYSCALLS.c.X
1791 protoize: protoize.o getopt.o getopt1.o getpwd.o version.o \
1792 pexecute.o choose-temp.o $(LIBDEPS)
1793 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
1794 protoize.o getopt.o getopt1.o getpwd.o version.o \
1795 pexecute.o choose-temp.o $(LIBS)
1797 unprotoize: unprotoize.o getopt.o getopt1.o getpwd.o version.o \
1798 pexecute.o choose-temp.o $(LIBDEPS)
1799 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
1800 unprotoize.o getopt.o getopt1.o getpwd.o version.o \
1801 pexecute.o choose-temp.o $(LIBS)
1803 protoize.o: protoize.c getopt.h $(CONFIG_H)
1804 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1805 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1806 -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
1807 -DCROSS_INCLUDE_DIR=\"$(tooldir)/sys-include\" \
1808 -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1809 -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1810 -DSTD_PROTO_DIR=\"$(libsubdir)\" \
1811 $(srcdir)/protoize.c
1813 unprotoize.o: unprotoize.c protoize.c getopt.h $(CONFIG_H)
1814 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1815 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1816 -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
1817 -DCROSS_INCLUDE_DIR=\"$(tooldir)/sys-include\" \
1818 -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1819 -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1820 -DSTD_PROTO_DIR=\"$(libsubdir)\" \
1821 $(srcdir)/unprotoize.c
1823 getopt.o: getopt.c getopt.h
1824 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt.c
1825 getopt1.o: getopt1.c getopt.h
1826 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt1.c
1828 # This info describes the target machine, so compile with GCC just built.
1829 SYSCALLS.c.X: $(srcdir)/sys-types.h $(srcdir)/sys-protos.h $(GCC_PASSES) \
1831 -rm -f SYSCALLS.c tmp-SYSCALLS.s
1832 cat $(srcdir)/sys-types.h $(srcdir)/sys-protos.h > SYSCALLS.c
1833 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1834 -aux-info $@ -S -o tmp-SYSCALLS.s SYSCALLS.c
1835 -rm -f SYSCALLS.c tmp-SYSCALLS.s
1838 test-protoize-simple: ./protoize ./unprotoize $(GCC_PASSES)
1839 -rm -f tmp-proto.[cso]
1840 cp $(srcdir)/protoize.c tmp-proto.c
1841 chmod u+w tmp-proto.c
1842 ./protoize -N -B ./ -x getopt.h -c "-B./ -Wall -Wwrite-strings \
1843 $(CFLAGS) $(INCLUDES) \
1844 -DGCC_INCLUDE_DIR=0 \
1845 -DGPLUSPLUS_INCLUDE_DIR=0 \
1846 -DCROSS_INCLUDE_DIR=0 \
1847 -DTOOL_INCLUDE_DIR=0 \
1848 -DSTD_PROTO_DIR=0" tmp-proto.c
1849 @echo '**********' Expect 400 lines of differences.
1850 -diff $(srcdir)/protoize.c tmp-proto.c > tmp-proto.diff
1851 -wc -l tmp-proto.diff
1852 ./unprotoize -N -x getopt.h -c "-B./ -Wall -Wwrite-strings \
1853 $(CFLAGS) $(INCLUDES) \
1854 -DGCC_INCLUDE_DIR=0 \
1855 -DGPLUSPLUS_INCLUDE_DIR=0 \
1856 -DCROSS_INCLUDE_DIR=0 \
1857 -DTOOL_INCLUDE_DIR=0 \
1858 -DSTD_PROTO_DIR=0" tmp-proto.c
1859 @echo Expect zero differences.
1860 diff $(srcdir)/protoize.c tmp-proto.c | cat
1861 -rm -f tmp-proto.[cs] tmp-proto$(objext)
1863 gcov.o: gcov.c gcov-io.h
1865 gcov: gcov.o $(LIBDEPS)
1866 $(CC) $(ALL_CFLAGS) $(LDFLAGS) gcov.o $(LIBS) -o $@
1868 # Build the include directory. The stamp files are stmp-* rather than
1869 # stamp-* so that mostlyclean does not force the include directory to
1872 # Build the include directory except for float.h (which depends upon
1874 stmp-int-hdrs: stmp-fixinc $(USER_H) xlimits.h
1875 # Copy in the headers provided with gcc.
1876 # The sed command gets just the last file name component;
1877 # this is necessary because VPATH could add a dirname.
1878 # Using basename would be simpler, but some systems don't have it.
1879 # The touch command is here to workaround an AIX/Linux NFS bug.
1880 for file in .. $(USER_H); do \
1881 if [ X$$file != X.. ]; then \
1882 realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
1883 touch include/$$realfile; \
1884 rm -f include/$$realfile; \
1885 cp $$file include; \
1886 chmod a+r include/$$realfile; \
1889 rm -f include/limits.h
1890 cp xlimits.h include/limits.h
1891 chmod a+r include/limits.h
1892 # Install the README
1893 rm -f include/README
1894 cp $(srcdir)/README-fixinc include/README
1895 chmod a+r include/README
1898 # Build the complete include directory, including float.h.
1899 stmp-headers: stmp-int-hdrs gfloat.h
1900 rm -f include/float.h
1901 if [ -s gfloat.h ]; then \
1902 cp gfloat.h include/float.h && \
1903 chmod a+r include/float.h; \
1907 # Build fixed copies of system files.
1908 stmp-fixinc: $(FIXINCLUDES) gsyslimits.h
1911 if [ x$(FIXINCLUDES) != xMakefile.in ]; \
1913 for dir in $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); do \
1916 $(SHELL) $(srcdir)/$(FIXINCLUDES) include $$dir; \
1921 rm -f include/syslimits.h
1922 if [ -f include/limits.h ]; then \
1923 mv include/limits.h include/syslimits.h; \
1925 cp $(srcdir)/gsyslimits.h include/syslimits.h; \
1927 chmod a+r include/syslimits.h
1930 # Files related to the fixproto script.
1932 deduced.h: $(GCC_PASSES) $(srcdir)/scan-types.sh stmp-int-hdrs
1933 CC="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -Iinclude -I${SYSTEM_HEADER_DIR}"; \
1935 $(SHELL) $(srcdir)/scan-types.sh "$(srcdir)" >tmp-deduced.h
1936 mv tmp-deduced.h deduced.h
1938 gen-protos: gen-protos.o scan.o cppalloc.o $(HOST_LIBDEPS)
1939 ${HOST_CC} $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1940 gen-protos.o scan.o cppalloc.o $(HOST_LIBS)
1942 gen-protos.o: gen-protos.c scan.h $(build_xm_file)
1943 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gen-protos.c
1945 scan.o: scan.c scan.h $(build_xm_file)
1946 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan.c
1948 xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h gen-protos Makefile
1949 cat deduced.h $(srcdir)/sys-protos.h > tmp-fixtmp.c
1950 mv tmp-fixtmp.c fixtmp.c
1951 $(GCC_FOR_TARGET) fixtmp.c -w -U__SIZE_TYPE__ -U__PTRDIFF_TYPE__ -U__WCHAR_TYPE__ -E \
1952 | sed -e 's/ / /g' -e 's/ *(/ (/g' -e 's/ [ ]*/ /g' -e 's/( )/()/' \
1953 | ./gen-protos >xsys-protos.hT
1954 mv xsys-protos.hT xsys-protos.h
1957 fix-header: fix-header.o scan-decls.o scan.o xsys-protos.h $(HOST_LIBDEPS) \
1958 cpplib.o cpphash.o cppalloc.o cppexp.o cpperror.o prefix.o version.o
1959 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ fix-header.o \
1960 scan-decls.o scan.o cpplib.o cpphash.o cppalloc.o prefix.o \
1961 version.o cppexp.o $(HOST_LIBS)
1963 fix-header.o: fix-header.c obstack.h scan.h xsys-protos.h $(build_xm_file)
1964 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/fix-header.c
1966 scan-decls.o: scan-decls.c scan.h cpplib.h $(build_xm_file)
1967 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan-decls.c
1969 # stmp-fixproto depends on this, not on fix-header directly.
1970 # The idea is to make sure fix-header gets built,
1971 # but not rerun fixproto after each stage
1972 # just because fix-header's mtime has changed.
1973 fixhdr.ready: fix-header
1974 -if [ -f fixhdr.ready ] ; then \
1977 touch fixhdr.ready; \
1980 # stmp-headers is to make sure fixincludes has already finished.
1981 # The if statement is so that we don't run fixproto a second time
1982 # if it has already been run on the files in `include'.
1983 stmp-fixproto: fixhdr.ready fixproto stmp-headers
1984 @echo "Various warnings and error messages from fixproto are normal"
1985 -if [ -d include ] ; then true; else mkdir include; fi
1986 -if [ -f include/fixed ] ; then true; \
1988 : This line works around a 'make' bug in BSDI 1.1.; \
1989 FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES; \
1990 $(SHELL) ${srcdir}/fixproto include include $(SYSTEM_HEADER_DIR); \
1991 touch include/fixed; \
1995 # Remake the info files.
1998 info: cpp.info gcc.info lang.info
2000 cpp.info: $(srcdir)/cpp.texi
2001 $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) $(srcdir)/cpp.texi -o cpp.info
2003 gcc.info: $(srcdir)/gcc.texi $(srcdir)/extend.texi $(srcdir)/install.texi \
2004 $(srcdir)/invoke.texi $(srcdir)/md.texi $(srcdir)/rtl.texi \
2005 $(srcdir)/tm.texi $(srcdir)/gcov.texi
2006 $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) $(srcdir)/gcc.texi -o gcc.info
2008 dvi: gcc.dvi cpp.dvi lang.dvi
2010 # This works with GNU Make's default rule.
2011 gcc.dvi: $(srcdir)/gcc.texi $(srcdir)/extend.texi $(srcdir)/install.texi \
2012 $(srcdir)/invoke.texi $(srcdir)/md.texi $(srcdir)/rtl.texi \
2013 $(srcdir)/tm.texi $(srcdir)/gcov.texi
2014 TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex gcc.texi
2016 TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex gcc.texi
2018 cpp.dvi: $(srcdir)/cpp.texi
2019 TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex cpp.texi
2021 TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex cpp.texi
2024 INSTALL: $(srcdir)/install1.texi $(srcdir)/install.texi
2025 $(MAKEINFO) -D INSTALLONLY --no-header --no-split \
2026 $(srcdir)/install1.texi -o INSTALL
2028 # Deletion of files made during compilation.
2029 # There are four levels of this:
2030 # `mostlyclean', `clean', `distclean' and `maintainer-clean'.
2031 # `mostlyclean' is useful while working on a particular type of machine.
2032 # It deletes most, but not all, of the files made by compilation.
2033 # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
2034 # `clean' deletes everything made by running `make all'.
2035 # `distclean' also deletes the files made by config.
2036 # `maintainer-clean' also deletes everything that could be regenerated
2037 # automatically, except for `configure'.
2038 # We remove as much from the language subdirectories as we can
2039 # (less duplicated code).
2042 mostlyclean: lang.mostlyclean
2043 -rm -f $(STAGESTUFF)
2044 # Delete the temporary source copies for cross compilation.
2045 -rm -f $(HOST_PREFIX_1)rtl.c $(HOST_PREFIX_1)rtlanal.c
2046 -rm -f $(HOST_PREFIX_1)alloca.c $(HOST_PREFIX_1)malloc.c
2047 -rm -f $(HOST_PREFIX_1)obstack.c
2048 # Delete the temp files made in the course of building libgcc.a.
2049 -rm -f tmplibgcc* tmpcopy xlimits.h libgcc1-test
2050 for name in $(LIB1FUNCS); do rm -f $${name}.c; done
2051 # Delete other temporary files.
2052 -rm -f tmp-float.h tmp-gcc.xtar.gz
2053 -rm -f tmp-foo1 tmp-foo2 tmp-proto.* tmp-unproto.1 tmp-SYSCALLS.s
2054 -rm -f tmp-c-parse.y tmp-gperf.h
2055 -rm -f tmp-specs t-float.h-cross tmp-xlimits.h
2056 -rm -f tmp-fixtmp.c xsys-protos.hT
2057 # Delete the stamp files.
2058 -rm -f stamp-* tmp-*
2059 -rm -f */stamp-* */tmp-*
2060 # Delete debugging dump files.
2061 -rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
2062 -rm -f *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack *.addressof *.regmove
2063 -rm -f */*.greg */*.lreg */*.combine */*.flow */*.cse */*.jump */*.rtl
2064 -rm -f */*.tree */*.loop */*.dbr */*.jump2 */*.sched */*.cse2
2065 -rm -f */*.sched2 */*.stack */*.regmove
2066 # Delete some files made during installation.
2067 -rm -f specs gfloat.h float.h-* enquire SYSCALLS.c.X SYSCALLS.c
2068 -rm -f collect collect2 mips-tfile mips-tdump alloca.s
2069 # Delete files generated for fixproto
2070 -rm -rf fix-header xsys-protos.h deduced.h tmp-deduced.h \
2071 gen-protos fixproto.list fixtmp.* fixhdr.ready
2072 # Delete unwanted output files from TeX.
2073 -rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg
2074 -rm -f */*.toc */*.log */*.vr */*.fn */*.cp */*.tp */*.ky */*.pg
2075 # Delete sorted indices we don't actually use.
2076 -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
2077 # Delete core dumps.
2081 # Delete all files made by compilation
2082 # that don't exist in the distribution.
2083 clean: mostlyclean lang.clean
2084 # It may not be quite desirable to delete unprotoize.c here,
2085 # but the spec for `make clean' requires it.
2086 # Using unprotoize.c is not quite right in the first place,
2087 # but what better way is there?
2088 -rm -f libgcc.a libgcc1.a libgcc1-asm.a libgcc2.a libgcc2.ready
2092 -if [ -f md.pre-cpp ]; then \
2095 # Delete the include directory.
2096 -rm -rf stmp-* include
2098 # Delete files used by the "multilib" facility (including libgcc subdirs).
2099 -rm -f multilib.h tmpmultilib*
2100 -if [ "x$(MULTILIB_DIRNAMES)" != x ] ; then \
2101 rm -rf $(MULTILIB_DIRNAMES); \
2102 else if [ "x$(MULTILIB_OPTIONS)" != x ] ; then \
2103 rm -rf `echo $(MULTILIB_OPTIONS) | sed -e 's/\// /g'`; \
2105 -rm -fr stage1 stage2 stage3 stage4
2107 # Delete all files that users would normally create
2108 # while building and installing GCC.
2109 distclean: clean lang.distclean
2110 -rm -f tm.h config.h auto-config.h tconfig.h hconfig.h md cstamp-h
2111 -rm -f config.status config.run config.cache config.bak
2112 -rm -f Make-lang Make-hooks Make-host Make-target
2113 -rm -f Makefile specs.h options.h *.oaux
2114 -rm -f gthr-default.h
2115 -rm -f */stage1 */stage2 */stage3 */stage4 */include
2116 -rm -f c-parse.output
2119 -rm -f site.exp site.bak testsuite/site.exp testsuite/site.bak
2120 -rm -f testsuite/{gcc,g++}.{log,sum}
2122 # Delete anything likely to be found in the source directory
2123 # that shouldn't be in the distribution.
2124 extraclean: distclean lang.extraclean
2125 -rm -rf =* ./"#"* *~* config/=* config/"#"* config/*~*
2126 -rm -f patch* *.orig *.rej config/patch* config/*.orig config/*.rej
2127 -rm -f config/*/=* config/*/"#"* config/*/*~*
2128 -rm -f config/*/*.orig config/*/*.rej
2129 -rm -f *.dvi *.ps *.oaux *.d *.[zZ] *.gz
2130 -rm -f *.tar *.xtar *diff *.diff.* *.tar.* *.xtar.* *diffs
2131 -rm -f *lose config/*lose config/*/*lose
2132 -rm -f *.s *.s[0-9] *.i install1.texi config/ChangeLog
2133 -rm -f */=* */"#"* */*~*
2134 -rm -f */patch* */*.orig */*.rej
2135 -rm -f */*.dvi */*.oaux */*.d */*.[zZ] */*.gz
2136 -rm -f */*.tar */*.xtar */*diff */*.diff.* */*.tar.* */*.xtar.* */*diffs
2137 -rm -f */*lose */*.s */*.s[0-9] */*.i
2139 # Get rid of every file that's generated from some other file, except for `configure'.
2140 # Most of these files ARE PRESENT in the GCC distribution.
2142 @echo 'This command is intended for maintainers to use; it'
2143 @echo 'deletes files that may need special tools to rebuild.'
2144 $(MAKE) distclean lang.maintainer-clean
2145 -rm -f c-parse.y c-gperf.h
2146 -rm -f c-parse.c c-parse.h c-parse.output
2147 -rm -f cexp.c cexp.output TAGS
2148 -rm -f cpp.info* cpp.??s cpp.*aux
2149 -rm -f gcc.info* gcc.??s gcc.*aux
2151 # Entry points `install' and `uninstall'.
2152 # Also use `install-collect2' to install collect2 when the config files don't.
2154 # The semicolon is to prevent the install.sh -> install default rule
2155 # from doing anything. Having it run true helps avoid problems and
2156 # noise from versions of make which don't like to have null commands.
2157 install: $(INSTALL_TARGET) ; @true
2159 # Copy the compiler files into directories where they will be run.
2160 # Install the driver last so that the window when things are
2162 install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
2163 install-man install-info lang.install-normal install-driver
2165 # Do nothing while making gcc with a cross-compiler. The person who
2166 # makes gcc for the target machine has to know how to put a complete
2167 # gcc together by hand.
2168 install-build: force
2169 @echo You have to install gcc on your target machine by hand.
2171 # Run this on the target machine
2172 # to finish installation of cross compiler.
2173 install-cross-rest: install-float-h-cross
2175 # Install float.h for cross compiler.
2176 # Run this on the target machine!
2177 install-float-h-cross: installdirs
2178 # if [ -f enquire ] ; then true; else false; fi
2179 # Note: don't use -. We should fail right away if enquire was not made.
2180 ./enquire -f > $(tmpdir)/float.h
2181 -rm -f $(libsubdir)/include/float.h
2182 $(INSTALL_DATA) $(tmpdir)/float.h $(libsubdir)/include/float.h
2183 -rm -f $(tmpdir)/float.h
2184 chmod a-x $(libsubdir)/include/float.h
2186 # Create the installation directories.
2188 -if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; chmod a+rx $(prefix) ; fi
2189 -if [ -d $(exec_prefix) ] ; then true ; else mkdir $(exec_prefix) ; chmod a+rx $(exec_prefix) ; fi
2190 -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; chmod a+rx $(libdir) ; fi
2191 -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; chmod a+rx $(libdir)/gcc-lib ; fi
2192 # This dir isn't currently searched by cpp.
2193 # -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi
2194 -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
2195 -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
2196 -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
2197 -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi
2198 -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi
2199 -if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; chmod a+rx $(tooldir) ; fi
2200 -if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; chmod a+rx $(assertdir) ; fi
2201 -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; chmod a+rx $(infodir) ; fi
2202 # We don't use mkdir -p to create the parents of mandir,
2203 # because some systems don't support it.
2204 # Instead, we use this technique to create the immediate parent of mandir.
2205 -parent=`echo $(mandir)|sed -e 's@/[^/]*$$@@'`; \
2206 if [ -d $$parent ] ; then true ; else mkdir $$parent ; chmod a+rx $$parent ; fi
2207 -if [ -d $(mandir) ] ; then true ; else mkdir $(mandir) ; chmod a+rx $(mandir) ; fi
2209 # Install the compiler executables built during cross compilation.
2210 install-common: native installdirs $(EXTRA_PARTS) lang.install-common
2211 for file in $(COMPILERS); do \
2212 if [ -f $$file ] ; then \
2213 rm -f $(libsubdir)/$$file; \
2214 $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
2218 for file in $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2) ..; do \
2219 if [ x"$$file" != x.. ]; then \
2220 rm -f $(libsubdir)/$$file; \
2221 $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
2224 for file in $(EXTRA_PARTS) ..; do \
2225 if [ x"$$file" != x.. ]; then \
2226 rm -f $(libsubdir)/$$file; \
2227 $(INSTALL_DATA) $$file $(libsubdir)/$$file; \
2228 chmod a-x $(libsubdir)/$$file; \
2231 # Don't mess with specs if it doesn't exist yet.
2232 -if [ -f specs ] ; then \
2233 rm -f $(libsubdir)/specs; \
2234 $(INSTALL_DATA) specs $(libsubdir)/specs; \
2235 chmod a-x $(libsubdir)/specs; \
2237 # Install protoize if it was compiled.
2238 -if [ -f protoize$(exeext) ]; \
2240 rm -f $(bindir)/protoize$(exeext); \
2241 $(INSTALL_PROGRAM) protoize$(exeext) $(bindir)/protoize$(exeext); \
2242 rm -f $(bindir)/unprotoize$(exeext); \
2243 $(INSTALL_PROGRAM) unprotoize$(exeext) $(bindir)/unprotoize$(exeext); \
2244 rm -f $(libsubdir)/SYSCALLS.c.X; \
2245 $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X; \
2246 chmod a-x $(libsubdir)/SYSCALLS.c.X; \
2248 -rm -f $(libsubdir)/cpp$(exeext)
2249 $(INSTALL_PROGRAM) cpp$(exeext) $(libsubdir)/cpp$(exeext)
2250 # Install gcov if it was compiled.
2251 -if [ -f gcov$(exeext) ]; \
2253 rm -f $(bindir)/gcov$(exeext); \
2254 $(INSTALL_PROGRAM) gcov$(exeext) $(bindir)/gcov$(exeext); \
2255 chmod a+x $(bindir)/gcov$(exeext); \
2258 # Install the driver program as $(target_alias)-gcc
2259 # and also as either gcc (if native) or $(tooldir)/bin/gcc.
2260 install-driver: xgcc
2261 -if [ -f gcc-cross$(exeext) ] ; then \
2262 rm -f $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
2263 $(INSTALL_PROGRAM) gcc-cross$(exeext) $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
2264 if [ -d $(tooldir)/bin/. ] ; then \
2265 rm -f $(tooldir)/bin/gcc$(exeext); \
2266 $(INSTALL_PROGRAM) gcc-cross$(exeext) $(tooldir)/bin/gcc$(exeext); \
2269 rm -f $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
2270 $(INSTALL_PROGRAM) xgcc$(exeext) $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
2271 rm -f $(bindir)/$(target_alias)-gcc-1$(exeext); \
2272 $(LN) $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target_alias)-gcc-1$(exeext); \
2273 mv $(bindir)/$(target_alias)-gcc-1$(exeext) $(bindir)/$(target_alias)-gcc$(exeext); \
2276 # Install the info files.
2277 # $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir
2278 # to do the install. The sed rule was copied from stmp-int-hdrs.
2279 install-info: doc installdirs lang.install-info
2280 -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info*
2281 for f in cpp.info* gcc.info*; do \
2282 realfile=`echo $$f | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
2283 $(INSTALL_DATA) $$f $(infodir)/$$realfile; \
2285 -chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info*
2287 # Install the man pages.
2288 install-man: installdirs $(srcdir)/gcc.1 $(srcdir)/cccp.1 lang.install-man
2289 -if [ -f gcc-cross$(exeext) ] ; then \
2290 rm -f $(mandir)/$(GCC_CROSS_NAME)$(manext); \
2291 $(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/$(GCC_CROSS_NAME)$(manext); \
2292 chmod a-x $(mandir)/$(GCC_CROSS_NAME)$(manext); \
2294 rm -f $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
2295 $(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
2296 chmod a-x $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
2298 -rm -f $(mandir)/cccp$(manext)
2299 -$(INSTALL_DATA) $(srcdir)/cccp.1 $(mandir)/cccp$(manext)
2300 -chmod a-x $(mandir)/cccp$(manext)
2302 # Install the library.
2303 install-libgcc: libgcc.a installdirs
2304 -if [ -f libgcc.a ] ; then \
2305 rm -f $(libsubdir)/libgcc.a; \
2306 $(INSTALL_DATA) libgcc.a $(libsubdir)/libgcc.a; \
2307 if $(RANLIB_TEST) ; then \
2308 (cd $(libsubdir); $(RANLIB) libgcc.a); else true; fi; \
2309 chmod a-x $(libsubdir)/libgcc.a; \
2312 # Install multiple versions of libgcc.a.
2313 install-multilib: stmp-multilib installdirs
2314 for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
2315 dir=`echo $$i | sed -e 's/;.*$$//'`; \
2316 if [ -d $(libsubdir)/$${dir} ]; then true; else mkdir $(libsubdir)/$${dir}; fi; \
2317 for f in libgcc.a $(EXTRA_MULTILIB_PARTS); do \
2318 rm -f $(libsubdir)/$${dir}/$${f}; \
2319 $(INSTALL_DATA) $${dir}/$${f} $(libsubdir)/$${dir}/$${f}; \
2321 if $(RANLIB_TEST); then \
2322 (cd $(libsubdir)/$${dir}; $(RANLIB) libgcc.a); else true; fi; \
2323 chmod a-x $(libsubdir)/$${dir}/libgcc.a; \
2326 # Install all the header files built in the include subdirectory.
2327 install-headers: install-include-dir $(INSTALL_HEADERS_DIR) $(INSTALL_ASSERT_H)
2328 # Fix symlinks to absolute paths in the installed include directory to
2329 # point to the installed directory, not the build directory.
2330 # Don't need to use LN_S here since we really do need ln -s and no substitutes.
2331 -files=`cd $(libsubdir)/include; find . -type l -print 2>/dev/null`; \
2332 if [ $$? -eq 0 ]; then \
2333 dir=`cd include; pwd`; \
2334 for i in $$files; do \
2335 dest=`ls -ld $(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \
2336 if expr "$$dest" : "$$dir.*" > /dev/null; then \
2337 rm -f $(libsubdir)/include/$$i; \
2338 ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \
2343 # Create or recreate the gcc private include file directory.
2344 install-include-dir: installdirs
2345 -rm -rf $(libsubdir)/include
2346 mkdir $(libsubdir)/include
2347 -chmod a+rx $(libsubdir)/include
2349 # Install the include directory using tar.
2350 install-headers-tar: stmp-headers $(STMP_FIXPROTO) install-include-dir
2352 tar -cf - .; exit 0) | (cd $(libsubdir)/include; tar $(TAROUTOPTS) - )
2353 # /bin/sh on some systems returns the status of the first tar,
2354 # and that can lose with GNU tar which always writes a full block.
2355 # So use `exit 0' to ignore its exit status.
2357 # Install the include directory using cpio.
2358 install-headers-cpio: stmp-headers $(STMP_FIXPROTO) install-include-dir
2359 (cd include; find . -print) | (cd include; cpio -pdum $(libsubdir)/include)
2361 # Put assert.h where it won't override GNU libc's assert.h.
2362 # It goes in a dir that is searched after GNU libc's headers;
2363 # thus, the following conditionals are no longer needed.
2364 # But it's not worth deleting them now.
2365 ## Don't replace the assert.h already there if it is not from GCC.
2366 ## This code would be simpler if it tested for -f ... && ! grep ...
2367 ## but supposedly the ! operator is missing in sh on some systems.
2368 install-assert-h: assert.h installdirs
2369 if [ -f $(assertdir)/assert.h ]; \
2371 if grep "__eprintf" $(assertdir)/assert.h >/dev/null; \
2373 rm -f $(assertdir)/assert.h; \
2374 $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
2375 chmod a-x $(assertdir)/assert.h; \
2379 rm -f $(assertdir)/assert.h; \
2380 $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
2381 chmod a-x $(assertdir)/assert.h; \
2384 # Use this target to install the program `collect2' under the name `ld'.
2385 install-collect2: collect2 installdirs
2386 $(INSTALL_PROGRAM) collect2$(exeext) $(libsubdir)/ld$(exeext)
2387 # Install the driver program as $(libsubdir)/gcc for collect2.
2388 $(INSTALL_PROGRAM) xgcc$(exeext) $(libsubdir)/gcc$(exeext)
2390 # Cancel installation by deleting the installed files.
2391 uninstall: lang.uninstall
2392 -rm -rf $(libsubdir)
2393 -rm -rf $(bindir)/$(GCC_INSTALL_NAME)$(exeext)
2394 -rm -rf $(bindir)/$(GCC_CROSS_NAME)$(exeext)
2395 -rm -rf $(bindir)/protoize$(exeext)
2396 -rm -rf $(bindir)/unprotoize$(exeext)
2397 -rm -rf $(mandir)/$(GCC_INSTALL_NAME)$(manext)
2398 -rm -rf $(mandir)/$(GCC_CROSS_NAME)$(manext)
2399 -rm -rf $(mandir)/cccp$(manext)
2400 -rm -rf $(mandir)/protoize$(manext)
2401 -rm -rf $(mandir)/unprotoize$(manext)
2403 # These targets are for the dejagnu testsuites. The file site.exp
2404 # contains global variables that all the testsuites will use.
2406 # Set to $(target_alias)/ for cross.
2407 target_subdir = @target_subdir@
2409 site.exp: ./config.status Makefile
2410 @echo "Making a new config file..."
2413 -@mv site.exp site.bak
2414 @echo "## these variables are automatically generated by make ##" > ./tmp0
2415 @echo "# Do not edit here. If you wish to override these values" >> ./tmp0
2416 @echo "# add them to the last section" >> ./tmp0
2417 @echo "set rootme \"`pwd`\"" >> ./tmp0
2418 @echo "set srcdir \"`cd ${srcdir}; pwd`\"" >> ./tmp0
2419 @echo "set host_triplet $(host_canonical)" >> ./tmp0
2420 @echo "set build_triplet $(build_canonical)" >> ./tmp0
2421 @echo "set target_triplet $(target)" >> ./tmp0
2422 @echo "set target_alias $(target_alias)" >> ./tmp0
2423 # CFLAGS is set even though it's empty to show we reserve the right to set it.
2424 @echo "set CFLAGS \"\"" >> ./tmp0
2425 @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
2426 # If newlib has been configured, we need to pass -B to gcc so it can find
2427 # newlib's crt0.o if it exists. This will cause a "path prefix not used"
2428 # message if it doesn't, but the testsuite is supposed to ignore the message -
2429 # it's too difficult to tell when to and when not to pass -B (not all targets
2430 # have crt0's). We could only add the -B if ../newlib/crt0.o exists, but that
2431 # seems like too selective a test.
2432 # ??? Another way to solve this might be to rely on linker scripts. Then
2433 # theoretically the -B won't be needed.
2434 # We also need to pass -L ../ld so that the linker can find ldscripts.
2435 @if [ -d $(objdir)/../$(target_subdir)newlib ] ; then \
2436 echo "set newlib_cflags \"-I$(objdir)/../$(target_subdir)newlib/targ-include -I\$$srcdir/../newlib/libc/include\"" >> ./tmp0; \
2437 echo "set newlib_ldflags \"-B$(objdir)/../$(target_subdir)newlib/\"" >> ./tmp0; \
2438 echo "append CFLAGS \" \$$newlib_cflags\"" >> ./tmp0; \
2439 echo "append CXXFLAGS \" \$$newlib_cflags\"" >> ./tmp0; \
2440 echo "append LDFLAGS \" \$$newlib_ldflags\"" >> ./tmp0; \
2443 @if [ -d $(objdir)/../ld ] ; then \
2444 echo "append LDFLAGS \" -L$(objdir)/../ld\"" >> ./tmp0; \
2447 @if [ $(build_canonical) != $(host_canonical) ] ; then \
2448 echo "set tmpdir /tmp" >> ./tmp0 ; \
2449 else echo "set tmpdir $(objdir)/testsuite" >> ./tmp0 ; \
2451 @echo "set srcdir \"\$${srcdir}/testsuite\"" >> ./tmp0
2452 @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
2453 @cat ./tmp0 > site.exp
2454 @cat site.bak | sed \
2455 -e '1,/^## All variables above are.*##/ d' >> site.exp
2458 CHECK_TARGETS = check-gcc check-g++ check-g77
2460 check: $(CHECK_TARGETS)
2462 testsuite/site.exp: site.exp
2463 if [ -d testsuite ]; then \
2468 rm -rf testsuite/site.exp
2469 cp site.exp testsuite/site.exp
2471 check-g++: testsuite/site.exp
2472 -rootme=`pwd`; export rootme; \
2473 srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
2475 EXPECT=${EXPECT} ; export EXPECT ; \
2476 if [ -f $${rootme}/../expect/expect ] ; then \
2477 TCL_LIBRARY=$${srcdir}/../tcl/library ; \
2478 export TCL_LIBRARY ; fi ; \
2479 $(RUNTEST) --tool g++ $(RUNTESTFLAGS)
2481 check-gcc: testsuite/site.exp
2482 -rootme=`pwd`; export rootme; \
2483 srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
2485 EXPECT=${EXPECT} ; export EXPECT ; \
2486 if [ -f $${rootme}/../expect/expect ] ; then \
2487 TCL_LIBRARY=$${srcdir}/../tcl/library ; \
2488 export TCL_LIBRARY ; fi ; \
2489 $(RUNTEST) --tool gcc $(RUNTESTFLAGS)
2491 check-g77: testsuite/site.exp
2492 -rootme=`pwd`; export rootme; \
2493 srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
2495 EXPECT=${EXPECT} ; export EXPECT ; \
2496 if [ -f $${rootme}/../expect/expect ] ; then \
2497 TCL_LIBRARY=$${srcdir}/../tcl/library ; \
2498 export TCL_LIBRARY ; fi ; \
2499 $(RUNTEST) --tool g77 $(RUNTESTFLAGS)
2501 # These exist for maintenance purposes.
2503 # Update the tags table.
2507 mv -f c-parse.[ch] cexp.c =*.[chy] temp; \
2508 etags *.y *.h *.c; \
2512 # Create the distribution tar file.
2513 #dist: gcc-$(version).tar.gz
2516 gcc.xtar.gz: gcc.xtar
2517 gzip --best < gcc.xtar > tmp-gcc.xtar.gz
2518 mv tmp-gcc.xtar.gz gcc.xtar.gz
2520 #gcc-$(version).tar.gz: gcc-$(version).tar
2521 # gzip < gcc-$(version).tar > gcc-$(version).tar.gz
2523 #gcc-$(version).tar:
2525 # Make the distribution.
2526 tar -chf gcc.xtar gcc-$(version)
2528 # This target exists to do the initial work before the language specific
2530 distdir-start: doc $(srcdir)/INSTALL $(srcdir)/c-parse.y $(srcdir)/c-gperf.h \
2531 $(srcdir)/c-parse.c $(srcdir)/cexp.c $(srcdir)/config.in
2532 @if grep -s "for version ${mainversion}" gcc.texi > /dev/null; \
2534 else echo "You must update the version number in \`gcc.texi'"; sleep 10;\
2536 # Update the version number in README
2537 awk '$$1 " " $$2 " " $$3 == "This directory contains" \
2538 { $$6 = version; print $$0 } \
2539 $$1 " " $$2 " " $$3 != "This directory contains"' \
2540 version=$(version) README > tmp.README
2541 mv tmp.README README
2542 -rm -rf gcc-$(version) tmp
2543 # Put all the files in a temporary subdirectory
2544 # which has the name that we want to have in the tar file.
2548 for file in *[0-9a-zA-Z+]; do \
2552 for file in *[0-9a-zA-Z+]; do \
2553 if test -d $$file && test "$$file" != RCS; then \
2554 mkdir ../tmp/config/$$file; \
2556 for subfile in *[0-9a-zA-Z+]; do \
2557 $(LN) $$subfile ../../tmp/config/$$file; \
2561 $(LN) $$file ../tmp/config; \
2565 for file in *[0-9a-zA-Z+]; do \
2566 $(LN) $$file ../tmp/ginclude; \
2569 for file in *[0-9a-zA-Z+]; do \
2570 $(LN) $$file ../tmp/objc; \
2574 # Finish making `distdir', after the languages have done their thing.
2576 mv tmp gcc-$(version)
2577 # Get rid of everything we don't want in the distribution. We'd want
2578 # this to use Makefile.in, but it doesn't have the `lang.foo' targets
2580 cd gcc-$(version); make extraclean
2582 distdir: distdir-start lang.distdir distdir-finish
2584 # make diff oldversion=M.N
2585 # creates a diff file between an older distribution and this one.
2586 # The -P option assumes this is GNU diff.
2588 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h \
2589 -x cexp.c -x objc-parse.y -x objc-parse.c \
2591 -x "gcc.??" -x "gcc.??s" -x gcc.aux -x "gcc.info*" \
2592 -x "cpp.??" -x "cpp.??s" -x cpp.aux -x "cpp.info*" \
2593 $(LANG_DIFF_EXCLUDES) \
2594 gcc-$(oldversion) gcc-$(version) > diffs
2596 bootstrap bootstrap-lean: force
2597 # Only build the C compiler for stage1, because that is the only one that
2598 # we can guarantee will build with the native compiler, and also it is the
2599 # only thing useful for building stage2.
2600 $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)"
2602 # This used to define ALLOCA as empty, but that would lead to bad results
2603 # for a subsequent `make install' since that would not have ALLOCA empty.
2604 # To prevent `make install' from compiling alloca.o and then relinking cc1
2605 # because alloca.o is newer, we permit these recursive makes to compile
2606 # alloca.o. Then cc1 is newer, so it won't have to be relinked.
2607 $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
2609 -if test $@ = bootstrap-lean; then rm -rf stage1; else true; fi
2610 $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
2613 $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
2615 $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
2618 $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
2621 $(MAKE) CC="stage3/xgcc -Bstage3/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage3/ LANGUAGES="$(LANGUAGES)"
2623 # Compare the object files in the current directory with those in the
2626 # ./ avoids bug in some versions of tail.
2627 compare compare3 compare4 compare-lean compare3-lean compare4-lean: force
2629 case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \
2630 for file in *$(objext); do \
2631 tail +16c ./$$file > tmp-foo1; \
2632 tail +16c stage$$stage/$$file > tmp-foo2 \
2633 && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
2635 case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \
2636 for dir in tmp-foo $(SUBDIRS); do \
2637 if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2638 for file in $$dir/*$(objext); do \
2639 tail +16c ./$$file > tmp-foo1; \
2640 tail +16c stage$$stage/$$file > tmp-foo2 \
2641 && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
2646 case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \
2647 if [ -f .bad_compare ]; then \
2648 echo "Bootstrap comparison failure!"; \
2653 *-lean ) rm -rf stage$$stage ;; \
2658 # Compare the object files in the current directory with those in the
2659 # stage2 directory. Use gnu cmp (diffutils v2.4 or later) to avoid
2660 # running tail and the overhead of twice copying each object file.
2662 gnucompare gnucompare3 gnucompare4 gnucompare-lean gnucompare3-lean gnucompare4-lean: force
2664 case "$@" in gnucompare | gnucompare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^gnucompare\([0-9][0-9]*\).*,\1,'` ;; esac; \
2665 for file in *$(objext); do \
2666 (cmp --ignore-initial=16 $$file stage$$stage/$$file > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
2668 case "$@" in gnucompare | gnucompare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^gnucompare\([0-9][0-9]*\).*,\1,'` ;; esac; \
2669 for dir in tmp-foo $(SUBDIRS); do \
2670 if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2671 for file in $$dir/*$(objext); do \
2672 (cmp --ignore-initial=16 $$file stage$$stage/$$file > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
2676 case "$@" in gnucompare | gnucompare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^gnucompare\([0-9][0-9]*\).*,\1,'` ;; esac; \
2677 if [ -f .bad_compare ]; then \
2678 echo "Bootstrap comparison failure!"; \
2683 *-lean ) rm -rf stage$$stage ;; \
2687 # Copy the object files from a particular stage into a subdirectory.
2689 -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
2690 -for dir in . $(SUBDIRS) ; \
2692 if [ -d stage1/$$dir ] ; then true ; else mkdir stage1/$$dir ; fi ; \
2694 -mv $(STAGESTUFF) stage1
2695 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2696 # dir will work properly.
2697 -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage1 ; else true ; fi
2698 -if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage1 ; else true ; fi
2699 -if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage1 ; else true ; fi
2700 -rm -f stage1/libgcc.a
2702 -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libgcc.a; else true; fi
2703 -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
2704 cp stage1/$${f} . ; \
2707 stage1: force stage1-start lang.stage1
2710 -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
2711 -for dir in . $(SUBDIRS) ; \
2713 if [ -d stage2/$$dir ] ; then true ; else mkdir stage2/$$dir ; fi ; \
2715 -mv $(STAGESTUFF) stage2
2716 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2717 # dir will work properly.
2718 -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage2 ; else true ; fi
2719 -if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage2 ; else true ; fi
2720 -if [ -f collect-ld ] ; then $(LN_S) ../collect-ld$(exeext) stage2 ; else true ; fi
2721 -rm -f stage2/libgcc.a
2723 -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libgcc.a; else true; fi
2724 -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
2725 cp stage2/$${f} . ; \
2728 stage2: force stage2-start lang.stage2
2731 -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
2732 -for dir in . $(SUBDIRS) ; \
2734 if [ -d stage3/$$dir ] ; then true ; else mkdir stage3/$$dir ; fi ; \
2736 -mv $(STAGESTUFF) stage3
2737 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2738 # dir will work properly.
2739 -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage3 ; else true ; fi
2740 -if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage3 ; else true ; fi
2741 -if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage3 ; else true ; fi
2742 -rm -f stage3/libgcc.a
2744 -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libgcc.a; else true; fi
2745 -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
2746 cp stage3/$${f} . ; \
2749 stage3: force stage3-start lang.stage3
2752 -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
2753 -for dir in . $(SUBDIRS) ; \
2755 if [ -d stage4/$$dir ] ; then true ; else mkdir stage4/$$dir ; fi ; \
2757 -mv $(STAGESTUFF) stage4
2758 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2759 # dir will work properly.
2760 -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage4 ; else true ; fi
2761 -if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage4 ; else true ; fi
2762 -if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage4 ; else true ; fi
2763 -rm -f stage4/libgcc.a
2765 -if $(RANLIB_TEST) ; then $(RANLIB) stage4/libgcc.a; else true; fi
2766 -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
2767 cp stage4/$${f} . ; \
2770 stage4: force stage4-start lang.stage4
2772 # Copy just the executable files from a particular stage into a subdirectory,
2773 # and delete the object files. Use this if you're just verifying a version
2774 # that is pretty sure to work, and you are short of disk space.
2775 risky-stage1: stage1
2778 risky-stage2: stage2
2781 risky-stage3: stage3
2784 risky-stage4: stage4
2787 #In GNU Make, ignore whether `stage*' exists.
2788 .PHONY: stage1 stage2 stage3 stage4 clean maintainer-clean TAGS bootstrap
2789 .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4