--with-gnu-ld uses different x- fiile under aix 4.1
[official-gcc.git] / gcc / Makefile.in
blobcdbebd89297f1c0f3c31a4928d73ca7d7ec0cc3e
1 # Makefile for GNU C compiler.
2 # Copyright (C) 1987, 88, 90-98, 1999 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)
9 #any later version.
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
27 .y.c:
29 # Directory where sources are, from where we are.
30 srcdir = @srcdir@
31 VPATH = @srcdir@
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.
38 SUBDIRS =@subdirs@
40 # Selection of languages to be made.
41 # This is overridden by configure.
42 CONFIG_LANGUAGES = @all_languages@
43 LANGUAGES = c proto gcov$(exeext) $(CONFIG_LANGUAGES)
45 # Selection of languages to be made during stage1 build.
46 # This is overridden by configure.
47 BOOT_LANGUAGES = c @all_boot_languages@
49 ALLOCA =
50 ALLOCA_FLAGS =
51 ALLOCA_FINISH = true
53 # Various ways of specifying flags for compilations:
54 # CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
55 # BOOT_CFLAGS is the value of CFLAGS to pass
56 # to the stage2 and stage3 compilations
57 # WARN_CFLAGS are the warning flags to pass to stage2 and stage3.
58 # (And for stage 1 if the native compiler is GCC.) It is
59 # separate from BOOT_CFLAGS because people tend to override optimization
60 # flags and we'd like them to still have warnings turned on. They are free
61 # to explicitly turn warnings off if they wish.
62 # XCFLAGS is used for most compilations but not when using the GCC just built.
63 # TCFLAGS is used for compilations with the GCC just built.
64 XCFLAGS =
65 TCFLAGS =
66 CFLAGS = -g @stage1_warn_cflags@
67 BOOT_CFLAGS = -O2 $(CFLAGS)
68 WARN_CFLAGS = -W -Wall
69 # These exists to be overridden by the x-* and t-* files, respectively.
70 X_CFLAGS =
71 T_CFLAGS =
73 X_CPPFLAGS =
74 T_CPPFLAGS =
76 CC = @CC@
77 # srcdir might be a relative pathname which won't be valid in a subdirectory,
78 # so we must use objdir/srcdir instead to make it safe. objdir is always
79 # a full pathname.
80 BISON = `if [ -f $(objdir)/../bison/bison ] ; then case $(srcdir) in \
81 /*) echo $(objdir)/../bison/bison -L $(srcdir)/../bison/ ;; \
82 *) echo $(objdir)/../bison/bison -L $(objdir)/$(srcdir)/../bison/ ;; \
83 esac; else echo bison ; fi`
84 BISONFLAGS =
85 LEX = `if [ -f $(objdir)/../flex/flex ] ; then echo $(objdir)/../flex/flex ; else echo flex ; fi`
86 LEXFLAGS =
87 AR = ar
88 AR_FLAGS = rc
89 LN = @symbolic_link@
90 DLLTOOL = dlltool
91 SHELL = /bin/sh
92 # on sysV, define this as cp.
93 INSTALL = @INSTALL@
94 # Some systems may be missing symbolic links, regular links, or both.
95 # Allow configure to check this and use "ln -s", "ln", or "cp" as appropriate.
96 LN=@LN@
97 LN_S=@LN_S@
98 # These permit overriding just for certain files.
99 INSTALL_PROGRAM = @INSTALL_PROGRAM@
100 INSTALL_DATA = @INSTALL_DATA@
101 MAKEINFO = makeinfo
102 MAKEINFOFLAGS =
103 TEXI2DVI = texi2dvi
104 # For GNUmake: let us decide what gets passed to recursive makes.
105 MAKEOVERRIDES =
106 @SET_MAKE@
108 # Define this as & to perform parallel make on a Sequent.
109 # Note that this has some bugs, and it seems currently necessary
110 # to compile all the gen* files first by hand to avoid erroneous results.
113 # How to invoke ranlib.
114 RANLIB = ranlib
115 # Test to use to see whether ranlib exists on the system.
116 RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
118 HOST_AR = ar
119 HOST_AR_FLAGS = rc
120 HOST_RANLIB = ranlib
121 HOST_RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
123 # Compiler to use for compiling libgcc1.a.
124 # OLDCC should not be the GNU C compiler,
125 # since that would compile typical libgcc1.a functions such as mulsi3
126 # into infinite recursions.
127 OLDCC = cc
129 # CFLAGS for use with OLDCC, for compiling libgcc1.a.
130 # NOTE: -O does not work on some Unix systems!
131 CCLIBFLAGS = -O
133 # Version of ar to use when compiling libgcc1.a.
134 OLDAR = ar
135 OLDAR_FLAGS = qc
137 # Target to use when installing include directory. Either
138 # install-headers-tar or install-headers-cpio.
139 INSTALL_HEADERS_DIR = @build_install_headers_dir@
141 # Header files that are made available under the same name
142 # to programs compiled with GCC.
143 USER_H = $(srcdir)/ginclude/stdarg.h $(srcdir)/ginclude/stddef.h \
144 $(srcdir)/ginclude/varargs.h $(srcdir)/ginclude/va-alpha.h \
145 $(srcdir)/ginclude/va-h8300.h $(srcdir)/ginclude/va-i860.h \
146 $(srcdir)/ginclude/va-i960.h $(srcdir)/ginclude/va-mips.h \
147 $(srcdir)/ginclude/va-m88k.h $(srcdir)/ginclude/va-mn10200.h \
148 $(srcdir)/ginclude/va-mn10300.h $(srcdir)/ginclude/va-pa.h \
149 $(srcdir)/ginclude/va-pyr.h $(srcdir)/ginclude/va-sparc.h \
150 $(srcdir)/ginclude/va-clipper.h $(srcdir)/ginclude/va-spur.h \
151 $(srcdir)/ginclude/va-m32r.h $(srcdir)/ginclude/va-sh.h \
152 $(srcdir)/ginclude/va-v850.h $(srcdir)/ginclude/va-arc.h \
153 $(srcdir)/ginclude/iso646.h $(srcdir)/ginclude/va-ppc.h \
154 $(srcdir)/ginclude/va-c4x.h $(EXTRA_HEADERS) $(LANG_EXTRA_HEADERS) \
155 $(srcdir)/ginclude/proto.h $(srcdir)/ginclude/stdbool.h
157 # Target to use whe installing assert.h. Some systems may
158 # want to set this empty.
159 INSTALL_ASSERT_H = install-assert-h
161 # The GCC to use for compiling libgcc2.a, enquire, and libgcc1-test.
162 # Usually the one we just built.
163 # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
164 GCC_FOR_TARGET = ./xgcc -B./ -B$(build_tooldir)/bin/
166 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
167 # It omits XCFLAGS, and specifies -B./.
168 # It also specifies -I./include to find, e.g., stddef.h.
169 GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) -I./include $(TCFLAGS)
171 # Sed command to transform gcc to installed name. Overwritten by configure.
172 program_transform_name = @program_transform_name@
173 program_transform_cross_name = s,^,$(target_alias)-,
175 build_canonical = @build_canonical@
176 host_canonical = @host_canonical@
178 # Tools to use when building a cross-compiler.
179 # These are used because `configure' appends `cross-make'
180 # to the makefile when making a cross-compiler.
182 # Use the tools from the build tree, if they are available.
184 # objdir is set by configure.
185 objdir = @objdir@
187 AR_FOR_TARGET = ` \
188 if [ -f $(objdir)/../binutils/ar ] ; then \
189 echo $(objdir)/../binutils/ar ; \
190 else \
191 if [ "$(host_canonical)" = "$(target)" ] ; then \
192 echo ar; \
193 else \
194 t='$(program_transform_name)'; echo ar | sed -e $$t ; \
195 fi; \
197 AR_FOR_TARGET_FLAGS = rc
198 RANLIB_FOR_TARGET = ` \
199 if [ -f $(objdir)/../binutils/ranlib ] ; then \
200 echo $(objdir)/../binutils/ranlib ; \
201 else \
202 if [ "$(host_canonical)" = "$(target)" ] ; then \
203 echo ranlib; \
204 else \
205 t='$(program_transform_name)'; echo ranlib | sed -e $$t ; \
206 fi; \
208 RANLIB_TEST_FOR_TARGET = \
209 [ -f $(RANLIB_FOR_TARGET) ] \
210 || ( [ "$(host_canonical)" = "$(target)" ] \
211 && [ -f /usr/bin/ranlib -o -f /bin/ranlib ] )
213 # We always act like a cross-compiler, even when we're
214 # compiling native. This is because we want to use our own tools if
215 # we can. We don't just set RANLIB to a complicated expression,
216 # because the top level Makefile.in might override RANLIB_FOR_TARGET.
217 # These are from the FSF file "cross-make".
218 AR = $(AR_FOR_TARGET)
219 AR_FLAGS = $(AR_FOR_TARGET_FLAGS)
220 OLDAR = $(AR_FOR_TARGET)
221 OLDAR_FLAGS = $(AR_FOR_TARGET_FLAGS)
222 RANLIB = $(RANLIB_FOR_TARGET)
223 RANLIB_TEST = $(RANLIB_TEST_FOR_TARGET)
225 # Dir to search for system headers. Overridden by cross-make.
226 SYSTEM_HEADER_DIR = /usr/include
228 # Control whether to run fixproto.
229 STMP_FIXPROTO = stmp-fixproto
231 # Test to see whether <limits.h> exists in the system header files.
232 LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ]
234 # There may be a premade insn-attrtab.c for this machine.
235 # (You could rebuild it with genattrtab as usual, but it takes a long time.)
236 # PREMADE_ATTRTAB is the file name of the file to use.
237 # PREMADE_ATTRTAB_MD is the md file it corresponds to.
238 PREMADE_ATTRTAB_MD = Makefile # Guaranteed not to cmp equal to md.
239 PREMADE_ATTRTAB =
241 target=@target@
242 target_alias=@target_alias@
243 xmake_file=@dep_host_xmake_file@
244 tmake_file=@dep_tmake_file@
245 out_file=$(srcdir)/config/@out_file@
246 out_object_file=@out_object_file@
247 md_file=$(srcdir)/config/@md_file@
248 tm_file=@tm_file_list@
249 build_xm_file=@build_xm_file_list@
250 host_xm_file=@host_xm_file_list@
251 lang_specs_files=@lang_specs_files@
252 lang_options_files=@lang_options_files@
253 lang_tree_files=@lang_tree_files@
254 GCC_THREAD_FILE=@thread_file@
255 OBJC_BOEHM_GC=@objc_boehm_gc@
256 JAVAGC=@JAVAGC@
257 GTHREAD_FLAGS=@gthread_flags@
258 # Be prepared for gcc2 merges.
259 gcc_version=@gcc_version@
260 gcc_version_trigger=@gcc_version_trigger@
261 version=$(gcc_version)
262 mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
264 # Common prefix for installation directories.
265 # NOTE: This directory must exist when you start installation.
266 prefix = @prefix@
267 # Directory in which to put localized header files. On the systems with
268 # gcc as the native cc, `local_prefix' may not be `prefix' which is
269 # `/usr'.
270 # NOTE: local_prefix *should not* default from prefix.
271 local_prefix = @local_prefix@
272 # Directory in which to put host dependent programs and libraries
273 exec_prefix = @exec_prefix@
274 # Directory in which to put the executable for the command `gcc'
275 bindir = @bindir@
276 # Directory in which to put the directories used by the compiler.
277 libdir = @libdir@
278 # Directory in which the compiler finds executables, libraries, etc.
279 libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(version)
280 # Used to produce a relative $(tooldir) in gcc.o
281 unlibsubdir = ../../..
282 # Directory in which the compiler finds g++ includes.
283 gxx_include_dir= @gxx_include_dir@
284 # Directory to search for site-specific includes.
285 includedir = $(local_prefix)/include
286 # assertdir is overridden in cross-make.
287 # (But this currently agrees with what is in cross-make.)
288 assertdir = $(tooldir)/include
289 # where the info files go
290 infodir = @infodir@
291 # Extension (if any) to put in installed man-page filename.
292 manext = .1
293 objext = .o
294 exeext = @host_exeext@
295 build_exeext = @build_exeext@
297 # Directory in which to put man pages.
298 mandir = @mandir@
299 man1dir = $(mandir)/man1
300 # Directory in which to find other cross-compilation tools and headers.
301 # Used in install-cross.
302 tooldir = $(libsubdir)/$(unlibsubdir)/../$(target_alias)
303 # Since tooldir does not exist at build-time, use -B$(build_tooldir)/bin/
304 build_tooldir = $(exec_prefix)/$(target_alias)
305 # Dir for temp files.
306 tmpdir = /tmp
308 # Additional system libraries to link with.
309 CLIB=
311 # Change this to a null string if obstacks are installed in the
312 # system library.
313 OBSTACK=obstack.o
315 # Configure will set these if you need vfprintf and possibly _doprnt support.
316 VFPRINTF=@vfprintf@
317 DOPRINT=@doprint@
319 # Specify the rule for actually making libgcc.a,
320 LIBGCC = libgcc.a
321 # and the rule for installing it.
322 INSTALL_LIBGCC = install-libgcc
324 # Specify the rule for actually making libgcc1.a.
325 # The value may be empty; that means to do absolutely nothing
326 # with or for libgcc1.a.
327 LIBGCC1 = libgcc1.a
329 # Specify the rule for making libgcc1.a for a cross-compiler.
330 # The default rule assumes that libgcc1.a is supplied by the user.
331 CROSS_LIBGCC1 = libgcc1.cross
333 # Specify the rule for actually making libgcc2.a.
334 LIBGCC2 = libgcc2.a
336 # Options to use when compiling libgcc2.a.
337 # -g1 causes output of debug info only for file-scope entities.
338 # we use this here because that should be enough, and also
339 # so that -g1 will be tested.
341 LIBGCC2_DEBUG_CFLAGS = -g1
342 LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) $(GTHREAD_FLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED @inhibit_libc@
344 # Additional options to use when compiling libgcc2.a.
345 # Some targets override this to -Iinclude
346 LIBGCC2_INCLUDES =
348 # Additional target-dependent options for compiling libgcc2.a.
349 TARGET_LIBGCC2_CFLAGS =
351 # Things which must be built before building libgcc2.a.
352 # Some targets override this to stmp-int-hdrs
353 LIBGCC2_DEPS =
355 # libgcc1-test target (must also be overridable for a target)
356 LIBGCC1_TEST = libgcc1-test
358 # List of extra executables that should be compiled for this target machine
359 # that are used for compiling from source code to object code.
360 # The rules for compiling them should be in the t-* file for the machine.
361 EXTRA_PASSES =@extra_passes@
363 # Like EXTRA_PASSES, but these are used when linking.
364 EXTRA_PROGRAMS = @extra_programs@
366 # List of extra object files that should be compiled for this target machine.
367 # The rules for compiling them should be in the t-* file for the machine.
368 EXTRA_PARTS = @extra_parts@
370 # List of extra object files that should be compiled and linked with
371 # compiler proper (cc1, cc1obj, cc1plus).
372 EXTRA_OBJS = @extra_objs@
374 # List of extra object files that should be compiled and linked with
375 # the gcc driver.
376 EXTRA_GCC_OBJS =@host_extra_gcc_objs@
378 # List of additional header files to install.
379 # Often this is edited directly by `configure'.
380 EXTRA_HEADERS =@extra_headers_list@
382 # Set this to `collect2' to enable use of collect2.
383 USE_COLLECT2 = @will_use_collect2@
384 MAYBE_USE_COLLECT2 = @maybe_use_collect2@
385 # It is convenient for configure to add the assignment at the beginning,
386 # so don't override it here.
387 USE_COLLECT2 = collect2$(exeext)
389 # List of extra C and assembler files to add to libgcc1.a.
390 # Assembler files should have names ending in `.asm'.
391 LIB1FUNCS_EXTRA =
393 # List of extra C and assembler files to add to libgcc2.a.
394 # Assembler files should have names ending in `.asm'.
395 LIB2FUNCS_EXTRA =
397 # Default float.h source to use for cross-compiler.
398 # This is overridden by configure.
399 CROSS_FLOAT_H=$(srcdir)/config/float-@float_format@.h
401 # We do not try to build float.h anymore. Let configure select the
402 # appropriate pre-built float.h file for the target.
403 FLOAT_H=$(srcdir)/config/float-@float_format@.h
405 # Program to convert libraries.
406 LIBCONVERT =
408 # Control whether header files are installed.
409 INSTALL_HEADERS=install-headers
411 # Options for tar when copying trees. So HPUX can override it.
412 TAROUTOPTS = xpBf
414 # Select which version of fixincludes to use (I.E. regular versus SVR4)
415 # This value is overridden directly by configure.
416 FIXINCLUDES = @fixincludes@
418 # Additional directories of header files to run fixincludes on.
419 # These should be directories searched automatically by default
420 # just as /usr/include is.
421 # *Do not* use this for directories that happen to contain
422 # header files, but are not searched automatically by default.
423 # On most systems, this is empty.
424 OTHER_FIXINCLUDES_DIRS=
426 # A list of all the language-specific executables.
427 # This is overridden by configure.
428 COMPILERS = cc1$(exeext) @all_compilers@
430 # List of things which should already be built whenever we try to use xgcc
431 # to compile anything (without linking).
432 GCC_PASSES=xgcc$(exeext) cc1$(exeext) cpp$(exeext) $(EXTRA_PASSES)
434 # List of things which should already be built whenever we try to use xgcc
435 # to link anything.
436 GCC_PARTS=$(GCC_PASSES) $(LIBGCC) $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS)
438 # Directory to link to, when using the target `maketest'.
439 DIR = ../gcc
441 # Guaranteed to not exist when not passing md through cpp.
442 # This value is overridden directly by configure.
443 MD_FILE = md-cpp-not-used
445 # Flags to use when cross-building GCC.
446 # Prefix to apply to names of object files when using them
447 # to run on the machine we are compiling on.
448 HOST_PREFIX=
449 # Prefix to apply to names of object files when compiling them
450 # to run on the machine we are compiling on.
451 # The default for this variable is chosen to keep these rules
452 # out of the way of the other rules for compiling the same source files.
453 HOST_PREFIX_1=loser-
454 HOST_CC=$(CC)
455 HOST_CFLAGS=$(ALL_CFLAGS)
456 HOST_CLIB=$(CLIB)
457 HOST_LDFLAGS=$(LDFLAGS)
458 HOST_CPPFLAGS=$(ALL_CPPFLAGS)
459 HOST_ALLOCA=$(ALLOCA)
460 HOST_MALLOC=$(MALLOC)
461 HOST_OBSTACK=$(OBSTACK)
462 HOST_VFPRINTF=$(VFPRINTF)
463 HOST_DOPRINT=$(DOPRINT)
465 # Actual name to use when installing a native compiler.
466 GCC_INSTALL_NAME = `t='$(program_transform_name)'; echo gcc | sed -e $$t`
467 PROTOIZE_INSTALL_NAME = `t='$(program_transform_name)'; echo protoize | sed -e $$t`
468 UNPROTOIZE_INSTALL_NAME = `t='$(program_transform_name)'; echo unprotoize | sed -e $$t`
469 GCOV_INSTALL_NAME = `t='$(program_transform_name)'; echo gcov | sed -e $$t`
471 # Actual name to use when installing a cross-compiler.
472 GCC_CROSS_NAME = `t='$(program_transform_cross_name)'; echo gcc | sed -e $$t`
473 PROTOIZE_CROSS_NAME = `t='$(program_transform_cross_name)'; echo protoize | sed -e $$t`
474 UNPROTOIZE_CROSS_NAME = `t='$(program_transform_cross_name)'; echo unprotoize | sed -e $$t`
476 # Choose the real default target.
477 ALL=all.internal
479 # Choose the real install target.
480 INSTALL_TARGET=install-normal
482 # Setup the testing framework, if you have one
483 EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
484 echo $${rootme}/../expect/expect ; \
485 else echo expect ; fi`
487 RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
488 echo $${srcdir}/../dejagnu/runtest ; \
489 else echo runtest; fi`
490 RUNTESTFLAGS =
492 # Extra symbols for fixproto to define when parsing headers.
493 FIXPROTO_DEFINES =
495 # Extra flags to use when compiling crt{begin,end}.o.
496 CRTSTUFF_T_CFLAGS =
498 # Extra flags to use when compiling [m]crt0.o.
499 CRT0STUFF_T_CFLAGS =
501 # "t" or nothing, for building multilibbed versions of, say, crtbegin.o.
504 # End of variables for you to override.
506 # Definition of `all' is here so that new rules inserted by sed
507 # do not specify the default target.
508 # The real definition is under `all.internal' (for native compilers)
509 # or `all.cross' (for cross compilers).
510 all: all.indirect
512 # This tells GNU Make version 3 not to put all variables in the environment.
513 .NOEXPORT:
515 # sed inserts variable overrides after the following line.
516 ####target overrides
517 @target_overrides@
519 ####host overrides
520 @host_overrides@
522 ####cross overrides
523 @cross_defines@
524 @cross_overrides@
526 ####build overrides
527 @build_overrides@
529 # Now figure out from those variables how to compile and link.
531 all.indirect: $(ALL)
533 # IN_GCC tells various files that system.h, toplev.c, etc are available.
534 INTERNAL_CFLAGS = $(CROSS) -DIN_GCC $(SCHED_CFLAGS) @extra_c_flags@
536 # This is the variable actually used when we compile.
537 # If you change this line, you probably also need to change the definition
538 # of HOST_CFLAGS in build-make to match.
539 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS) \
540 @DEFS@
542 # Likewise.
543 ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
545 # Even if ALLOCA is set, don't use it if compiling with GCC.
546 USE_ALLOCA= ${ALLOCA}
547 USE_HOST_ALLOCA= ` case "${HOST_ALLOCA}" in ?*) echo ${HOST_PREFIX}${HOST_ALLOCA} ;; esac `
548 USE_HOST_MALLOC= ` case "${HOST_MALLOC}" in ?*) echo ${HOST_PREFIX}${HOST_MALLOC} ;; esac `
549 USE_HOST_OBSTACK= ` case "${HOST_OBSTACK}" in ?*) echo ${HOST_PREFIX}${HOST_OBSTACK} ;; esac `
550 USE_HOST_VFPRINTF= ` case "${HOST_VFPRINTF}" in ?*) echo ${HOST_PREFIX}${HOST_VFPRINTF} ;; esac `
551 USE_HOST_DOPRINT= ` case "${HOST_DOPRINT}" in ?*) echo ${HOST_PREFIX}${HOST_DOPRINT} ;; esac `
553 # Dependency on obstack, alloca, malloc or whatever library facilities
554 # are not installed in the system libraries.
555 # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
556 LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC) $(VFPRINTF) $(DOPRINT)
558 # Likewise, for use in the tools that must run on this machine
559 # even if we are cross-building GCC.
560 # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
561 HOST_LIBDEPS= $(HOST_PREFIX)$(HOST_OBSTACK) $(HOST_PREFIX)$(HOST_ALLOCA) $(HOST_PREFIX)$(HOST_MALLOC) $(HOST_PREFIX)$(HOST_VFPRINTF) $(HOST_PREFIX)$(HOST_DOPRINT)
563 # How to link with both our special library facilities
564 # and the system's installed libraries.
565 LIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC) $(VFPRINTF) $(DOPRINT) $(CLIB) \
566 ../libiberty/libiberty.a
568 # Likewise, for use in the tools that must run on this machine
569 # even if we are cross-building GCC.
570 HOST_LIBS = $(USE_HOST_OBSTACK) $(USE_HOST_ALLOCA) $(USE_HOST_MALLOC) \
571 $(USE_HOST_VFPRINTF) $(USE_HOST_DOPRINT) $(HOST_CLIB)
573 HOST_RTL = $(HOST_PREFIX)rtl.o $(HOST_PREFIX)bitmap.o
574 HOST_RTLANAL = $(HOST_PREFIX)rtlanal.o
575 HOST_PRINT = $(HOST_PREFIX)print-rtl.o
577 # Specify the directories to be searched for header files.
578 # Both . and srcdir are used, in that order,
579 # so that tm.h and config.h will be found in the compilation
580 # subdirectory rather than in the source directory.
581 INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config -I$(srcdir)/../include
583 # Always use -I$(srcdir)/config when compiling.
584 .c.o:
585 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
587 # This tells GNU make version 3 not to export all the variables
588 # defined in this file into the environment.
589 .NOEXPORT:
591 # Support for additional languages (other than c and objc).
592 # ??? objc can be supported this way too (leave for later).
594 # These next lines are overridden by configure.
595 LANG_MAKEFILES = @all_lang_makefiles@
596 LANG_STAGESTUFF = @all_stagestuff@
597 LANG_DIFF_EXCLUDES = @all_diff_excludes@
598 LANG_LIB2FUNCS = @all_lib2funcs@
599 LANG_EXTRA_HEADERS = @all_headers@
601 # Flags to pass to recursive makes.
602 # CC is set by configure. Hosts without symlinks need special handling
603 # because we need CC="stage1/xgcc -Bstage1/" to work in the language
604 # subdirectories.
605 # ??? The choices here will need some experimenting with.
606 FLAGS_TO_PASS = \
607 "AR_FLAGS=$(AR_FOR_TARGET_FLAGS)" \
608 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
609 "BISON=$(BISON)" \
610 "BISONFLAGS=$(BISONFLAGS)" \
611 "CC=@cc_set_by_configure@" \
612 "CFLAGS=$(CFLAGS)" \
613 "CLIB=$(CLIB)" \
614 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
615 "LDFLAGS=$(LDFLAGS)" \
616 "LEX=$(LEX)" \
617 "LEXFLAGS=$(LEXFLAGS)" \
618 "LN=$(LN)" \
619 "LN_S=$(LN_S)" \
620 "MAKEINFO=$(MAKEINFO)" \
621 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
622 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
623 "RANLIB_TEST_FOR_TARGET=$(RANLIB_TEST_FOR_TARGET)" \
624 "SHELL=$(SHELL)" \
625 "STAGE_PREFIX=@stage_prefix_set_by_configure@" \
626 "exeext=$(exeext)" \
627 "build_exeext=$(build_exeext)" \
628 "objext=$(objext)" \
629 "exec_prefix=$(exec_prefix)" \
630 "prefix=$(prefix)" \
631 "local_prefix=$(local_prefix)" \
632 "gxx_include_dir=$(gxx_include_dir)" \
633 "tooldir=$(tooldir)" \
634 "bindir=$(bindir)" \
635 "libsubdir=$(libsubdir)"
637 # Lists of files for various purposes.
639 # Language-specific object files for C and Objective C.
640 C_AND_OBJC_OBJS = c-lex.o c-pragma.o c-decl.o c-typeck.o c-convert.o \
641 c-aux-info.o c-common.o c-iterate.o @extra_c_objs@
643 # Language-specific object files for C.
644 C_OBJS = c-parse.o c-lang.o $(C_AND_OBJC_OBJS)
646 SCHED_PREFIX = @sched_prefix@
647 SCHED_CFLAGS = @sched_cflags@
649 # Language-independent object files.
650 OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
651 function.o stmt.o except.o expr.o calls.o expmed.o explow.o optabs.o \
652 varasm.o rtl.o print-rtl.o rtlanal.o emit-rtl.o genrtl.o real.o regmove.o \
653 dbxout.o sdbout.o dwarfout.o dwarf2out.o xcoffout.o bitmap.o alias.o \
654 integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o varray.o \
655 regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o gcse.o \
656 insn-peep.o reorg.o $(SCHED_PREFIX)sched.o final.o recog.o reg-stack.o \
657 insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \
658 profile.o insn-attrtab.o $(out_object_file) getpwd.o $(EXTRA_OBJS) convert.o \
659 mbchar.o dyn-string.o splay-tree.o graph.o sbitmap.o
661 # GEN files are listed separately, so they can be built before doing parallel
662 # makes for cc1 or cc1plus. Otherwise sequent parallel make attempts to load
663 # them before rtl.o is compiled.
664 GEN= genemit genoutput genrecog genextract genflags gencodes genconfig \
665 genpeep gengenrtl gencheck
667 CCCP=@cpp_main@
669 # Files to be copied away after each stage in building.
670 STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \
671 insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
672 insn-attr.h insn-attrtab.c insn-opinit.c genrtl.c genrtl.h tree-check.h \
673 s-flags s-config s-codes s-mlib s-under\
674 s-output s-recog s-emit s-extract s-peep s-check \
675 s-attr s-attrtab s-opinit s-crt s-crtS s-crt0 \
676 genemit$(build_exeext) genoutput$(build_exeext) genrecog$(build_exeext) \
677 genextract$(build_exeext) genflags$(build_exeext) gencodes$(build_exeext) \
678 genconfig$(build_exeext) genpeep$(build_exeext) genattrtab$(build_exeext) \
679 genattr$(build_exeext) genopinit$(build_exeext) gengenrtl$(build_exeext) \
680 gencheck$(build_exeext) \
681 xgcc$(exeext) cc1$(exeext) cpp$(exeext) $(EXTRA_PASSES) \
682 $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) \
683 $(CCCP)$(exeext) cc1obj$(exeext) enquire$(exeext) \
684 protoize$(exeext) unprotoize$(exeext) \
685 specs collect2$(exeext) $(USE_COLLECT2) underscore.c \
686 gcov$(exeext) *.bp \
687 *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop \
688 *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack *.gcse \
689 *.[si] libcpp.a \
690 $(LANG_STAGESTUFF)
692 # Members of libgcc1.a.
693 LIB1FUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
694 _lshrsi3 _ashrsi3 _ashlsi3 \
695 _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \
696 _fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \
697 _addsf3 _negsf2 _subsf3 _mulsf3 _divsf3 \
698 _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
699 _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2
701 # Library members defined in libgcc2.c.
702 LIB2FUNCS = _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
703 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 \
704 _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \
705 _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
706 _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \
707 _fixtfdi _fixunstfdi _floatditf \
708 __gcc_bcmp _varargs __dummy _eprintf \
709 _bb _shtab _clear_cache _trampoline __main _exit \
710 _ctors _pure
712 LIB2FUNCS_EH = _eh
714 FPBIT_FUNCS = _pack_sf _unpack_sf _addsub_sf _mul_sf _div_sf \
715 _fpcmp_parts_sf _compare_sf _eq_sf _ne_sf _gt_sf _ge_sf \
716 _lt_sf _le_sf _si_to_sf _sf_to_si _negate_sf _make_sf \
717 _sf_to_df
719 DPBIT_FUNCS = _pack_df _unpack_df _addsub_df _mul_df _div_df \
720 _fpcmp_parts_df _compare_df _eq_df _ne_df _gt_df _ge_df \
721 _lt_df _le_df _si_to_df _df_to_si _negate_df _make_df \
722 _df_to_sf
724 # The files that "belong" in CONFIG_H are deliberately omitted
725 # because having them there would not be useful in actual practice.
726 # All they would do is cause complete recompilation every time
727 # one of the machine description files is edited.
728 # That may or may not be what one wants to do.
729 # If it is, rm *.o is an easy way to do it.
730 # CONFIG_H = $(host_xm_file) $(tm_file)
731 CONFIG_H =
732 RTL_BASE_H = rtl.h rtl.def machmode.h machmode.def
733 RTL_H = $(RTL_BASE_H) genrtl.h
734 TREE_H = tree.h real.h tree.def machmode.h machmode.def tree-check.h
735 BASIC_BLOCK_H = basic-block.h bitmap.h sbitmap.h
736 DEMANGLE_H = $(srcdir)/../include/demangle.h
737 RECOG_H = recog.h
738 EXPR_H = expr.h insn-codes.h
739 REGS_H = regs.h varray.h machmode.h machmode.def
741 # Language makefile fragments.
743 # The following targets define the interface between us and the languages.
745 # all.build, all.cross, start.encap, rest.encap,
746 # info, dvi,
747 # install-normal, install-common, install-info, install-man,
748 # uninstall, distdir,
749 # mostlyclean, clean, distclean, extraclean, maintainer-clean,
750 # stage1, stage2, stage3, stage4
752 # Each language is linked in with a series of hooks (since we can't use `::'
753 # targets). The name of each hooked is "lang.${target_name}" (eg: lang.info).
754 # Configure computes and adds these here.
756 ####language hooks
757 @language_hooks@
759 # sed inserts language fragments after the following line.
760 ####language fragments
761 @language_fragments@
763 # End of language makefile fragments.
765 # The only suffixes we want for implicit rules are .c and .o, so clear
766 # the list and add them. This speeds up GNU Make, and allows -r to work.
767 .SUFFIXES:
768 .SUFFIXES: .c .o
770 Makefile: $(srcdir)/Makefile.in config.status $(srcdir)/version.c \
771 $(xmake_file) $(tmake_file) $(LANG_MAKEFILES)
772 $(SHELL) $(srcdir)/configure.frag $(srcdir) "$(SUBDIRS)" \
773 "$(xmake_file)" "$(tmake_file)"
774 cp config.status config.run
775 LANGUAGES="$(CONFIG_LANGUAGES)" $(SHELL) config.run
776 rm -f config.run
778 $(srcdir)/configure: $(srcdir)/configure.in
779 cd $(srcdir); autoconf
781 # cstamp-h.in controls rebuilding of config.in.
782 # It is named cstamp-h.in and not stamp-h.in so the mostlyclean rule doesn't
783 # delete it. A stamp file is needed as autoheader won't update the file if
784 # nothing has changed.
785 # It remains in the source directory and is part of the distribution.
786 # This follows what is done in shellutils, fileutils, etc.
787 # "echo timestamp" is used instead of touch to be consistent with other
788 # packages that use autoconf (??? perhaps also to avoid problems with patch?).
789 # ??? Newer versions have a maintainer mode that may be useful here.
790 $(srcdir)/config.in: $(srcdir)/cstamp-h.in
791 $(srcdir)/cstamp-h.in: $(srcdir)/configure.in $(srcdir)/acconfig.h
792 cd $(srcdir) && autoheader
793 @rm -f $(srcdir)/cstamp-h.in
794 echo timestamp > $(srcdir)/cstamp-h.in
795 auto-host.h: cstamp-h ; @true
796 cstamp-h: config.in config.status
797 CONFIG_HEADERS=auto-host.h:config.in LANGUAGES="$(CONFIG_LANGUAGES)" $(SHELL) config.status
799 # Really, really stupid make features, such as SUN's KEEP_STATE, may force
800 # a target to build even if it is up-to-date. So we must verify that
801 # config.status does not exist before failing.
802 config.status: configure version.c
803 @if [ ! -f config.status ] ; then \
804 echo You must configure gcc. Look at the INSTALL file for details.; \
805 false; \
806 else \
807 LANGUAGES="$(CONFIG_LANGUAGES)" $(SHELL) config.status --recheck; \
810 all.internal: start.encap rest.encap
811 # This is what to compile if making a cross-compiler.
812 # Note that we can compile enquire using the cross-compiler just built,
813 # although we can't run it on this machine.
814 all.cross: native gcc-cross specs stmp-headers $(STMP_FIXPROTO) $(LIBGCC) \
815 $(LIBGCC1_TEST) $(EXTRA_PARTS) lang.all.cross
816 # This is what to compile if making gcc with a cross-compiler.
817 all.build: native xgcc$(exeext) $(EXTRA_PARTS) lang.all.build
818 # This is what must be made before installing GCC and converting libraries.
819 start.encap: native xgcc$(exeext) specs $(LIBGCC1) xlimits.h lang.start.encap
820 # These can't be made until after GCC can run.
821 rest.encap: stmp-headers $(STMP_FIXPROTO) $(LIBGCC) $(EXTRA_PARTS) lang.rest.encap
822 # This is what is made with the host's compiler
823 # whether making a cross compiler or not.
824 native: config.status auto-host.h cpp$(exeext) $(LANGUAGES) \
825 $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2)
827 # Define the names for selecting languages in LANGUAGES.
828 C c: cc1$(exeext)
829 PROTO: proto
831 # Tell GNU make these are phony targets.
832 .PHONY: C c PROTO proto
834 # On the target machine, finish building a cross compiler.
835 # This does the things that can't be done on the host machine.
836 rest.cross: $(LIBGCC) gfloat.h specs
838 # Verify that it works to compile and link libgcc1-test.
839 # If it does, then there are sufficient replacements for libgcc1.a.
840 libgcc1-test: libgcc1-test.o native $(GCC_PARTS)
841 @echo "Testing libgcc1. Ignore linker warning messages."
842 $(GCC_FOR_TARGET) $(GCC_CFLAGS) libgcc1-test.o -o libgcc1-test \
843 -nostartfiles -nostdlib `$(GCC_FOR_TARGET) --print-libgcc-file-name`
844 libgcc1-test.o: libgcc1-test.c native xgcc$(exeext)
845 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -c $(srcdir)/libgcc1-test.c
847 # Recompile all the language-independent object files.
848 # This is used only if the user explicitly asks for it.
849 compilations: ${OBJS}
851 # Create a list of the language-independent object files so the language
852 # subdirectories needn't mention their names explicitly.
853 stamp-objlist: $(OBJS)
854 echo " $(OBJS)" | sed -e 's, \([a-z0-9]\), ../\1,g' -e 's/\.o/$(objext)/g' >stamp-objlist
856 # We call this executable `xgcc' rather than `gcc'
857 # to avoid confusion if the current directory is in the path
858 # and CC is `gcc'. It is renamed to `gcc' when it is installed.
859 xgcc$(exeext): gcc.o version.o choose-temp.o pexecute.o prefix.o version.o \
860 mkstemp.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
861 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o prefix.o version.o \
862 choose-temp.o pexecute.o mkstemp.o $(EXTRA_GCC_OBJS) $(LIBS)
864 # Dump a specs file to make -B./ read these specs over installed ones.
865 specs: xgcc$(exeext)
866 $(GCC_FOR_TARGET) -dumpspecs > tmp-specs
867 mv tmp-specs specs
869 # We do want to create an executable named `xgcc', so we can use it to
870 # compile libgcc2.a.
871 # Also create gcc-cross, so that install-common will install properly.
872 gcc-cross: xgcc$(exeext)
873 cp xgcc$(exeext) gcc-cross$(exeext)
875 cc1$(exeext): $(P) $(OBJS) $(C_OBJS) $(LIBDEPS)
876 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(C_OBJS) $(LIBS)
878 # Copy float.h from its source.
879 gfloat.h: $(FLOAT_H)
880 -rm -f gfloat.h
881 cp $(FLOAT_H) gfloat.h
883 # Build the version of limits.h that we will install.
884 xlimits.h: glimits.h limitx.h limity.h
885 if $(LIMITS_H_TEST) ; then \
886 cat $(srcdir)/limitx.h $(srcdir)/glimits.h $(srcdir)/limity.h > tmp-xlimits.h; \
887 else \
888 cat $(srcdir)/glimits.h > tmp-xlimits.h; \
890 mv tmp-xlimits.h xlimits.h
892 # Build libgcc.a.
893 # This is done in two parts because some functions, in libgcc1.c,
894 # must be compiled with something other than GCC,
895 # while the rest, in libgcc2.c, must be compiled with xgcc.
896 # That means we can't do libgcc2.c until after xgcc, cc1, etc.
898 # Use this as value of LIBGCC1 to cause conversion to GNU library format.
899 # LIBCONVERT should put its output in libgcc1.conv.
900 libgcc1.conv: libgcc1.a
901 $(LIBCONVERT) libgcc1.a libgcc1.conv
903 # Use this as value of LIBGCC1 to inhibit use of libgcc1.c entirely.
904 # Make an empty file instead.
905 libgcc1.null: $(GCC_PASSES)
906 echo "void __foo () {}" > dummy.c
907 $(GCC_FOR_TARGET) $(GCC_CFLAGS) -c dummy.c
908 $(OLDAR) $(OLDAR_FLAGS) libgcc1.null dummy$(objext)
909 rm -f dummy$(objext) dummy.c
911 # This is $(LIBGCC1) for a cross-compiler.
912 # We have no automatic way of building libgcc1.a,
913 # so it's up to the installer to find a way to do that.
914 # This rule deliberately does not depend on libgcc1.a
915 # so that it will fail if the installer hasn't provided it.
916 libgcc1.cross:
917 mv libgcc1.a libgcc1.cross || (echo You must find a way to make libgcc1.a; false)
919 # Compile the library of arithmetic subroutines with the native compiler.
920 # Don't compile it with GCC!
921 # (That would cause most arithmetic functions to call themselves.)
923 # NOTE: If you modify these rules substantially, please be sure to
924 # check at least config/i386/t-sco5 and possibly other makefile
925 # fragments.
926 libgcc1.a: libgcc1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status
927 -rm -f tmplibgcc1.a
928 # Actually build it in tmplibgcc1.a, then rename at end,
929 # so that libgcc1.a itself remains nonexistent if compilation is aborted.
930 # -e causes any failing command to make this rule fail.
931 # -e doesn't work in certain shells, so we test $$? as well.
932 # lynx has a broken ar, it always complains when the initial library is
933 # empty, thus this command works only if we don't do -e
934 # There is a trailing backslash (\) deleted from the following line.
935 # set -e;
936 for name in $(LIB1FUNCS); \
937 do \
938 echo $${name}; \
939 rm -f $${name}$(objext); \
940 $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -c -DL$${name} $(srcdir)/libgcc1.c; \
941 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
942 mv libgcc1$(objext) $${name}$(objext); \
943 $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \
944 rm -f $${name}$(objext); \
945 done
946 # Some shells crash when a loop has no items.
947 # So make sure there is always at least one--`..'.
948 # Then ignore it.
949 # We don't use -e here because there are if statements
950 # that should not make the command give up when the if condition is false.
951 # Instead, we test for failure after each command where it matters.
952 for file in .. $(LIB1FUNCS_EXTRA); \
953 do \
954 if [ x$${file} != x.. ]; then \
955 name=`echo $${file} | sed -e 's/[.][cS]$$//' -e 's/[.]asm$$//'`; \
956 echo $${name}; \
957 if [ $${name}.asm = $${file} ]; then \
958 cp $${file} $${name}.s || exit 1; file=$${name}.s; \
959 else true; fi; \
960 $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -c $${file}; \
961 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
962 $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \
963 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
964 rm -f $${name}.s $${name}$(objext); \
965 else true; \
966 fi; \
967 done
968 -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc1.a; else true; fi
969 mv tmplibgcc1.a libgcc1.a
971 # Build libgcc1.a from assembler source. LIB1ASMFUNCS is the list of
972 # functions. LIB1ASMSRC is the name of the source file in the config
973 # subdirectory.
974 libgcc1-asm.a: libgcc2.ready config.status $(srcdir)/config/$(LIB1ASMSRC)
975 -rm -f tmplibgcc1.a libgcc1.S
976 cp $(srcdir)/config/$(LIB1ASMSRC) libgcc1.S
977 # Actually build it in tmplibgcc1.a, then rename at end,
978 # so that libgcc1-asm.a itself remains nonexistent if compilation is aborted.
979 # -e causes any failing command to make this rule fail.
980 # -e doesn't work in certain shells, so we test $$? as well.
981 # lynx has a broken ar, it always complains when the initial library is
982 # empty, thus this command works only if we don't do -e
983 # There is a trailing backslash (\) deleted from the following line.
984 # set -e;
985 for name in $(LIB1ASMFUNCS); \
986 do \
987 echo $${name}; \
988 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} libgcc1.S; \
989 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
990 mv libgcc1$(objext) $${name}$(objext); \
991 $(AR) $(AR_FLAGS) tmplibgcc1.a $${name}$(objext); \
992 rm -f $${name}$(objext); \
993 done
994 -rm -f libgcc1.S
995 mv tmplibgcc1.a libgcc1-asm.a
997 # Generate assembly versions of the functions required for libgcc1.
998 # You'll still need to massage the code by hand (possibly hacking
999 # underscores and local labels) but this will get you started.
1000 libgcc1.S: libgcc1.c $(CONFIG_H) config.status
1001 -rm -f libgcc1.S
1002 touch libgcc1.S
1003 for name in $(LIB1FUNCS); \
1004 do \
1005 echo $${name}; \
1006 $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -S -DL$${name} $(srcdir)/libgcc1.c; \
1007 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
1008 echo '#ifdef ' L$${name} >> libgcc1.S; \
1009 cat libgcc1.s >> libgcc1.S; \
1010 echo '#endif /*' L$${name} '*/' >> libgcc1.S; \
1011 echo "" >> libgcc1.S; \
1012 done
1014 # Compiling libgcc2.a requires making sure that cc1, etc. have been compiled.
1015 # But recompiling cc1 should not force recompilation of libgcc2.a.
1016 # If you want to force recompilation, delete libgcc2.a.
1017 libgcc2.ready: $(GCC_PASSES) $(LIBGCC2_DEPS) stmp-int-hdrs $(STMP_FIXPROTO)
1018 -if [ -f libgcc2.ready ] ; then \
1019 true; \
1020 else \
1021 touch libgcc2.ready; \
1024 LIB2ADD = $(srcdir)/frame.c $(LIB2FUNCS_EXTRA) $(LANG_LIB2FUNCS)
1025 libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(FPBIT) $(DPBIT) $(LIB2ADD) \
1026 machmode.h longlong.h frame.h gbl-ctors.h config.status
1027 # Actually build it in tmplibgcc2.a, then rename at end,
1028 # so that libgcc2.a itself remains nonexistent if compilation is aborted.
1029 -rm -f tmplibgcc2.a
1030 # -e causes any failing command to make this rule fail.
1031 # -e doesn't work in certain shells, so we test $$? as well.
1032 # lynx has a broken ar, it always complains when the initial library is
1033 # empty, thus this command works only if we don't do -e
1034 # There is a trailing backslash (\) deleted from the following line.
1035 # set -e;
1036 for name in $(LIB2FUNCS); \
1037 do \
1038 echo $${name}; \
1039 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
1040 $(srcdir)/libgcc2.c -o $${name}$(objext); \
1041 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
1042 $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}$(objext); \
1043 rm -f $${name}$(objext); \
1044 done
1045 for name in $(LIB2FUNCS_EH); \
1046 do \
1047 echo $${name}; \
1048 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -fexceptions $(INCLUDES) -c \
1049 -DL$${name} $(srcdir)/libgcc2.c -o $${name}$(objext); \
1050 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
1051 $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}$(objext); \
1052 rm -f $${name}$(objext); \
1053 done
1054 if [ x$(FPBIT) != x ]; then \
1055 for name in $(FPBIT_FUNCS); \
1056 do \
1057 echo $${name}; \
1058 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
1059 -DFINE_GRAINED_LIBRARIES $(FPBIT) -o $${name}$(objext); \
1060 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
1061 $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}$(objext); \
1062 rm -f $${name}$(objext); \
1063 done; \
1064 else true; fi;
1065 if [ x$(DPBIT) != x ]; then \
1066 for name in $(DPBIT_FUNCS); \
1067 do \
1068 echo $${name}; \
1069 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
1070 -DFINE_GRAINED_LIBRARIES $(DPBIT) -o $${name}$(objext); \
1071 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
1072 $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}$(objext); \
1073 rm -f $${name}$(objext); \
1074 done; \
1075 else true; fi;
1076 # Some shells crash when a loop has no items.
1077 # So make sure there is always at least one--`..'.
1078 # Then ignore it.
1079 # We don't use -e here because there are if statements
1080 # that should not make the command give up when the if condition is false.
1081 # Instead, we test for failure after each command where it matters.
1082 for file in $(LIB2ADD); do \
1083 name=`echo $${file} | sed -e 's/[.][cSo]$$//' -e 's/[.]asm$$//' -e 's/[.]txt$$//'`; \
1084 oname=` echo $${name} | sed -e 's,.*/,,'`; \
1085 if [ $${name}.txt = $${file} ]; then \
1086 for f in .. `cat $${file}`; do if [ x$${f} != x.. ]; then \
1087 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1088 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" \
1089 CFLAGS="$(CFLAGS)" HOST_PREFIX="$(HOST_PREFIX)" \
1090 HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1091 LANGUAGES="$(LANGUAGES)" \
1092 LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $${f}; \
1093 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
1094 $(AR) $(AR_FLAGS) tmplibgcc2.a $${f}; \
1095 rm -f $${f}; \
1096 else true; \
1097 fi; done; \
1098 else \
1099 echo $${name}; \
1100 if [ $${name}.asm = $${file} ]; then \
1101 cp $${file} $${name}.s || exit 1; file=$${name}.s; \
1102 else true; fi; \
1103 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
1104 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
1105 $(AR) $(AR_FLAGS) tmplibgcc2.a $${oname}$(objext); \
1106 rm -f $${name}.s $${oname}$(objext); \
1107 fi; \
1108 done
1109 mv tmplibgcc2.a libgcc2.a
1110 # These lines were deleted from above the mv command
1111 # because ranlibing libgcc.a itself should suffice.
1112 # -if [ x${HPUX_GAS} = x ] ; then \
1113 # if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc2.a; else true; fi; \
1114 # else true; fi
1116 # Combine the various libraries into a single library, libgcc.a.
1117 libgcc.a: $(LIBGCC1) $(LIBGCC2)
1118 -rm -rf tmplibgcc.a libgcc.a tmpcopy
1119 mkdir tmpcopy
1120 -if [ x$(LIBGCC1) != x ]; \
1121 then (cd tmpcopy; $(AR) x ../$(LIBGCC1)); \
1122 else true; \
1124 # Some versions of ar (specifically the one in RISC/os 5.x), create an
1125 # unwritable table of contents file, and then print an error message when
1126 # the second ar command tries to overwrite this file. To avoid the error
1127 # message from ar, we make sure all files are writable.
1128 -(cd tmpcopy; chmod +w * > /dev/null 2>&1)
1129 (cd tmpcopy; $(AR) x ../$(LIBGCC2))
1130 (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *$(objext))
1131 rm -rf tmpcopy
1132 -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
1133 # Actually build it in tmplibgcc.a, then rename at end,
1134 # so that libgcc.a itself remains nonexistent if compilation is aborted.
1135 mv tmplibgcc.a libgcc.a
1137 # Use the genmultilib shell script to generate the information the gcc
1138 # driver program needs to select the library directory based on the
1139 # switches.
1140 multilib.h: s-mlib; @true
1141 s-mlib: $(srcdir)/genmultilib Makefile
1142 $(SHELL) $(srcdir)/genmultilib \
1143 "$(MULTILIB_OPTIONS)" \
1144 "$(MULTILIB_DIRNAMES)" \
1145 "$(MULTILIB_MATCHES)" \
1146 "$(MULTILIB_EXCEPTIONS)" \
1147 "$(MULTILIB_EXTRA_OPTS)" > tmp-mlib.h
1148 $(srcdir)/move-if-change tmp-mlib.h multilib.h
1149 touch s-mlib
1151 # Build multiple copies of libgcc.a, one for each target switch.
1152 stmp-multilib: $(LIBGCC1) libgcc2.c libgcc2.ready $(CONFIG_H) \
1153 frame.h \
1154 $(LIB2ADD) machmode.h longlong.h gbl-ctors.h config.status
1155 for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
1156 dir=`echo $$i | sed -e 's/;.*$$//'`; \
1157 flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
1158 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1159 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
1160 RANLIB="$(RANLIB)" RANLIB_TEST="$(RANLIB_TEST)" \
1161 LANGUAGES="$(LANGUAGES)" \
1162 HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1163 LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS) $${flags}" \
1164 MULTILIB_CFLAGS="$${flags}" \
1165 LIBGCC1="$(LIBGCC1)" LIBGCC2="$(LIBGCC2)" \
1166 dir="$${dir}" stmp-multilib-sub; \
1167 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
1168 done
1169 touch stmp-multilib
1171 # Subroutine of stmp-multilib so make -n works.
1172 stmp-multilib-sub:
1173 rm -f $(LIBGCC2)
1174 if [ -d $(dir) ]; then \
1175 cd $(dir); \
1176 rm -f libgcc.a $(EXTRA_MULTILIB_PARTS); \
1177 else true; \
1179 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1180 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
1181 HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1182 LANGUAGES="$(LANGUAGES)" \
1183 LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC2)
1184 if [ x$(LIBGCC1) != xlibgcc1-asm.a ]; \
1185 then true; \
1186 else rm -f $(LIBGCC1); \
1188 if [ x$(LIBGCC1) != xlibgcc1-asm.a ]; \
1189 then true; \
1190 else \
1191 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1192 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
1193 HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1194 LANGUAGES="$(LANGUAGES)" \
1195 LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC1); \
1197 rm -rf tmplibgcc.a tmpcopy
1198 mkdir tmpcopy
1199 if [ x$(LIBGCC1) != x ]; \
1200 then (cd tmpcopy; $(AR) x ../$(LIBGCC1)); \
1201 else true; \
1203 (cd tmpcopy; $(AR) x ../$(LIBGCC2))
1204 (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *$(objext))
1205 rm -rf libgcc2.a tmpcopy
1206 if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
1207 if [ -d $(dir) ]; then true; else mkdir $(dir); fi
1208 mv tmplibgcc.a $(dir)/libgcc.a
1209 for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
1210 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1211 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
1212 HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1213 LANGUAGES="$(LANGUAGES)" \
1214 MULTILIB_CFLAGS="$(MULTILIB_CFLAGS)" T="t" t$${f}; \
1215 mv t$${f} $(dir)/$${f}; \
1216 else true; \
1217 fi; done
1219 # Compile two additional files that are linked with every program
1220 # linked using GCC on systems using COFF or ELF, for the sake of C++
1221 # constructors.
1222 $(T)crtbegin.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) \
1223 defaults.h frame.h gbl-ctors.h
1224 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
1225 -finhibit-size-directive -fno-inline-functions -fno-exceptions $(CRTSTUFF_T_CFLAGS) \
1226 -c $(srcdir)/crtstuff.c -DCRT_BEGIN -o $(T)crtbegin$(objext)
1228 $(T)crtend.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) \
1229 defaults.h frame.h gbl-ctors.h
1230 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
1231 -finhibit-size-directive -fno-inline-functions -fno-exceptions $(CRTSTUFF_T_CFLAGS) \
1232 -c $(srcdir)/crtstuff.c -DCRT_END -o $(T)crtend$(objext)
1234 # On some systems we also want to install versions of these files
1235 # compiled using PIC for use in shared libraries.
1236 crtbeginS.o crtendS.o: s-crtS ; @true
1238 s-crtS: crtstuff.c $(GCC_PASSES) $(CONFIG_H) \
1239 defaults.h frame.h gbl-ctors.h
1240 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS_S) \
1241 -DCRT_BEGIN -DCRTSTUFFS_O -finhibit-size-directive -fno-inline-functions \
1242 -fno-exceptions -g0 -c $(srcdir)/crtstuff.c
1243 mv crtstuff$(objext) crtbeginS$(objext)
1244 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS_S) \
1245 -DCRT_END -DCRTSTUFFS_O -finhibit-size-directive -fno-inline-functions \
1246 -fno-exceptions -g0 -c $(srcdir)/crtstuff.c -o crtendS$(objext)
1247 touch s-crtS
1249 # Compile the start modules crt0.o and mcrt0.o that are linked with every program
1250 crt0.o: s-crt0 ; @true
1251 mcrt0.o: s-crt0; @true
1253 s-crt0: $(CRT0_S) $(MCRT0_S) $(GCC_PASSES) $(CONFIG_H)
1254 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(CRT0STUFF_T_CFLAGS) \
1255 -o crt0.o -c $(CRT0_S)
1256 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(CRT0STUFF_T_CFLAGS) \
1257 -o mcrt0.o -c $(MCRT0_S)
1258 touch s-crt0
1260 # Compiling object files from source files.
1262 # Note that dependencies on obstack.h are not written
1263 # because that file is not part of GCC.
1265 # C language specific files.
1267 c-parse.o : $(srcdir)/c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \
1268 $(srcdir)/c-parse.h c-tree.h input.h flags.h system.h toplev.h
1269 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/c-parse.c
1270 $(srcdir)/c-parse.h: $(srcdir)/c-parse.c
1271 $(srcdir)/c-parse.c: $(srcdir)/c-parse.y
1272 cd $(srcdir); $(BISON) $(BISONFLAGS) -d c-parse.y -o c-parse.c
1273 $(srcdir)/c-parse.y: c-parse.in
1274 echo '/*WARNING: This file is automatically generated!*/' >tmp-c-parse.y
1275 sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \
1276 -e "/^ifc$$/d" -e "/^end ifc$$/d" \
1277 $(srcdir)/c-parse.in >>tmp-c-parse.y
1278 $(srcdir)/move-if-change tmp-c-parse.y $(srcdir)/c-parse.y
1280 $(srcdir)/c-gperf.h: c-parse.gperf
1281 gperf -L KR-C -F ', 0, 0' -p -j1 -i 1 -g -o -t -G -N is_reserved_word \
1282 -k1,3,$$ $(srcdir)/c-parse.gperf >tmp-gperf.h
1283 $(srcdir)/move-if-change tmp-gperf.h $(srcdir)/c-gperf.h
1285 c-decl.o : c-decl.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-lex.h flags.h \
1286 output.h toplev.h
1287 c-typeck.o : c-typeck.c $(CONFIG_H) system.h $(TREE_H) c-tree.h flags.h \
1288 output.h $(EXPR_H) $(RTL_H) toplev.h
1289 c-lang.o : c-lang.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-lex.h toplev.h \
1290 output.h
1291 c-lex.o : c-lex.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) c-lex.h c-tree.h \
1292 $(srcdir)/c-parse.h input.h flags.h $(srcdir)/c-gperf.h c-pragma.h \
1293 toplev.h output.h mbchar.h
1294 c-aux-info.o : c-aux-info.c $(CONFIG_H) system.h $(TREE_H) c-tree.h flags.h
1295 c-convert.o : c-convert.c $(CONFIG_H) system.h $(TREE_H) flags.h toplev.h
1296 c-pragma.o: c-pragma.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) except.h \
1297 function.h defaults.h c-pragma.h toplev.h
1298 c-iterate.o: c-iterate.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) c-tree.h \
1299 flags.h toplev.h $(EXPR_H)
1300 mbchar.o: mbchar.c $(CONFIG_H) system.h mbchar.h
1301 graph.o: graph.c $(CONFIG_H) system.h toplev.h flags.h output.h $(RTL_H) \
1302 hard-reg-set.h $(BASIC_BLOCK_H)
1303 sbitmap.o: sbitmap.c $(CONFIG_H) system.h $(RTL_H) flags.h $(BASIC_BLOCK_H)
1305 collect2$(exeext): collect2.o tlink.o hash.o cplus-dem.o underscore.o \
1306 version.o choose-temp.o mkstemp.o $(LIBDEPS)
1307 # Don't try modifying collect2 (aka ld) in place--it might be linking this.
1308 -rm -f collect2$(exeext)
1309 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ collect2.o tlink.o hash.o \
1310 cplus-dem.o underscore.o version.o choose-temp.o mkstemp.o $(LIBS)
1312 collect2.o : collect2.c $(CONFIG_H) system.h gstab.h \
1313 $(srcdir)/../include/obstack.h $(DEMANGLE_H) collect2.h
1314 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1315 -DTARGET_MACHINE=\"$(target_alias)\" $(MAYBE_USE_COLLECT2) \
1316 -c `echo $(srcdir)/collect2.c | sed 's,^\./,,'`
1318 tlink.o: tlink.c $(DEMANGLE_H) hash.h $(CONFIG_H) system.h toplev.h collect2.h
1319 hash.o: hash.c hash.h system.h toplev.h
1321 cplus-dem.o: $(srcdir)/../libiberty/cplus-dem.c $(DEMANGLE_H)
1322 rm -f cplus-dem.c
1323 $(LN_S) $(srcdir)/../libiberty/cplus-dem.c cplus-dem.c
1324 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) cplus-dem.c
1326 pexecute.o: $(srcdir)/../libiberty/pexecute.c $(CONFIG_H) system.h
1327 rm -f pexecute.c
1328 $(LN_S) $(srcdir)/../libiberty/pexecute.c pexecute.c
1329 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) pexecute.c
1331 vfprintf.o: $(srcdir)/../libiberty/vfprintf.c $(CONFIG_H) system.h
1332 rm -f vfprintf.c
1333 $(LN_S) $(srcdir)/../libiberty/vfprintf.c vfprintf.c
1334 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) vfprintf.c
1336 splay-tree.o: $(srcdir)/../libiberty/splay-tree.c \
1337 $(srcdir)/../include/splay-tree.h $(srcdir)/../include/libiberty.h
1338 rm -f splay-tree.c
1339 $(LN_S) $(srcdir)/../libiberty/splay-tree.c splay-tree.c
1340 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) splay-tree.c
1342 underscore.c: s-under ; @true
1344 s-under: $(GCC_PASSES)
1345 echo "int xxy_us_dummy;" >tmp-dum.c
1346 $(GCC_FOR_TARGET) -S tmp-dum.c
1347 echo '/*WARNING: This file is automatically generated!*/' >tmp-under.c
1348 if grep _xxy_us_dummy tmp-dum.s > /dev/null ; then \
1349 echo "int prepends_underscore = 1;" >>tmp-under.c; \
1350 else \
1351 echo "int prepends_underscore = 0;" >>tmp-under.c; \
1353 $(srcdir)/move-if-change tmp-under.c underscore.c
1354 -rm -f tmp-dum.c tmp-dum.s
1355 touch s-under
1357 # A file used by all variants of C.
1359 c-common.o : c-common.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-lex.h \
1360 flags.h toplev.h output.h c-pragma.h $(RTL_H)
1362 # Language-independent files.
1364 DRIVER_DEFINES = \
1365 -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
1366 -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
1367 -DDEFAULT_TARGET_VERSION=\"$(version)\" \
1368 -DDEFAULT_TARGET_MACHINE=\"$(target_alias)\" \
1369 -DTOOLDIR_BASE_PREFIX=\"$(exec_prefix)/\"
1370 gcc.o: gcc.c $(CONFIG_H) system.h multilib.h Makefile prefix.h \
1371 $(lang_specs_files)
1372 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1373 $(DRIVER_DEFINES) \
1374 -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'`
1376 tree-check.h: s-check ; @true
1377 s-check : gencheck $(srcdir)/move-if-change
1378 ./gencheck > tmp-check.h
1379 $(srcdir)/move-if-change tmp-check.h tree-check.h
1380 touch s-check
1382 gencheck : gencheck.o tree.def $(lang_tree_files) $(HOST_LIBDEPS)
1383 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1384 gencheck.o $(HOST_LIBS)
1386 gencheck.o : gencheck.c hconfig.h system.h
1387 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencheck.c
1389 dumpvers: dumpvers.c
1391 version.o: version.c
1392 obstack.o: $(srcdir)/../libiberty/obstack.c $(CONFIG_H)
1393 rm -f obstack.c
1394 $(LN_S) $(srcdir)/../libiberty/obstack.c obstack.c
1395 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) obstack.c
1397 choose-temp.o: $(srcdir)/../libiberty/choose-temp.c $(CONFIG_H) system.h
1398 rm -f choose-temp.c
1399 $(LN_S) $(srcdir)/../libiberty/choose-temp.c choose-temp.c
1400 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) choose-temp.c
1402 mkstemp.o: $(srcdir)/../libiberty/mkstemp.c $(CONFIG_H) system.h
1403 rm -f mkstemp.c
1404 $(LN_S) $(srcdir)/../libiberty/mkstemp.c mkstemp.c
1405 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) mkstemp.c
1407 prefix.o: prefix.c $(CONFIG_H) system.h Makefile prefix.h
1408 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1409 -DPREFIX=\"$(prefix)\" \
1410 -c `echo $(srcdir)/prefix.c | sed 's,^\./,,'`
1412 convert.o: convert.c $(CONFIG_H) $(TREE_H) flags.h convert.h toplev.h
1414 tree.o : tree.c $(CONFIG_H) system.h $(TREE_H) flags.h function.h toplev.h except.h
1415 print-tree.o : print-tree.c $(CONFIG_H) system.h $(TREE_H)
1416 stor-layout.o : stor-layout.c $(CONFIG_H) system.h $(TREE_H) flags.h \
1417 function.h $(EXPR_H) $(RTL_H) toplev.h except.h
1418 fold-const.o : fold-const.c $(CONFIG_H) system.h $(TREE_H) flags.h toplev.h \
1419 $(RTL_H)
1420 toplev.o : toplev.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) \
1421 flags.h input.h insn-attr.h xcoffout.h defaults.h output.h \
1422 insn-codes.h insn-config.h $(RECOG_H) Makefile toplev.h dwarfout.h \
1423 dwarf2out.h sdbout.h dbxout.h $(EXPR_H) \
1424 $(lang_options_files)
1425 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(MAYBE_USE_COLLECT2) \
1426 -DTARGET_NAME=\"$(target_alias)\" \
1427 -c `echo $(srcdir)/toplev.c | sed 's,^\./,,'`
1429 rtl.o : rtl.c $(CONFIG_H) system.h $(RTL_H) bitmap.h
1431 print-rtl.o : print-rtl.c $(CONFIG_H) system.h $(RTL_H) bitmap.h
1432 rtlanal.o : rtlanal.c $(CONFIG_H) system.h $(RTL_H)
1434 varasm.o : varasm.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) flags.h \
1435 function.h defaults.h $(EXPR_H) hard-reg-set.h $(REGS_H) \
1436 xcoffout.h output.h c-pragma.h toplev.h except.h dbxout.h sdbout.h
1437 function.o : function.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
1438 function.h insn-flags.h insn-codes.h $(EXPR_H) $(REGS_H) hard-reg-set.h \
1439 insn-config.h $(RECOG_H) output.h toplev.h except.h
1440 stmt.o : stmt.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h function.h \
1441 insn-flags.h insn-config.h insn-codes.h hard-reg-set.h $(EXPR_H) except.h \
1442 loop.h $(RECOG_H) toplev.h output.h
1443 except.o : except.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
1444 function.h insn-flags.h $(EXPR_H) $(REGS_H) hard-reg-set.h \
1445 insn-config.h $(RECOG_H) output.h except.h toplev.h
1446 expr.o : expr.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h function.h \
1447 $(REGS_H) insn-flags.h insn-codes.h $(EXPR_H) insn-config.h $(RECOG_H) output.h \
1448 typeclass.h hard-reg-set.h toplev.h hard-reg-set.h except.h
1449 calls.o : calls.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h $(EXPR_H) \
1450 insn-flags.h $(REGS_H) toplev.h output.h
1451 expmed.o : expmed.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
1452 insn-flags.h insn-config.h insn-codes.h $(EXPR_H) $(RECOG_H) real.h
1453 explow.o : explow.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
1454 hard-reg-set.h insn-config.h $(EXPR_H) $(RECOG_H) insn-flags.h insn-codes.h
1455 optabs.o : optabs.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
1456 insn-flags.h insn-config.h insn-codes.h $(EXPR_H) $(RECOG_H) reload.h
1457 dbxout.o : dbxout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) flags.h $(REGS_H) \
1458 insn-config.h reload.h gstab.h xcoffout.h defaults.h output.h dbxout.h \
1459 toplev.h
1460 sdbout.o : sdbout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) flags.h except.h \
1461 function.h $(EXPR_H) output.h hard-reg-set.h $(REGS_H) defaults.h real.h \
1462 insn-config.h $(srcdir)/../include/obstack.h xcoffout.h c-pragma.h \
1463 sdbout.h toplev.h
1464 dwarfout.o : dwarfout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) dwarf.h \
1465 flags.h insn-config.h reload.h output.h defaults.h toplev.h dwarfout.h
1466 dwarf2out.o : dwarf2out.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) dwarf2.h \
1467 flags.h insn-config.h reload.h output.h defaults.h \
1468 hard-reg-set.h $(REGS_H) $(EXPR_H) toplev.h dwarf2out.h dyn-string.h
1469 xcoffout.o : xcoffout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) xcoffout.h \
1470 flags.h toplev.h output.h dbxout.h
1471 emit-rtl.o : emit-rtl.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
1472 except.h function.h $(REGS_H) insn-config.h $(RECOG_H) real.h \
1473 $(EXPR_H) $(srcdir)/../include/obstack.h hard-reg-set.h bitmap.h
1474 real.o : real.c $(CONFIG_H) system.h $(TREE_H) toplev.h
1475 getpwd.o : getpwd.c $(CONFIG_H) system.h
1477 integrate.o : integrate.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
1478 integrate.h insn-flags.h insn-config.h $(EXPR_H) real.h $(REGS_H) \
1479 function.h output.h $(RECOG_H) except.h toplev.h
1481 jump.o : jump.c $(CONFIG_H) system.h $(RTL_H) flags.h hard-reg-set.h $(REGS_H) \
1482 insn-config.h insn-flags.h $(RECOG_H) $(EXPR_H) real.h except.h \
1483 toplev.h
1484 stupid.o : stupid.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) hard-reg-set.h \
1485 $(BASIC_BLOCK_H) insn-config.h reload.h flags.h toplev.h
1487 cse.o : cse.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) hard-reg-set.h flags.h \
1488 real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h output.h
1489 gcse.o : gcse.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) hard-reg-set.h flags.h \
1490 real.h insn-config.h $(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) output.h
1491 profile.o : profile.c $(CONFIG_H) system.h $(RTL_H) flags.h insn-flags.h \
1492 gcov-io.h $(TREE_H) output.h $(REGS_H) toplev.h insn-config.h
1493 loop.o : loop.c $(CONFIG_H) system.h $(RTL_H) flags.h loop.h insn-config.h \
1494 insn-flags.h $(REGS_H) hard-reg-set.h $(RECOG_H) $(EXPR_H) real.h \
1495 toplev.h
1496 unroll.o : unroll.c $(CONFIG_H) system.h $(RTL_H) insn-config.h \
1497 integrate.h $(REGS_H) $(RECOG_H) flags.h $(EXPR_H) loop.h toplev.h
1498 flow.o : flow.c $(CONFIG_H) system.h $(RTL_H) flags.h insn-config.h \
1499 $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h recog.h
1500 combine.o : combine.c $(CONFIG_H) system.h $(RTL_H) flags.h \
1501 insn-config.h insn-flags.h insn-codes.h insn-attr.h $(REGS_H) $(EXPR_H) \
1502 $(BASIC_BLOCK_H) $(RECOG_H) real.h hard-reg-set.h toplev.h
1503 regclass.o : regclass.c $(CONFIG_H) system.h $(RTL_H) hard-reg-set.h flags.h \
1504 $(BASIC_BLOCK_H) $(REGS_H) insn-config.h $(RECOG_H) reload.h real.h toplev.h \
1505 output.h
1506 local-alloc.o : local-alloc.c $(CONFIG_H) system.h $(RTL_H) flags.h \
1507 $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h insn-config.h $(RECOG_H) output.h \
1508 insn-attr.h toplev.h
1509 bitmap.o : bitmap.c $(CONFIG_H) system.h $(RTL_H) flags.h $(BASIC_BLOCK_H) \
1510 $(REGS_H)
1511 global.o : global.c $(CONFIG_H) system.h $(RTL_H) flags.h reload.h \
1512 $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h insn-config.h output.h toplev.h
1513 varray.o : varray.c $(CONFIG_H) system.h varray.h $(RTL_H) $(TREE_H) bitmap.h
1515 reload.o : reload.c $(CONFIG_H) system.h $(RTL_H) flags.h output.h $(EXPR_H) \
1516 reload.h $(RECOG_H) hard-reg-set.h insn-config.h insn-codes.h $(REGS_H) \
1517 real.h toplev.h
1518 reload1.o : reload1.c $(CONFIG_H) system.h $(RTL_H) real.h flags.h $(EXPR_H) \
1519 reload.h $(REGS_H) hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
1520 $(BASIC_BLOCK_H) $(RECOG_H) output.h toplev.h
1521 caller-save.o : caller-save.c $(CONFIG_H) system.h $(RTL_H) flags.h \
1522 $(REGS_H) hard-reg-set.h insn-config.h $(BASIC_BLOCK_H) \
1523 $(RECOG_H) reload.h $(EXPR_H) toplev.h
1524 reorg.o : reorg.c $(CONFIG_H) system.h $(RTL_H) conditions.h hard-reg-set.h \
1525 $(BASIC_BLOCK_H) $(REGS_H) insn-config.h insn-attr.h \
1526 insn-flags.h $(RECOG_H) flags.h output.h $(EXPR_H)
1527 alias.o : alias.c $(CONFIG_H) system.h $(RTL_H) flags.h hard-reg-set.h \
1528 $(REGS_H) toplev.h output.h $(EXPR_H)
1529 regmove.o : regmove.c $(CONFIG_H) system.h $(RTL_H) insn-config.h \
1530 $(RECOG_H) output.h reload.h $(REGS_H) hard-reg-set.h flags.h \
1531 $(EXPR_H) insn-flags.h $(BASIC_BLOCK_H) toplev.h
1532 $(SCHED_PREFIX)sched.o : $(SCHED_PREFIX)sched.c $(CONFIG_H) system.h $(RTL_H) \
1533 $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h \
1534 insn-attr.h toplev.h recog.h
1535 final.o : final.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h $(REGS_H) \
1536 $(RECOG_H) conditions.h insn-config.h insn-attr.h except.h real.h output.h \
1537 hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h \
1538 toplev.h reload.h dwarfout.h dwarf2out.h sdbout.h dbxout.h
1539 recog.o : recog.c $(CONFIG_H) system.h $(RTL_H) \
1540 $(REGS_H) $(RECOG_H) hard-reg-set.h flags.h insn-config.h insn-attr.h \
1541 insn-flags.h insn-codes.h real.h toplev.h
1542 reg-stack.o : reg-stack.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) recog.h \
1543 $(REGS_H) hard-reg-set.h flags.h insn-config.h insn-flags.h toplev.h
1544 dyn-string.o: dyn-string.c dyn-string.h $(CONFIG_H) system.h
1546 $(out_object_file): $(out_file) $(CONFIG_H) $(TREE_H) \
1547 $(RTL_H) $(REGS_H) hard-reg-set.h real.h insn-config.h conditions.h \
1548 insn-flags.h output.h insn-attr.h insn-codes.h system.h toplev.h
1549 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(out_file)
1551 # Build auxiliary files that support ecoff format.
1552 mips-tfile: mips-tfile.o version.o $(LIBDEPS)
1553 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tfile.o version.o $(LIBS)
1555 mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H) system.h machmode.h
1557 mips-tdump: mips-tdump.o version.o $(LIBDEPS)
1558 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tdump.o version.o $(LIBS)
1560 mips-tdump.o : mips-tdump.c $(CONFIG_H) $(RTL_H) system.h
1562 # Build file to support OSF/rose half-pic format.
1563 halfpic.o: halfpic.c $(CONFIG_H) $(RTL_H) $(TREE_H) system.h
1565 # Normally this target is not used; but it is used if you
1566 # define ALLOCA=alloca.o. In that case, you must get a suitable alloca.c
1567 # from the GNU Emacs distribution.
1568 alloca.o: $(srcdir)/../libiberty/alloca.c
1569 rm -f alloca.c
1570 $(LN_S) $(srcdir)/../libiberty/alloca.c alloca.c
1571 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(ALLOCA_FLAGS) \
1572 -c `echo alloca.c | sed 's,^\./,,'`
1573 $(ALLOCA_FINISH)
1575 # Generate header and source files from the machine description,
1576 # and compile them.
1578 .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
1579 insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
1580 insn-attr.h insn-attrtab.c
1582 # The following pair of rules has this effect:
1583 # genconfig is run only if the md has changed since genconfig was last run;
1584 # but the file insn-config.h is touched only when its contents actually change.
1586 # Each of the other insn-* files is handled by a similar pair of rules.
1588 # This causes an anomaly in the results of make -n
1589 # because insn-* is older than s-*
1590 # and thus make -n thinks that insn-* will be updated
1591 # and force recompilation of things that depend on it.
1592 # We use move-if-change precisely to avoid such recompilation.
1593 # But there is no way to teach make -n that it will be avoided.
1595 # Each of the insn-*.[ch] rules has a semicolon at the end,
1596 # for otherwise the system Make on SunOS 4.1 never tries
1597 # to recompile insn-*.o. To avoid problems and extra noise from
1598 # versions of make which don't like empty commands (nothing after the
1599 # trailing `;'), we call true for each.
1601 insn-config.h: s-config ; @true
1602 s-config : $(md_file) genconfig $(srcdir)/move-if-change
1603 ./genconfig $(md_file) > tmp-config.h
1604 $(srcdir)/move-if-change tmp-config.h insn-config.h
1605 touch s-config
1607 insn-flags.h: s-flags ; @true
1608 s-flags : $(md_file) genflags $(srcdir)/move-if-change
1609 ./genflags $(md_file) > tmp-flags.h
1610 $(srcdir)/move-if-change tmp-flags.h insn-flags.h
1611 touch s-flags
1613 insn-codes.h: s-codes ; @true
1614 s-codes : $(md_file) gencodes $(srcdir)/move-if-change
1615 ./gencodes $(md_file) > tmp-codes.h
1616 $(srcdir)/move-if-change tmp-codes.h insn-codes.h
1617 touch s-codes
1619 insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) $(EXPR_H) real.h output.h \
1620 insn-config.h insn-flags.h insn-codes.h system.h reload.h recog.h
1621 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c
1623 insn-emit.c: s-emit ; @true
1624 s-emit : $(md_file) genemit $(srcdir)/move-if-change
1625 ./genemit $(md_file) > tmp-emit.c
1626 $(srcdir)/move-if-change tmp-emit.c insn-emit.c
1627 touch s-emit
1629 insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h $(RECOG_H) \
1630 real.h output.h flags.h system.h
1631 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-recog.c
1633 insn-recog.c: s-recog ; @true
1634 s-recog : $(md_file) genrecog $(srcdir)/move-if-change
1635 ./genrecog $(md_file) > tmp-recog.c
1636 $(srcdir)/move-if-change tmp-recog.c insn-recog.c
1637 touch s-recog
1639 insn-opinit.o : insn-opinit.c $(CONFIG_H) $(RTL_H) insn-codes.h insn-flags.h \
1640 insn-config.h flags.h $(RECOG_H) $(EXPR_H) reload.h system.h
1641 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-opinit.c
1643 insn-opinit.c: s-opinit ; @true
1644 s-opinit : $(md_file) genopinit $(srcdir)/move-if-change
1645 ./genopinit $(md_file) > tmp-opinit.c
1646 $(srcdir)/move-if-change tmp-opinit.c insn-opinit.c
1647 touch s-opinit
1649 insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H) system.h toplev.h \
1650 insn-config.h recog.h
1651 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-extract.c
1653 insn-extract.c: s-extract ; @true
1654 s-extract : $(md_file) genextract $(srcdir)/move-if-change
1655 ./genextract $(md_file) > tmp-extract.c
1656 $(srcdir)/move-if-change tmp-extract.c insn-extract.c
1657 touch s-extract
1659 insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) $(REGS_H) output.h real.h \
1660 system.h insn-config.h recog.h
1661 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-peep.c
1663 insn-peep.c: s-peep ; @true
1664 s-peep : $(md_file) genpeep $(srcdir)/move-if-change
1665 ./genpeep $(md_file) > tmp-peep.c
1666 $(srcdir)/move-if-change tmp-peep.c insn-peep.c
1667 touch s-peep
1669 insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) $(REGS_H) real.h \
1670 output.h insn-attr.h insn-config.h system.h toplev.h
1671 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-attrtab.c
1673 insn-attr.h: s-attr ; @true
1674 s-attr : $(md_file) genattr $(srcdir)/move-if-change
1675 ./genattr $(md_file) > tmp-attr.h
1676 $(srcdir)/move-if-change tmp-attr.h insn-attr.h
1677 touch s-attr
1679 insn-attrtab.c: s-attrtab ; @true
1680 s-attrtab : $(md_file) genattrtab $(srcdir)/move-if-change
1681 if cmp -s $(PREMADE_ATTRTAB_MD) $(md_file); \
1682 then \
1683 echo Using $(PREMADE_ATTRTAB); \
1684 cp $(PREMADE_ATTRTAB) tmp-attrtab.c; \
1685 else \
1686 ./genattrtab $(md_file) > tmp-attrtab.c; \
1688 $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c
1689 touch s-attrtab
1691 insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) $(REGS_H) real.h conditions.h \
1692 hard-reg-set.h insn-config.h insn-flags.h insn-attr.h output.h $(RECOG_H) \
1693 insn-codes.h system.h
1694 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-output.c
1696 insn-output.c: s-output ; @true
1697 s-output : $(md_file) genoutput $(srcdir)/move-if-change
1698 ./genoutput $(md_file) > tmp-output.c
1699 $(srcdir)/move-if-change tmp-output.c insn-output.c
1700 touch s-output
1702 genrtl.o : genrtl.c $(CONFIG_H) $(RTL_H) system.h
1703 genrtl.c genrtl.h : s-genrtl
1704 @true # force gnu make to recheck modification times.
1706 s-genrtl: gengenrtl $(srcdir)/move-if-change $(RTL_BASE_H)
1707 ./gengenrtl tmp-genrtl.h tmp-genrtl.c
1708 $(srcdir)/move-if-change tmp-genrtl.h genrtl.h
1709 $(srcdir)/move-if-change tmp-genrtl.c genrtl.c
1710 touch s-genrtl
1713 # Compile the programs that generate insn-* from the machine description.
1714 # They are compiled with $(HOST_CC), and associated libraries,
1715 # since they need to run on this machine
1716 # even if GCC is being compiled to run on some other machine.
1718 # $(CONFIG_H) is omitted from the deps of the gen*.o
1719 # because these programs don't really depend on anything
1720 # about the target machine. They do depend on config.h itself,
1721 # since that describes the host machine.
1723 # Pass the md file through cpp if the target requests it.
1724 $(MD_FILE): $(MD_DEPS)
1725 rm -f $@
1726 $(MD_CPP) $(MD_CPPFLAGS) $(md_file) | sed 's/^# /; /g' > tmp-$@
1727 mv tmp-$@ $@
1729 genconfig : genconfig.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS)
1730 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1731 genconfig.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS)
1733 genconfig.o : genconfig.c $(RTL_H) $(build_xm_file) system.h
1734 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconfig.c
1736 genflags : genflags.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS)
1737 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1738 genflags.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS)
1740 genflags.o : genflags.c $(RTL_H) $(build_xm_file) system.h
1741 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genflags.c
1743 gencodes : gencodes.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS)
1744 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1745 gencodes.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS)
1747 gencodes.o : gencodes.c $(RTL_H) $(build_xm_file) system.h
1748 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencodes.c
1750 genemit : genemit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS)
1751 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1752 genemit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS)
1754 genemit.o : genemit.c $(RTL_H) $(build_xm_file) system.h
1755 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genemit.c
1757 genopinit : genopinit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS)
1758 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1759 genopinit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS)
1761 genopinit.o : genopinit.c $(RTL_H) $(build_xm_file) system.h
1762 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genopinit.c
1764 genrecog : genrecog.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS)
1765 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1766 genrecog.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS)
1768 genrecog.o : genrecog.c $(RTL_H) $(build_xm_file) system.h
1769 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genrecog.c
1771 genextract : genextract.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS)
1772 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1773 genextract.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS)
1775 genextract.o : genextract.c $(RTL_H) $(build_xm_file) system.h insn-config.h
1776 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genextract.c
1778 genpeep : genpeep.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS)
1779 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1780 genpeep.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS)
1782 genpeep.o : genpeep.c $(RTL_H) $(build_xm_file) system.h
1783 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpeep.c
1785 genattr : genattr.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS)
1786 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1787 genattr.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS)
1789 genattr.o : genattr.c $(RTL_H) $(build_xm_file) system.h
1790 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattr.c
1792 genattrtab : genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBDEPS)
1793 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1794 genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBS)
1796 genattrtab.o : genattrtab.c $(RTL_H) $(build_xm_file) system.h insn-config.h
1797 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c
1799 genoutput : genoutput.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS)
1800 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1801 genoutput.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS)
1803 genoutput.o : genoutput.c $(RTL_H) $(build_xm_file) system.h
1804 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genoutput.c
1806 gengenrtl : gengenrtl.o $(HOST_LIBDEPS)
1807 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1808 gengenrtl.o $(HOST_LIBS)
1810 gengenrtl.o : gengenrtl.c $(RTL_BASE_H) system.h
1811 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gengenrtl.c
1814 # Compile the libraries to be used by gen*.
1815 # If we are not cross-building, gen* use the same .o's that cc1 will use,
1816 # and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict
1817 # with the rules for rtl.o, alloca.o, etc.
1818 $(HOST_PREFIX_1)rtl.o: $(srcdir)/rtl.c $(CONFIG_H) system.h $(RTL_H) bitmap.h
1819 rm -f $(HOST_PREFIX)rtl.c
1820 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtl.c > $(HOST_PREFIX)rtl.c
1821 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtl.c
1823 $(HOST_PREFIX_1)print-rtl.o: $(srcdir)/print-rtl.c $(CONFIG_H) $(RTL_H)
1824 rm -f $(HOST_PREFIX)print-rtl.c
1825 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/print-rtl.c > $(HOST_PREFIX)print-rtl.c
1826 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)print-rtl.c
1828 $(HOST_PREFIX_1)bitmap.o: $(srcdir)/bitmap.c $(CONFIG_H) system.h $(RTL_H) \
1829 flags.h $(BASIC_BLOCK_H) $(REGS_H)
1830 rm -f $(HOST_PREFIX)bitmap.c
1831 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/bitmap.c > $(HOST_PREFIX)bitmap.c
1832 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)bitmap.c
1834 $(HOST_PREFIX_1)rtlanal.o: $(srcdir)/rtlanal.c $(CONFIG_H) $(RTL_H)
1835 rm -f $(HOST_PREFIX)rtlanal.c
1836 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtlanal.c > $(HOST_PREFIX)rtlanal.c
1837 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtlanal.c
1839 $(HOST_PREFIX_1)alloca.o: $(srcdir)/../libiberty/alloca.c
1840 rm -f $(HOST_PREFIX)alloca.c
1841 $(LN_S) $(srcdir)/../libiberty/alloca.c $(HOST_PREFIX)alloca.c
1842 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)alloca.c
1844 $(HOST_PREFIX_1)obstack.o: $(srcdir)/../libiberty/obstack.c
1845 rm -f $(HOST_PREFIX)obstack.c
1846 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/../libiberty/obstack.c > $(HOST_PREFIX)obstack.c
1847 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)obstack.c
1849 $(HOST_PREFIX_1)vfprintf.o: $(srcdir)/../libiberty/vfprintf.c
1850 rm -f $(HOST_PREFIX)vfprintf.c
1851 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/../libiberty/vfprintf.c > $(HOST_PREFIX)vfprintf.c
1852 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)vfprintf.c
1854 $(HOST_PREFIX_1)doprint.o: doprint.c
1855 rm -f $(HOST_PREFIX)doprint.c
1856 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/doprint.c > $(HOST_PREFIX)doprint.c
1857 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)doprint.c
1859 $(HOST_PREFIX_1)malloc.o: malloc.c
1860 rm -f $(HOST_PREFIX)malloc.c
1861 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/malloc.c > $(HOST_PREFIX)malloc.c
1862 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)malloc.c
1864 # This satisfies the dependency that we get if you cross-compile a compiler
1865 # that does not need to compile alloca, malloc or whatever.
1866 $(HOST_PREFIX_1):
1867 touch $(HOST_PREFIX_1)
1870 # Remake cpp and protoize.
1872 # Making the preprocessor
1873 cpp$(exeext): $(CCCP)$(exeext)
1874 -rm -f cpp$(exeext)
1875 $(LN) $(CCCP)$(exeext) cpp$(exeext)
1876 cccp$(exeext): cccp.o cexp.o version.o prefix.o mbchar.o @extra_cpp_objs@ $(LIBDEPS)
1877 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cccp.o cexp.o prefix.o mbchar.o \
1878 version.o @extra_cpp_objs@ $(LIBS)
1879 cexp.o: $(srcdir)/cexp.c $(CONFIG_H) system.h
1880 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/cexp.c
1881 $(srcdir)/cexp.c: $(srcdir)/cexp.y
1882 cd $(srcdir); $(BISON) -o cexp.c cexp.y
1884 # We use $(libsubdir)/$(unlibsubdir) to match the
1885 # -iprefix argument which gcc will pass if GCC_EXEC_PREFIX is used.
1886 cccp.o: cccp.c $(CONFIG_H) pcp.h version.c config.status system.h \
1887 mbchar.h prefix.h Makefile
1888 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1889 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1890 -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
1891 -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1892 -DCROSS_INCLUDE_DIR=\"$(tooldir)/sys-include\" \
1893 -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1894 -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
1896 LIBCPP_OBJS = cpplib.o cpphash.o cppalloc.o cpperror.o cppexp.o cppfiles.o \
1897 cppulp.o prefix.o version.o mbchar.o @extra_cpp_objs@
1899 # All the other archives built/used by this makefile are for targets. This
1900 # one is strictly for the host.
1902 # For various reasons AR, RANLIB, etc are all set to the target tools and
1903 # must not be used here. Instead explicitly use the host versions.
1905 libcpp.a: $(LIBCPP_OBJS)
1906 $(HOST_AR) $(HOST_AR_FLAGS) libcpp.a $(LIBCPP_OBJS)
1907 if $(HOST_RANLIB_TEST) ; then $(HOST_RANLIB) libcpp.a ; else true ; fi
1909 cppmain$(exeext): cppmain.o libcpp.a $(LIBDEPS)
1910 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cppmain$(exeext) cppmain.o \
1911 libcpp.a $(LIBS)
1913 cppmain.o: cppmain.c $(CONFIG_H) cpplib.h machmode.h system.h
1915 cpplib.o: cpplib.c $(CONFIG_H) cpplib.h machmode.h cpphash.h config.status \
1916 system.h prefix.h Makefile
1917 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1918 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1919 -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
1920 -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1921 -DCROSS_INCLUDE_DIR=\"$(tooldir)/sys-include\" \
1922 -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1923 -c `echo $(srcdir)/cpplib.c | sed 's,^\./,,'`
1925 cpperror.o: cpperror.c $(CONFIG_H) cpplib.h machmode.h system.h
1927 cppulp.o: cppulp.c $(CONFIG_H) system.h output.h
1929 cppexp.o: cppexp.c $(CONFIG_H) cpplib.h machmode.h system.h
1931 cppfiles.o: cppfiles.c $(CONFIG_H) cpplib.h machmode.h system.h
1933 cpphash.o: cpphash.c cpplib.h machmode.h cpphash.h $(CONFIG_H) system.h
1935 cppalloc.o: cppalloc.c $(CONFIG_H) cpplib.h machmode.h system.h
1937 # Note for the stamp targets, we run the program `true' instead of
1938 # having an empty command (nothing following the semicolon).
1940 proto: config.status protoize$(exeext) unprotoize$(exeext) SYSCALLS.c.X
1942 protoize$(exeext): protoize.o getopt.o getopt1.o getpwd.o version.o \
1943 pexecute.o choose-temp.o mkstemp.o $(LIBDEPS)
1944 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
1945 protoize.o getopt.o getopt1.o getpwd.o version.o \
1946 pexecute.o choose-temp.o mkstemp.o $(LIBS)
1948 unprotoize$(exeext): unprotoize.o getopt.o getopt1.o getpwd.o version.o \
1949 pexecute.o choose-temp.o mkstemp.o $(LIBDEPS)
1950 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
1951 unprotoize.o getopt.o getopt1.o getpwd.o version.o \
1952 pexecute.o choose-temp.o mkstemp.o $(LIBS)
1954 protoize.o: protoize.c $(srcdir)/../include/getopt.h $(CONFIG_H) system.h \
1955 Makefile
1956 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1957 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1958 -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
1959 -DCROSS_INCLUDE_DIR=\"$(tooldir)/sys-include\" \
1960 -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1961 -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1962 -DSTD_PROTO_DIR=\"$(libsubdir)\" \
1963 $(srcdir)/protoize.c
1965 unprotoize.o: unprotoize.c protoize.c $(srcdir)/../include/getopt.h \
1966 $(CONFIG_H) system.h Makefile
1967 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1968 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1969 -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
1970 -DCROSS_INCLUDE_DIR=\"$(tooldir)/sys-include\" \
1971 -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1972 -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1973 -DSTD_PROTO_DIR=\"$(libsubdir)\" \
1974 $(srcdir)/unprotoize.c
1976 getopt.o: $(srcdir)/../libiberty/getopt.c $(srcdir)/../include/getopt.h
1977 rm -f getopt.c
1978 $(LN_S) $(srcdir)/../libiberty/getopt.c getopt.c
1979 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) getopt.c
1981 getopt1.o: $(srcdir)/../libiberty/getopt1.c $(srcdir)/../include/getopt.h
1982 rm -f getopt1.c
1983 $(LN_S) $(srcdir)/../libiberty/getopt1.c getopt1.c
1984 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) getopt1.c
1986 # This info describes the target machine, so compile with GCC just built.
1987 SYSCALLS.c.X: $(srcdir)/sys-types.h $(srcdir)/sys-protos.h $(GCC_PASSES) \
1988 stmp-int-hdrs
1989 -rm -f SYSCALLS.c tmp-SYSCALLS.s
1990 cat $(srcdir)/sys-types.h $(srcdir)/sys-protos.h > SYSCALLS.c
1991 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1992 -aux-info $@ -S -o tmp-SYSCALLS.s SYSCALLS.c
1993 -rm -f SYSCALLS.c tmp-SYSCALLS.s
1996 test-protoize-simple: ./protoize ./unprotoize $(GCC_PASSES)
1997 -rm -f tmp-proto.[cso]
1998 cp $(srcdir)/protoize.c tmp-proto.c
1999 chmod u+w tmp-proto.c
2000 ./protoize -N -B ./ -x getopt.h -c "-B./ -Wall -Wwrite-strings \
2001 $(CFLAGS) $(INCLUDES) \
2002 -DGCC_INCLUDE_DIR=0 \
2003 -DGPLUSPLUS_INCLUDE_DIR=0 \
2004 -DCROSS_INCLUDE_DIR=0 \
2005 -DTOOL_INCLUDE_DIR=0 \
2006 -DSTD_PROTO_DIR=0" tmp-proto.c
2007 @echo '**********' Expect 400 lines of differences.
2008 -diff $(srcdir)/protoize.c tmp-proto.c > tmp-proto.diff
2009 -wc -l tmp-proto.diff
2010 ./unprotoize -N -x getopt.h -c "-B./ -Wall -Wwrite-strings \
2011 $(CFLAGS) $(INCLUDES) \
2012 -DGCC_INCLUDE_DIR=0 \
2013 -DGPLUSPLUS_INCLUDE_DIR=0 \
2014 -DCROSS_INCLUDE_DIR=0 \
2015 -DTOOL_INCLUDE_DIR=0 \
2016 -DSTD_PROTO_DIR=0" tmp-proto.c
2017 @echo Expect zero differences.
2018 diff $(srcdir)/protoize.c tmp-proto.c | cat
2019 -rm -f tmp-proto.[cs] tmp-proto$(objext)
2021 gcov.o: gcov.c gcov-io.h system.h
2023 # Only one of 'gcov' or 'gcov.exe' is actually built, depending
2024 # upon whether $(exeext) is empty or not.
2025 gcov$(exeext): gcov.o $(LIBDEPS)
2026 $(CC) $(ALL_CFLAGS) $(LDFLAGS) gcov.o $(LIBS) -o $@
2028 # Build the include directory. The stamp files are stmp-* rather than
2029 # s-* so that mostlyclean does not force the include directory to
2030 # be rebuilt.
2032 # Build the include directory including float.h (which no longer depends upon
2033 # enquire).
2034 stmp-int-hdrs: stmp-fixinc $(USER_H) xlimits.h gfloat.h
2035 # Copy in the headers provided with gcc.
2036 # The sed command gets just the last file name component;
2037 # this is necessary because VPATH could add a dirname.
2038 # Using basename would be simpler, but some systems don't have it.
2039 # The touch command is here to workaround an AIX/Linux NFS bug.
2040 for file in .. $(USER_H); do \
2041 if [ X$$file != X.. ]; then \
2042 realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
2043 touch include/$$realfile; \
2044 rm -f include/$$realfile; \
2045 cp $$file include; \
2046 chmod a+r include/$$realfile; \
2047 fi; \
2048 done
2049 rm -f include/limits.h
2050 cp xlimits.h include/limits.h
2051 chmod a+r include/limits.h
2052 rm -f include/float.h
2053 if [ -s gfloat.h ]; then \
2054 cp gfloat.h include/float.h && \
2055 chmod a+r include/float.h; \
2056 else :; fi
2057 # Install the README
2058 rm -f include/README
2059 cp $(srcdir)/README-fixinc include/README
2060 chmod a+r include/README
2061 touch $@
2063 # Now that gfloat.h no longer depends upon enquire, this is actually a no-op.
2064 stmp-headers:
2065 touch $@
2067 fixinc.sh :
2068 DEST=`cd $(srcdir) ; pwd`/$@ CC=$(CC) MAKE=$(MAKE) CFLAGS="$(CFLAGS)" \
2069 export DEST CC MAKE CFLAGS ; \
2070 echo DEST=$$DEST CC=$$CC MAKE=$$MAKE CFLAGS=$$CFLAGS ; \
2071 cd ../contrib/fixinc ; \
2072 $(SHELL) mkfixinc.sh $(target) $$DEST
2074 # Build fixed copies of system files.
2075 stmp-fixinc: $(FIXINCLUDES) gsyslimits.h
2076 rm -rf include
2077 mkdir include
2078 if [ x$(FIXINCLUDES) != xMakefile.in ]; \
2079 then \
2080 for dir in $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); do \
2081 if [ -d $$dir ]; \
2082 then \
2083 $(SHELL) $(srcdir)/$(FIXINCLUDES) include $$dir; \
2084 else true; fi; \
2085 done; \
2086 if [ x$(INSTALL_ASSERT_H) != x ] ; \
2087 then \
2088 rm -f include/assert.h; \
2089 cp $(srcdir)/assert.h include/assert.h; \
2090 chmod a+r include/assert.h; \
2091 fi \
2092 else true; \
2094 rm -f include/syslimits.h
2095 if [ -f include/limits.h ]; then \
2096 mv include/limits.h include/syslimits.h; \
2097 else \
2098 cp $(srcdir)/gsyslimits.h include/syslimits.h; \
2100 chmod a+r include/syslimits.h
2101 # If $(SYSTEM_HEADER_DIR) is $(tooldir)/sys-include, and
2102 # that directory exists, then make sure that $(libsubdir) exists.
2103 # This is because cpp is compiled to find $(tooldir)/include via
2104 # $(libsubdir)/$(unlibsubdir), which will only work if $(libsubdir)
2105 # exists.
2106 if [ "$(SYSTEM_HEADER_DIR)" = "$(tooldir)/sys-include" ] \
2107 && [ -d $(tooldir)/sys-include ]; then \
2108 if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; fi; \
2109 if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib; fi; \
2110 if [ -d $(libdir)/gcc-lib/$(target_alias) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias) ; fi; \
2111 if [ -d $(libdir)/gcc-lib/$(target_alias)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias)/$(version) ; fi; \
2112 else true; fi
2114 touch stmp-fixinc
2116 # Files related to the fixproto script.
2118 deduced.h: $(GCC_PASSES) $(srcdir)/scan-types.sh stmp-int-hdrs
2119 if [ -d $(SYSTEM_HEADER_DIR) ]; \
2120 then \
2121 CC="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -Iinclude -I${SYSTEM_HEADER_DIR}"; \
2122 export CC; \
2123 $(SHELL) $(srcdir)/scan-types.sh "$(srcdir)" >tmp-deduced.h; \
2124 mv tmp-deduced.h deduced.h; \
2125 else \
2126 touch deduced.h; \
2129 gen-protos: gen-protos.o scan.o cppalloc.o $(HOST_LIBDEPS)
2130 ${HOST_CC} $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
2131 gen-protos.o scan.o cppalloc.o $(HOST_LIBS)
2133 gen-protos.o: gen-protos.c scan.h $(build_xm_file) system.h
2134 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gen-protos.c
2136 scan.o: scan.c scan.h $(build_xm_file) system.h
2137 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan.c
2139 xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h gen-protos Makefile
2140 cat deduced.h $(srcdir)/sys-protos.h > tmp-fixtmp.c
2141 mv tmp-fixtmp.c fixtmp.c
2142 $(GCC_FOR_TARGET) fixtmp.c -w -U__SIZE_TYPE__ -U__PTRDIFF_TYPE__ -U__WCHAR_TYPE__ -E \
2143 | sed -e 's/ / /g' -e 's/ *(/ (/g' -e 's/ [ ]*/ /g' -e 's/( )/()/' \
2144 | ./gen-protos >xsys-protos.hT
2145 mv xsys-protos.hT xsys-protos.h
2146 rm -rf fixtmp.c
2148 fix-header: fix-header.o scan-decls.o scan.o xsys-protos.h $(HOST_LIBDEPS) \
2149 libcpp.a
2150 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ fix-header.o \
2151 scan-decls.o scan.o libcpp.a $(HOST_LIBS)
2153 fix-header.o: fix-header.c $(srcdir)/../include/obstack.h scan.h \
2154 xsys-protos.h $(build_xm_file) system.h cpplib.h machmode.h cpphash.h
2155 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/fix-header.c
2157 scan-decls.o: scan-decls.c scan.h cpplib.h machmode.h $(build_xm_file) system.h
2158 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan-decls.c
2160 # stmp-fixproto depends on this, not on fix-header directly.
2161 # The idea is to make sure fix-header gets built,
2162 # but not rerun fixproto after each stage
2163 # just because fix-header's mtime has changed.
2164 fixhdr.ready: fix-header
2165 -if [ -f fixhdr.ready ] ; then \
2166 true; \
2167 else \
2168 touch fixhdr.ready; \
2171 # stmp-headers is to make sure fixincludes has already finished.
2172 # The if statement is so that we don't run fixproto a second time
2173 # if it has already been run on the files in `include'.
2174 stmp-fixproto: fixhdr.ready fixproto stmp-headers
2175 @echo "Various warnings and error messages from fixproto are normal"
2176 -if [ -d include ] ; then true; else mkdir include; fi
2177 -if [ -f include/fixed ] ; then true; \
2178 else \
2179 : This line works around a 'make' bug in BSDI 1.1.; \
2180 FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES; \
2181 if [ -d $(SYSTEM_HEADER_DIR) ] ; then \
2182 $(SHELL) ${srcdir}/fixproto include include $(SYSTEM_HEADER_DIR); \
2183 else true; fi; \
2184 touch include/fixed; \
2186 touch stmp-fixproto
2188 # Remake the info files.
2190 doc: info
2191 info: cpp.info gcc.info lang.info
2193 cpp.info: $(srcdir)/cpp.texi
2194 $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) -o cpp.info $(srcdir)/cpp.texi
2196 gcc.info: $(srcdir)/gcc.texi $(srcdir)/extend.texi $(srcdir)/install.texi \
2197 $(srcdir)/invoke.texi $(srcdir)/md.texi $(srcdir)/rtl.texi \
2198 $(srcdir)/tm.texi $(srcdir)/gcov.texi
2199 $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) -o gcc.info $(srcdir)/gcc.texi
2201 dvi: gcc.dvi cpp.dvi lang.dvi
2203 # This works with GNU Make's default rule.
2204 gcc.dvi: $(srcdir)/gcc.texi $(srcdir)/extend.texi $(srcdir)/install.texi \
2205 $(srcdir)/invoke.texi $(srcdir)/md.texi $(srcdir)/rtl.texi \
2206 $(srcdir)/tm.texi $(srcdir)/gcov.texi
2207 TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex gcc.texi
2208 texindex gcc.??
2209 TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex gcc.texi
2211 cpp.dvi: $(srcdir)/cpp.texi
2212 TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex cpp.texi
2213 texindex cpp.??
2214 TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex cpp.texi
2217 INSTALL: $(srcdir)/install1.texi $(srcdir)/install.texi
2218 cd $(srcdir); $(MAKEINFO) -D INSTALLONLY \
2219 --no-split -o INSTALL install1.texi
2221 # Deletion of files made during compilation.
2222 # There are four levels of this:
2223 # `mostlyclean', `clean', `distclean' and `maintainer-clean'.
2224 # `mostlyclean' is useful while working on a particular type of machine.
2225 # It deletes most, but not all, of the files made by compilation.
2226 # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
2227 # `clean' deletes everything made by running `make all'.
2228 # `distclean' also deletes the files made by config.
2229 # `maintainer-clean' also deletes everything that could be regenerated
2230 # automatically, except for `configure'.
2231 # We remove as much from the language subdirectories as we can
2232 # (less duplicated code).
2235 mostlyclean: lang.mostlyclean
2236 -rm -f $(STAGESTUFF)
2237 # Delete the temporary source copies for cross compilation.
2238 -rm -f $(HOST_PREFIX_1)rtl.c $(HOST_PREFIX_1)rtlanal.c
2239 -rm -f $(HOST_PREFIX_1)alloca.c $(HOST_PREFIX_1)malloc.c
2240 -rm -f $(HOST_PREFIX_1)obstack.c
2241 # Delete the temp files made in the course of building libgcc.a.
2242 -rm -f tmplibgcc* tmpcopy xlimits.h libgcc1-test
2243 for name in $(LIB1FUNCS); do rm -f $${name}.c; done
2244 # Delete other built files.
2245 -rm -f t-float.h-cross xsys-protos.hT fp-bit.c dp-bit.c
2246 # Delete the stamp and temporary files.
2247 -rm -f s-* tmp-* stamp-* stmp-*
2248 -rm -f */stamp-* */tmp-*
2249 # Delete debugging dump files.
2250 -rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
2251 -rm -f *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack *.addressof
2252 -rm -f *.regmove *.mach *.bp *.gcse
2253 -rm -f */*.greg */*.lreg */*.combine */*.flow */*.cse */*.jump */*.rtl
2254 -rm -f */*.tree */*.loop */*.dbr */*.jump2 */*.sched */*.cse2
2255 -rm -f */*.sched2 */*.stack */*.regmove */*.gcse
2256 # Delete some files made during installation.
2257 -rm -f specs gfloat.h float.h-* enquire SYSCALLS.c.X SYSCALLS.c
2258 -rm -f collect collect2 mips-tfile mips-tdump alloca.s
2259 # Delete files generated for fixproto
2260 -rm -rf fix-header xsys-protos.h deduced.h tmp-deduced.h \
2261 gen-protos fixproto.list fixtmp.* fixhdr.ready
2262 # Delete unwanted output files from TeX.
2263 -rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg
2264 -rm -f */*.toc */*.log */*.vr */*.fn */*.cp */*.tp */*.ky */*.pg
2265 # Delete sorted indices we don't actually use.
2266 -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
2267 # Delete core dumps.
2268 -rm -f core */core
2269 -rm -f *.bp */*.bp
2271 # Delete all files made by compilation
2272 # that don't exist in the distribution.
2273 clean: mostlyclean lang.clean
2274 # It may not be quite desirable to delete unprotoize.c here,
2275 # but the spec for `make clean' requires it.
2276 # Using unprotoize.c is not quite right in the first place,
2277 # but what better way is there?
2278 -rm -f libgcc.a libgcc1.a libgcc1-asm.a libgcc2.a libgcc2.ready
2279 -rm -f libgcc1.null
2280 -rm -f *.dvi
2281 -rm -f */*.dvi
2282 -if [ -f md.pre-cpp ]; then \
2283 rm -f md ; \
2285 # Delete the include directory.
2286 -rm -rf include
2287 # Delete files used by the "multilib" facility (including libgcc subdirs).
2288 -rm -f multilib.h tmpmultilib*
2289 -if [ "x$(MULTILIB_DIRNAMES)" != x ] ; then \
2290 rm -rf $(MULTILIB_DIRNAMES); \
2291 else if [ "x$(MULTILIB_OPTIONS)" != x ] ; then \
2292 rm -rf `echo $(MULTILIB_OPTIONS) | sed -e 's/\// /g'`; \
2293 fi ; fi
2294 -rm -fr stage1 stage2 stage3 stage4
2296 # Delete all files that users would normally create
2297 # while building and installing GCC.
2298 distclean: clean lang.distclean
2299 -rm -f tm.h config.h auto-host.h auto-build.h tconfig.h hconfig.h
2300 -rm -f md cstamp-h
2301 -rm -f config.status config.run config.cache config.bak
2302 -rm -f Make-lang Make-hooks Make-host Make-target
2303 -rm -f Makefile specs.h options.h gencheck.h *.oaux
2304 -rm -f gthr-default.h
2305 -rm -f */stage1 */stage2 */stage3 */stage4 */include
2306 -rm -f c-parse.output
2307 -rm -f *.asm
2308 -rm -f float.h
2309 -rm -f site.exp site.bak testsuite/site.exp testsuite/site.bak
2310 -rm -f testsuite/{gcc,g++}.{log,sum}
2312 # Delete anything likely to be found in the source directory
2313 # that shouldn't be in the distribution.
2314 extraclean: distclean lang.extraclean
2315 -rm -rf =* ./"#"* *~* config/=* config/"#"* config/*~*
2316 -rm -f patch* *.orig *.rej config/patch* config/*.orig config/*.rej
2317 -rm -f config/*/=* config/*/"#"* config/*/*~*
2318 -rm -f config/*/*.orig config/*/*.rej
2319 -rm -f *.dvi *.ps *.oaux *.d *.[zZ] *.gz
2320 -rm -f *.tar *.xtar *diff *.diff.* *.tar.* *.xtar.* *diffs
2321 -rm -f *lose config/*lose config/*/*lose
2322 -rm -f *.s *.s[0-9] *.i config/ChangeLog
2323 -rm -f */=* */"#"* */*~*
2324 -rm -f */patch* */*.orig */*.rej
2325 -rm -f */*.dvi */*.oaux */*.d */*.[zZ] */*.gz
2326 -rm -f */*.tar */*.xtar */*diff */*.diff.* */*.tar.* */*.xtar.* */*diffs
2327 -rm -f */*lose */*.s */*.s[0-9] */*.i
2329 # Get rid of every file that's generated from some other file, except for `configure'.
2330 # Most of these files ARE PRESENT in the GCC distribution.
2331 maintainer-clean:
2332 @echo 'This command is intended for maintainers to use; it'
2333 @echo 'deletes files that may need special tools to rebuild.'
2334 $(MAKE) distclean lang.maintainer-clean
2335 -rm -f c-parse.y c-gperf.h
2336 -rm -f c-parse.c c-parse.h c-parse.output
2337 -rm -f cexp.c cexp.output TAGS
2338 -rm -f cpp.info* cpp.??s cpp.*aux
2339 -rm -f gcc.info* gcc.??s gcc.*aux
2341 # Entry points `install' and `uninstall'.
2342 # Also use `install-collect2' to install collect2 when the config files don't.
2344 # The semicolon is to prevent the install.sh -> install default rule
2345 # from doing anything. Having it run true helps avoid problems and
2346 # noise from versions of make which don't like to have null commands.
2347 install: $(INSTALL_TARGET) ; @true
2349 # Copy the compiler files into directories where they will be run.
2350 # Install the driver last so that the window when things are
2351 # broken is small.
2352 install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
2353 install-man install-info lang.install-normal install-driver
2355 # Do nothing while making gcc with a cross-compiler. The person who
2356 # makes gcc for the target machine has to know how to put a complete
2357 # gcc together by hand.
2358 install-build: force
2359 @echo You have to install gcc on your target machine by hand.
2361 # Run this on the target machine
2362 # to finish installation of cross compiler.
2363 install-cross-rest: install-float-h-cross
2365 # Install float.h for cross compiler.
2366 # Run this on the target machine!
2367 install-float-h-cross: installdirs
2368 # if [ -f enquire ] ; then true; else false; fi
2369 # Note: don't use -. We should fail right away if enquire was not made.
2370 ./enquire -f > $(tmpdir)/float.h
2371 -rm -f $(libsubdir)/include/float.h
2372 $(INSTALL_DATA) $(tmpdir)/float.h $(libsubdir)/include/float.h
2373 -rm -f $(tmpdir)/float.h
2374 chmod a-x $(libsubdir)/include/float.h
2376 # Create the installation directories.
2377 installdirs:
2378 -if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; chmod a+rx $(prefix) ; fi
2379 -if [ -d $(exec_prefix) ] ; then true ; else mkdir $(exec_prefix) ; chmod a+rx $(exec_prefix) ; fi
2380 -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; chmod a+rx $(libdir) ; fi
2381 -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; chmod a+rx $(libdir)/gcc-lib ; fi
2382 # This dir isn't currently searched by cpp.
2383 # -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi
2384 -fdir= ; for dir in `echo $(libsubdir) | tr '/' ' '`; do \
2385 fdir=$${fdir}/$${dir}; \
2386 if [ -d $${fdir} ] ; then true ; else mkdir $${fdir}; chmod a+rx $${fdir}; fi ; \
2387 done
2388 -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi
2389 -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi
2390 -if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; chmod a+rx $(tooldir) ; fi
2391 -if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; chmod a+rx $(assertdir) ; fi
2392 -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; chmod a+rx $(infodir) ; fi
2393 # We don't use mkdir -p to create the parents of man1dir,
2394 # because some systems don't support it.
2395 # Instead, we use this technique to create the immediate parent of man1dir.
2396 -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
2397 if [ -d $$parent ] ; then true ; else mkdir $$parent ; chmod a+rx $$parent ; fi
2398 -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; chmod a+rx $(man1dir) ; fi
2400 # Install the compiler executables built during cross compilation.
2401 install-common: native installdirs $(EXTRA_PARTS) lang.install-common
2402 for file in $(COMPILERS); do \
2403 if [ -f $$file ] ; then \
2404 rm -f $(libsubdir)/$$file; \
2405 $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
2406 else true; \
2407 fi; \
2408 done
2409 for file in $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2) ..; do \
2410 if [ x"$$file" != x.. ]; then \
2411 rm -f $(libsubdir)/$$file; \
2412 $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
2413 else true; fi; \
2414 done
2415 for file in $(EXTRA_PARTS) ..; do \
2416 if [ x"$$file" != x.. ]; then \
2417 rm -f $(libsubdir)/$$file; \
2418 $(INSTALL_DATA) $$file $(libsubdir)/$$file; \
2419 chmod a-x $(libsubdir)/$$file; \
2420 else true; fi; \
2421 done
2422 # Don't mess with specs if it doesn't exist yet.
2423 -if [ -f specs ] ; then \
2424 rm -f $(libsubdir)/specs; \
2425 $(INSTALL_DATA) specs $(libsubdir)/specs; \
2426 chmod a-x $(libsubdir)/specs; \
2428 # Install protoize if it was compiled.
2429 -if [ -f protoize$(exeext) ]; \
2430 then \
2431 if [ -f gcc-cross$(exeext) ] ; then \
2432 rm -f $(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext); \
2433 $(INSTALL_PROGRAM) protoize$(exeext) $(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext); \
2434 rm -f $(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext); \
2435 $(INSTALL_PROGRAM) unprotoize$(exeext) $(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext); \
2436 else \
2437 rm -f $(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \
2438 $(INSTALL_PROGRAM) protoize$(exeext) $(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \
2439 rm -f $(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \
2440 $(INSTALL_PROGRAM) unprotoize$(exeext) $(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \
2441 fi ; \
2442 rm -f $(libsubdir)/SYSCALLS.c.X; \
2443 $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X; \
2444 chmod a-x $(libsubdir)/SYSCALLS.c.X; \
2446 -rm -f $(libsubdir)/cpp$(exeext)
2447 $(INSTALL_PROGRAM) cpp$(exeext) $(libsubdir)/cpp$(exeext)
2448 # Install gcov if it was compiled.
2449 -if [ -f gcov$(exeext) ]; \
2450 then \
2451 rm -f $(bindir)/gcov$(exeext); \
2452 $(INSTALL_PROGRAM) gcov$(exeext) $(bindir)/$(GCOV_INSTALL_NAME)$(exeext); \
2455 # Install the driver program as $(target_alias)-gcc
2456 # and also as either gcc (if native) or $(tooldir)/bin/gcc.
2457 install-driver: xgcc$(exeext)
2458 -if [ -f gcc-cross$(exeext) ] ; then \
2459 rm -f $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
2460 $(INSTALL_PROGRAM) gcc-cross$(exeext) $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
2461 if [ -d $(tooldir)/bin/. ] ; then \
2462 rm -f $(tooldir)/bin/gcc$(exeext); \
2463 $(INSTALL_PROGRAM) gcc-cross$(exeext) $(tooldir)/bin/gcc$(exeext); \
2464 else true; fi; \
2465 else \
2466 rm -f $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
2467 $(INSTALL_PROGRAM) xgcc$(exeext) $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
2468 rm -f $(bindir)/$(target_alias)-gcc-1$(exeext); \
2469 $(LN) $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target_alias)-gcc-1$(exeext); \
2470 mv $(bindir)/$(target_alias)-gcc-1$(exeext) $(bindir)/$(target_alias)-gcc$(exeext); \
2473 # Install the info files.
2474 # $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir
2475 # to do the install.
2476 install-info: doc installdirs lang.install-info
2477 -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info*
2478 for f in cpp.info* gcc.info*; do \
2479 $(INSTALL_DATA) $$f $(infodir)/$$f; \
2480 done
2481 -if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
2482 if [ -f $(infodir)/dir ] ; then \
2483 for f in cpp.info gcc.info; do \
2484 install-info --dir-file=$(infodir)/dir $(infodir)/$$f; \
2485 done; \
2486 else true; fi; \
2487 else true; fi;
2488 -chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info*
2490 # Install the man pages.
2491 install-man: installdirs $(srcdir)/gcc.1 $(srcdir)/cccp.1 lang.install-man
2492 -if [ -f gcc-cross$(exeext) ] ; then \
2493 rm -f $(man1dir)/$(GCC_CROSS_NAME)$(manext); \
2494 $(INSTALL_DATA) $(srcdir)/gcc.1 $(man1dir)/$(GCC_CROSS_NAME)$(manext); \
2495 chmod a-x $(man1dir)/$(GCC_CROSS_NAME)$(manext); \
2496 else \
2497 rm -f $(man1dir)/$(GCC_INSTALL_NAME)$(manext); \
2498 $(INSTALL_DATA) $(srcdir)/gcc.1 $(man1dir)/$(GCC_INSTALL_NAME)$(manext); \
2499 chmod a-x $(man1dir)/$(GCC_INSTALL_NAME)$(manext); \
2501 -rm -f $(man1dir)/cccp$(manext)
2502 -$(INSTALL_DATA) $(srcdir)/cccp.1 $(man1dir)/cccp$(manext)
2503 -chmod a-x $(man1dir)/cccp$(manext)
2505 # Install the library.
2506 install-libgcc: libgcc.a installdirs
2507 -if [ -f libgcc.a ] ; then \
2508 rm -f $(libsubdir)/libgcc.a; \
2509 $(INSTALL_DATA) libgcc.a $(libsubdir)/libgcc.a; \
2510 if $(RANLIB_TEST) ; then \
2511 (cd $(libsubdir); $(RANLIB) libgcc.a); else true; fi; \
2512 chmod a-x $(libsubdir)/libgcc.a; \
2513 else true; fi
2515 # Install multiple versions of libgcc.a.
2516 install-multilib: stmp-multilib installdirs
2517 for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
2518 dir=`echo $$i | sed -e 's/;.*$$//'`; \
2519 if [ -d $(libsubdir)/$${dir} ]; then true; else mkdir $(libsubdir)/$${dir}; fi; \
2520 for f in libgcc.a $(EXTRA_MULTILIB_PARTS); do \
2521 rm -f $(libsubdir)/$${dir}/$${f}; \
2522 $(INSTALL_DATA) $${dir}/$${f} $(libsubdir)/$${dir}/$${f}; \
2523 done; \
2524 if $(RANLIB_TEST); then \
2525 (cd $(libsubdir)/$${dir}; $(RANLIB) libgcc.a); else true; fi; \
2526 chmod a-x $(libsubdir)/$${dir}/libgcc.a; \
2527 done
2529 # Install all the header files built in the include subdirectory.
2530 install-headers: install-include-dir $(INSTALL_HEADERS_DIR) $(INSTALL_ASSERT_H)
2531 # Fix symlinks to absolute paths in the installed include directory to
2532 # point to the installed directory, not the build directory.
2533 # Don't need to use LN_S here since we really do need ln -s and no substitutes.
2534 -files=`cd $(libsubdir)/include; find . -type l -print 2>/dev/null`; \
2535 if [ $$? -eq 0 ]; then \
2536 dir=`cd include; pwd`; \
2537 for i in $$files; do \
2538 dest=`ls -ld $(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \
2539 if expr "$$dest" : "$$dir.*" > /dev/null; then \
2540 rm -f $(libsubdir)/include/$$i; \
2541 ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \
2542 fi; \
2543 done; \
2546 # Create or recreate the gcc private include file directory.
2547 install-include-dir: installdirs
2548 -rm -rf $(libsubdir)/include
2549 mkdir $(libsubdir)/include
2550 -chmod a+rx $(libsubdir)/include
2552 # Install the include directory using tar.
2553 install-headers-tar: stmp-headers $(STMP_FIXPROTO) install-include-dir
2554 (cd include; \
2555 tar -cf - .; exit 0) | (cd $(libsubdir)/include; tar $(TAROUTOPTS) - )
2556 # /bin/sh on some systems returns the status of the first tar,
2557 # and that can lose with GNU tar which always writes a full block.
2558 # So use `exit 0' to ignore its exit status.
2560 # Install the include directory using cpio.
2561 install-headers-cpio: stmp-headers $(STMP_FIXPROTO) install-include-dir
2562 (cd include; find . -print) | (cd include; cpio -pdum $(libsubdir)/include)
2564 # Put assert.h where it won't override GNU libc's assert.h.
2565 # It goes in a dir that is searched after GNU libc's headers;
2566 # thus, the following conditionals are no longer needed.
2567 # But it's not worth deleting them now.
2568 ## Don't replace the assert.h already there if it is not from GCC.
2569 ## This code would be simpler if it tested for -f ... && ! grep ...
2570 ## but supposedly the ! operator is missing in sh on some systems.
2571 install-assert-h: assert.h installdirs
2572 if [ -f $(assertdir)/assert.h ]; \
2573 then \
2574 if grep "__eprintf" $(assertdir)/assert.h >/dev/null; \
2575 then \
2576 rm -f $(assertdir)/assert.h; \
2577 $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
2578 chmod a-x $(assertdir)/assert.h; \
2579 else true; \
2580 fi; \
2581 else \
2582 rm -f $(assertdir)/assert.h; \
2583 $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
2584 chmod a-x $(assertdir)/assert.h; \
2587 # Use this target to install the program `collect2' under the name `collect2'.
2588 install-collect2: collect2 installdirs
2589 $(INSTALL_PROGRAM) collect2$(exeext) $(libsubdir)/collect2$(exeext)
2590 # Install the driver program as $(libsubdir)/gcc for collect2.
2591 $(INSTALL_PROGRAM) xgcc$(exeext) $(libsubdir)/gcc$(exeext)
2593 # Cancel installation by deleting the installed files.
2594 uninstall: lang.uninstall
2595 -rm -rf $(libsubdir)
2596 -rm -rf $(bindir)/$(GCC_INSTALL_NAME)$(exeext)
2597 -rm -rf $(bindir)/$(GCC_CROSS_NAME)$(exeext)
2598 -rm -rf $(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext)
2599 -rm -rf $(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext)
2600 -rm -rf $(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext)
2601 -rm -rf $(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext)
2602 -rm -rf $(bindir)/$(GCOV_INSTALL_NAME)$(exeext)
2603 -rm -rf $(man1dir)/$(GCC_INSTALL_NAME)$(manext)
2604 -rm -rf $(man1dir)/$(GCC_CROSS_NAME)$(manext)
2605 -rm -rf $(man1dir)/cccp$(manext)
2606 -rm -rf $(man1dir)/protoize$(manext)
2607 -rm -rf $(man1dir)/unprotoize$(manext)
2608 -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info*
2610 # These targets are for the dejagnu testsuites. The file site.exp
2611 # contains global variables that all the testsuites will use.
2613 # Set to $(target_alias)/ for cross.
2614 target_subdir = @target_subdir@
2616 site.exp: ./config.status Makefile
2617 @echo "Making a new config file..."
2618 -@rm -f ./tmp?
2619 @touch site.exp
2620 -@mv site.exp site.bak
2621 @echo "## these variables are automatically generated by make ##" > ./tmp0
2622 @echo "# Do not edit here. If you wish to override these values" >> ./tmp0
2623 @echo "# add them to the last section" >> ./tmp0
2624 @echo "set rootme \"`pwd`\"" >> ./tmp0
2625 @echo "set srcdir \"`cd ${srcdir}; pwd`\"" >> ./tmp0
2626 @echo "set host_triplet $(host_canonical)" >> ./tmp0
2627 @echo "set build_triplet $(build_canonical)" >> ./tmp0
2628 @echo "set target_triplet $(target)" >> ./tmp0
2629 @echo "set target_alias $(target_alias)" >> ./tmp0
2630 # CFLAGS is set even though it's empty to show we reserve the right to set it.
2631 @echo "set CFLAGS \"\"" >> ./tmp0
2632 @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
2633 # If newlib has been configured, we need to pass -B to gcc so it can find
2634 # newlib's crt0.o if it exists. This will cause a "path prefix not used"
2635 # message if it doesn't, but the testsuite is supposed to ignore the message -
2636 # it's too difficult to tell when to and when not to pass -B (not all targets
2637 # have crt0's). We could only add the -B if ../newlib/crt0.o exists, but that
2638 # seems like too selective a test.
2639 # ??? Another way to solve this might be to rely on linker scripts. Then
2640 # theoretically the -B won't be needed.
2641 # We also need to pass -L ../ld so that the linker can find ldscripts.
2642 @if [ -d $(objdir)/../$(target_subdir)newlib ] ; then \
2643 echo "set newlib_cflags \"-I$(objdir)/../$(target_subdir)newlib/targ-include -I\$$srcdir/../newlib/libc/include\"" >> ./tmp0; \
2644 echo "set newlib_ldflags \"-B$(objdir)/../$(target_subdir)newlib/\"" >> ./tmp0; \
2645 echo "append CFLAGS \" \$$newlib_cflags\"" >> ./tmp0; \
2646 echo "append CXXFLAGS \" \$$newlib_cflags\"" >> ./tmp0; \
2647 echo "append LDFLAGS \" \$$newlib_ldflags\"" >> ./tmp0; \
2648 else true; \
2650 @if [ -d $(objdir)/../ld ] ; then \
2651 echo "append LDFLAGS \" -L$(objdir)/../ld\"" >> ./tmp0; \
2652 else true; \
2654 echo "set tmpdir $(objdir)/testsuite" >> ./tmp0
2655 @echo "set srcdir \"\$${srcdir}/testsuite\"" >> ./tmp0
2656 @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
2657 @cat ./tmp0 > site.exp
2658 @cat site.bak | sed \
2659 -e '1,/^## All variables above are.*##/ d' >> site.exp
2660 -@rm -f ./tmp?
2662 CHECK_TARGETS = check-gcc check-g++ check-g77 check-objc
2664 check: $(CHECK_TARGETS)
2666 testsuite/site.exp: site.exp
2667 if [ -d testsuite ]; then \
2668 true; \
2669 else \
2670 mkdir testsuite; \
2672 rm -rf testsuite/site.exp
2673 cp site.exp testsuite/site.exp
2675 check-g++: testsuite/site.exp
2676 -rootme=`pwd`; export rootme; \
2677 srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
2678 cd testsuite; \
2679 EXPECT=${EXPECT} ; export EXPECT ; \
2680 if [ -f $${rootme}/../expect/expect ] ; then \
2681 TCL_LIBRARY=`cd ${srcdir}/../tcl/library ; pwd` ; \
2682 export TCL_LIBRARY ; fi ; \
2683 $(RUNTEST) --tool g++ $(RUNTESTFLAGS)
2685 check-gcc: testsuite/site.exp
2686 -rootme=`pwd`; export rootme; \
2687 srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
2688 cd testsuite; \
2689 EXPECT=${EXPECT} ; export EXPECT ; \
2690 if [ -f $${rootme}/../expect/expect ] ; then \
2691 TCL_LIBRARY=`cd ${srcdir}/../tcl/library ; pwd` ; \
2692 export TCL_LIBRARY ; fi ; \
2693 $(RUNTEST) --tool gcc $(RUNTESTFLAGS)
2695 check-g77: testsuite/site.exp
2696 -rootme=`pwd`; export rootme; \
2697 srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
2698 cd testsuite; \
2699 EXPECT=${EXPECT} ; export EXPECT ; \
2700 if [ -f $${rootme}/../expect/expect ] ; then \
2701 TCL_LIBRARY=`cd ${srcdir}/../tcl/library ; pwd` ; \
2702 export TCL_LIBRARY ; fi ; \
2703 $(RUNTEST) --tool g77 $(RUNTESTFLAGS)
2705 check-objc: testsuite/site.exp
2706 -rootme=`pwd`; export rootme; \
2707 srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
2708 cd testsuite; \
2709 EXPECT=${EXPECT} ; export EXPECT ; \
2710 if [ -f $${rootme}/../expect/expect ] ; then \
2711 TCL_LIBRARY=`cd ${srcdir}/../tcl/library ; pwd` ; \
2712 export TCL_LIBRARY ; fi ; \
2713 $(RUNTEST) --tool objc $(RUNTESTFLAGS)
2715 # These exist for maintenance purposes.
2717 # Update the tags table.
2718 TAGS: force
2719 cd $(srcdir); \
2720 mkdir tmp-tags; \
2721 mv -f c-parse.[ch] cexp.c =*.[chy] tmp-tags; \
2722 etags *.y *.h *.c; \
2723 mv tmp-tags/* .; \
2724 rmdir tmp-tags
2726 # Create the distribution tar.gz file.
2727 dist: tmp-gcc.xtar
2728 gzip --best < tmp-gcc.xtar > tmp-gcc.xtar.gz
2729 mv tmp-gcc.xtar.gz gcc-$(version).tar.gz
2731 tmp-gcc.xtar: distdir
2732 # Make the distribution.
2733 tar -chf tmp-gcc.xtar gcc-$(version)
2735 distdir-cvs: force
2736 if [ -d $(srcdir)/CVS ]; then cd $(srcdir) && cvs -r update; fi
2738 # This target exists to do the initial work before the language specific
2739 # stuff gets done.
2740 distdir-start: doc $(srcdir)/INSTALL $(srcdir)/c-parse.y $(srcdir)/c-gperf.h \
2741 $(srcdir)/c-parse.c $(srcdir)/cexp.c $(srcdir)/config.in \
2742 $(srcdir)/version.c TAGS
2743 @if grep -s "for version ${mainversion}" gcc.texi > /dev/null; \
2744 then true; \
2745 else echo "You must update the version number in \`gcc.texi'"; sleep 10;\
2747 # Update the version number in README
2748 awk '$$1 " " $$2 " " $$3 == "This directory contains" \
2749 { $$6 = version; print $$0 } \
2750 $$1 " " $$2 " " $$3 != "This directory contains"' \
2751 version=$(version) $(srcdir)/README > tmp.README
2752 mv tmp.README README
2753 -rm -rf gcc-$(version) tmp
2754 # Put all the files in a temporary subdirectory
2755 # which has the name that we want to have in the tar file.
2756 mkdir tmp
2757 mkdir tmp/config
2758 mkdir tmp/ginclude
2759 mkdir tmp/objc
2760 for file in `(cd $(srcdir) && echo *[0-9a-zA-Z+])`; do \
2761 test -f $(srcdir)/$$file && $(LN_S) $(srcdir)/$$file tmp; \
2762 done
2763 if test "$(srcdir)" != "." ; then \
2764 for file in c-parse.c cexp.c ; do \
2765 test -f ./$$file && $(LN_S) ../$$file tmp; \
2766 done; \
2768 for file in `(cd $(srcdir)/config && echo *[0-9a-zA-Z+])`; do \
2769 if test -d $(srcdir)/config/$$file \
2770 && test "$$file" != RCS && test "$$file" != CVS; then \
2771 mkdir tmp/config/$$file; \
2772 for subfile in `(cd $(srcdir)/config/$$file && echo *[0-9a-zA-Z+])`; do \
2773 $(LN_S) $(srcdir)/config/$$file/$$subfile tmp/config/$$file; \
2774 done; \
2775 else \
2776 $(LN_S) $(srcdir)/config/$$file tmp/config; \
2777 fi; \
2778 done
2779 for file in `(cd $(srcdir)/ginclude && echo *[0-9a-zA-Z+])`; do \
2780 $(LN_S) $(srcdir)/ginclude/$$file tmp/ginclude; \
2781 done
2782 for file in `(cd $(srcdir)/objc && echo *[0-9a-zA-Z+])`; do \
2783 $(LN_S) $(srcdir)/objc/$$file tmp/objc; \
2784 done
2785 $(LN_S) .gdbinit tmp
2787 # Finish making `distdir', after the languages have done their thing.
2788 distdir-finish:
2789 mv tmp gcc-$(version)
2790 # Get rid of everything we don't want in the distribution. We'd want
2791 # this to use Makefile.in, but it doesn't have the `lang.foo' targets
2792 # expanded.
2793 cd gcc-$(version); make extraclean VERSION_DEP=
2795 distdir: distdir-cvs distdir-start lang.distdir distdir-finish
2797 # make diff oldversion=M.N
2798 # creates a diff file between an older distribution and this one.
2799 # The -P option assumes this is GNU diff.
2800 diff:
2801 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h \
2802 -x cexp.c -x -x TAGS -x INSTALL \
2803 -x configure -x config.in \
2804 -x "gcc.??" -x "gcc.??s" -x gcc.aux -x "gcc.info*" \
2805 -x "cpp.??" -x "cpp.??s" -x cpp.aux -x "cpp.info*" \
2806 $(LANG_DIFF_EXCLUDES) \
2807 gcc-$(oldversion) gcc-$(version) > gcc-$(oldversion)-$(version).diff
2809 bootstrap bootstrap-lean: force
2810 # Only build the C compiler for stage1, because that is the only one that
2811 # we can guarantee will build with the native compiler, and also it is the
2812 # only thing useful for building stage2.
2813 $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)"
2814 $(MAKE) stage1
2815 # This used to define ALLOCA as empty, but that would lead to bad results
2816 # for a subsequent `make install' since that would not have ALLOCA empty.
2817 # To prevent `make install' from compiling alloca.o and then relinking cc1
2818 # because alloca.o is newer, we permit these recursive makes to compile
2819 # alloca.o. Then cc1 is newer, so it won't have to be relinked.
2820 $(MAKE) CC="stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
2821 $(MAKE) stage2
2822 -if test $@ = bootstrap-lean; then rm -rf stage1; else true; fi
2823 $(MAKE) CC="stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
2825 bootstrap2 bootstrap2-lean: force
2826 $(MAKE) CC="stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
2827 $(MAKE) stage2
2828 -if test $@ = bootstrap2-lean; then rm -rf stage1; else true; fi
2829 $(MAKE) CC="stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
2831 bootstrap3 bootstrap3-lean: force
2832 $(MAKE) CC="stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
2834 bootstrap4 bootstrap4-lean: force
2835 $(MAKE) CC="stage3/xgcc$(exeext) -Bstage3/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage3/ LANGUAGES="$(LANGUAGES)"
2837 # Compare the object files in the current directory with those in the
2838 # stage2 directory.
2840 # ./ avoids bug in some versions of tail.
2841 compare compare3 compare4 compare-lean compare3-lean compare4-lean: force
2842 -rm -f .bad_compare
2843 case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \
2844 for file in *$(objext); do \
2845 tail +16c ./$$file > tmp-foo1; \
2846 tail +16c stage$$stage/$$file > tmp-foo2 \
2847 && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
2848 done
2849 case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \
2850 for dir in tmp-foo $(SUBDIRS); do \
2851 if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2852 for file in $$dir/*$(objext); do \
2853 tail +16c ./$$file > tmp-foo1; \
2854 tail +16c stage$$stage/$$file > tmp-foo2 \
2855 && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
2856 done; \
2857 else true; fi; \
2858 done
2859 -rm -f tmp-foo*
2860 case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \
2861 if [ -f .bad_compare ]; then \
2862 echo "Bootstrap comparison failure!"; \
2863 cat .bad_compare; \
2864 exit 1; \
2865 else \
2866 case "$@" in \
2867 *-lean ) rm -rf stage$$stage ;; \
2868 *) ;; \
2869 esac; true; \
2872 # Compare the object files in the current directory with those in the
2873 # stage2 directory. Use gnu cmp (diffutils v2.4 or later) to avoid
2874 # running tail and the overhead of twice copying each object file.
2876 gnucompare gnucompare3 gnucompare4 gnucompare-lean gnucompare3-lean gnucompare4-lean: force
2877 -rm -f .bad_compare
2878 case "$@" in gnucompare | gnucompare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^gnucompare\([0-9][0-9]*\).*,\1,'` ;; esac; \
2879 for file in *$(objext); do \
2880 (cmp --ignore-initial=16 $$file stage$$stage/$$file > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
2881 done
2882 case "$@" in gnucompare | gnucompare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^gnucompare\([0-9][0-9]*\).*,\1,'` ;; esac; \
2883 for dir in tmp-foo $(SUBDIRS); do \
2884 if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2885 for file in $$dir/*$(objext); do \
2886 (cmp --ignore-initial=16 $$file stage$$stage/$$file > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
2887 done; \
2888 else true; fi; \
2889 done
2890 case "$@" in gnucompare | gnucompare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^gnucompare\([0-9][0-9]*\).*,\1,'` ;; esac; \
2891 if [ -f .bad_compare ]; then \
2892 echo "Bootstrap comparison failure!"; \
2893 cat .bad_compare; \
2894 exit 1; \
2895 else \
2896 case "$@" in \
2897 *-lean ) rm -rf stage$$stage ;; \
2898 esac; true; \
2901 # Copy the object files from a particular stage into a subdirectory.
2902 stage1-start:
2903 -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
2904 -for dir in . $(SUBDIRS) ; \
2905 do \
2906 if [ -d stage1/$$dir ] ; then true ; else mkdir stage1/$$dir ; fi ; \
2907 done
2908 -mv $(STAGESTUFF) stage1
2909 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2910 # dir will work properly.
2911 -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage1 ; else true ; fi
2912 -if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage1 ; else true ; fi
2913 -if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage1 ; else true ; fi
2914 -rm -f stage1/libgcc.a
2915 -cp libgcc.a stage1
2916 -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libgcc.a; else true; fi
2917 -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
2918 cp stage1/$${f} . ; \
2919 else true; \
2920 fi; done
2921 stage1: force stage1-start lang.stage1
2923 stage2-start:
2924 -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
2925 -for dir in . $(SUBDIRS) ; \
2926 do \
2927 if [ -d stage2/$$dir ] ; then true ; else mkdir stage2/$$dir ; fi ; \
2928 done
2929 -mv $(STAGESTUFF) stage2
2930 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2931 # dir will work properly.
2932 -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage2 ; else true ; fi
2933 -if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage2 ; else true ; fi
2934 -if [ -f collect-ld ] ; then $(LN_S) ../collect-ld$(exeext) stage2 ; else true ; fi
2935 -rm -f stage2/libgcc.a
2936 -cp libgcc.a stage2
2937 -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libgcc.a; else true; fi
2938 -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
2939 cp stage2/$${f} . ; \
2940 else true; \
2941 fi; done
2942 stage2: force stage2-start lang.stage2
2944 stage3-start:
2945 -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
2946 -for dir in . $(SUBDIRS) ; \
2947 do \
2948 if [ -d stage3/$$dir ] ; then true ; else mkdir stage3/$$dir ; fi ; \
2949 done
2950 -mv $(STAGESTUFF) stage3
2951 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2952 # dir will work properly.
2953 -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage3 ; else true ; fi
2954 -if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage3 ; else true ; fi
2955 -if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage3 ; else true ; fi
2956 -rm -f stage3/libgcc.a
2957 -cp libgcc.a stage3
2958 -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libgcc.a; else true; fi
2959 -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
2960 cp stage3/$${f} . ; \
2961 else true; \
2962 fi; done
2963 stage3: force stage3-start lang.stage3
2965 stage4-start:
2966 -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
2967 -for dir in . $(SUBDIRS) ; \
2968 do \
2969 if [ -d stage4/$$dir ] ; then true ; else mkdir stage4/$$dir ; fi ; \
2970 done
2971 -mv $(STAGESTUFF) stage4
2972 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2973 # dir will work properly.
2974 -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage4 ; else true ; fi
2975 -if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage4 ; else true ; fi
2976 -if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage4 ; else true ; fi
2977 -rm -f stage4/libgcc.a
2978 -cp libgcc.a stage4
2979 -if $(RANLIB_TEST) ; then $(RANLIB) stage4/libgcc.a; else true; fi
2980 -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
2981 cp stage4/$${f} . ; \
2982 else true; \
2983 fi; done
2984 stage4: force stage4-start lang.stage4
2986 # Copy just the executable files from a particular stage into a subdirectory,
2987 # and delete the object files. Use this if you're just verifying a version
2988 # that is pretty sure to work, and you are short of disk space.
2989 risky-stage1: stage1
2990 -make clean
2992 risky-stage2: stage2
2993 -make clean
2995 risky-stage3: stage3
2996 -make clean
2998 risky-stage4: stage4
2999 -make clean
3001 #In GNU Make, ignore whether `stage*' exists.
3002 .PHONY: stage1 stage2 stage3 stage4 clean maintainer-clean TAGS bootstrap
3003 .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
3005 force:
3007 # ---
3008 # The enquire rules are still useful for building new float-anything.h.
3009 # Special flags for compiling enquire.
3010 # We disable optimization to make floating point more reliable.
3011 ENQUIRE_CFLAGS = -DNO_MEM -DNO_LONG_DOUBLE_IO -O0
3012 ENQUIRE_LDFLAGS = $(LDFLAGS)
3014 # Enquire target (This is a variable so that a target can choose not to
3015 # build it.)
3016 ENQUIRE = enquire
3018 # Test to see whether <float.h> exists in the system header files,
3019 # and is not derived from GCC.
3020 FLOAT_H_TEST = \
3021 [ -f $(SYSTEM_HEADER_DIR)/float.h ] && \
3022 if grep 'ifndef _FLOAT_H___' $(SYSTEM_HEADER_DIR)/float.h >/dev/null; \
3023 then false; \
3024 else :; fi
3025 # We pretend to not having a usable <float.h>, hence disable the FLOAT_H_TEST
3026 # to ensure, we're emitting a full blown <float.h> ourselves.
3027 FLOAT_H_TEST = false
3029 # Used to compile enquire with standard cc, but have forgotten why.
3030 # Let's try with GCC.
3031 enquire: enquire.o $(GCC_PARTS)
3032 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ENQUIRE_LDFLAGS) enquire.o -o $@
3033 enquire.o: $(srcdir)/enquire.c $(GCC_PASSES) stmp-int-hdrs
3034 if $(FLOAT_H_TEST); then \
3035 rm -f include/float.h; \
3036 SYS_FLOAT_H_WRAP=1; \
3037 else :; \
3038 SYS_FLOAT_H_WRAP=0; \
3039 fi; \
3040 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(ENQUIRE_CFLAGS) \
3041 -DSYS_FLOAT_H_WRAP=$$SYS_FLOAT_H_WRAP \
3042 -I. -c $(srcdir)/enquire.c
3044 # Create float.h source for the native machine.
3045 # Make it empty if we can use the system float.h without changes.
3046 float.h-nat: enquire
3047 -./enquire -f > tmp-float.h
3048 grep '#define [^_]' tmp-float.h >/dev/null || true > tmp-float.h
3049 mv tmp-float.h float.h-nat
3051 # Create a dummy float.h source for a cross-compiler.
3052 # ??? This isn't used anymore. Should we create config/float-unkn.h
3053 # and make that the default float_format in configure?
3054 float.h-cross:
3055 echo "#ifndef __GCC_FLOAT_NOT_NEEDED" > t-float.h-cross
3056 echo "#error float.h values not known for cross-compiler" >> t-float.h-cross
3057 echo "#endif" >> t-float.h-cross
3058 mv t-float.h-cross float.h-cross