1 # Makefile for GNU Compiler Collection
2 # Run 'configure' to generate Makefile from Makefile.in
4 # Copyright (C) 1987, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
5 # 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
6 # 2008 Free Software Foundation, Inc.
8 #This file is part of GCC.
10 #GCC is free software; you can redistribute it and/or modify
11 #it under the terms of the GNU General Public License as published by
12 #the Free Software Foundation; either version 3, or (at your option)
15 #GCC is distributed in the hope that it will be useful,
16 #but WITHOUT ANY WARRANTY; without even the implied warranty of
17 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 #GNU General Public License for more details.
20 #You should have received a copy of the GNU General Public License
21 #along with GCC; see the file COPYING3. If not see
22 #<http://www.gnu.org/licenses/>.
24 # The targets for external use include:
25 # all, doc, proto, install, install-cross, install-cross-rest,
26 # uninstall, TAGS, mostlyclean, clean, distclean, maintainer-clean.
28 # This is the default target.
29 # Set by autoconf to "all.internal" for a native build, or
30 # "all.cross" to build a cross compiler.
33 # Depend on this to specify a phony target portably.
36 # This tells GNU make version 3 not to export the variables
37 # defined in this file into the environment (and thus recursive makes).
39 # And this tells it not to automatically pass command-line variables
43 # Suppress smart makes who think they know how to automake yacc and flex file
47 # The only suffixes we want for implicit rules are .c and .o, so clear
48 # the list and add them. This speeds up GNU Make, and allows -r to work.
49 # For i18n support, we also need .gmo, .po, .pox.
50 # This must come before the language makefile fragments to allow them to
51 # add suffixes and rules of their own.
53 .SUFFIXES
: .c .o .po .pox .gmo
55 # -------------------------------
56 # Standard autoconf-set variables
57 # -------------------------------
62 target_noncanonical
:=@target_noncanonical@
64 # Sed command to transform gcc to installed name.
65 program_transform_name
:= @program_transform_name@
67 # -----------------------------
68 # Directories used during build
69 # -----------------------------
71 # Directory where sources are, from where we are.
73 gcc_docdir
= @
srcdir@
/doc
75 # Directory where sources are, absolute.
76 abs_srcdir
= @abs_srcdir@
77 abs_docdir
= @abs_srcdir@
/doc
79 # Top build directory for this package, relative to here.
82 # objdir is set by configure.
83 # It's normally the absolute path to the current directory.
86 host_subdir
=@host_subdir@
87 build_subdir
=@build_subdir@
88 target_subdir
=@target_subdir@
89 build_libsubdir
=@build_libsubdir@
91 # Top build directory for the "Cygnus tree", relative to $(top_builddir).
92 ifeq ($(host_subdir
),.
)
93 toplevel_builddir
:= ..
95 toplevel_builddir
:= ..
/..
98 build_objdir
:= $(toplevel_builddir
)/$(build_subdir
)
99 build_libobjdir
:= $(toplevel_builddir
)/$(build_libsubdir
)
100 target_objdir
:= $(toplevel_builddir
)/$(target_subdir
)
106 # Directory where sources are, from where we are.
109 # We define a vpath for the sources of the .texi files here because they
110 # are split between multiple directories and we would rather use one implicit
111 # pattern rule for everything.
112 # This vpath could be extended within the Make-lang fragments.
114 vpath
%.texi
$(gcc_docdir
)
115 vpath
%.texi
$(gcc_docdir
)/include
118 # Default values for variables overridden in Makefile fragments.
119 # These need to be quite early in the Makefile so as to avoid
120 # trouble induced by changes in fragment ordering.
123 # For ada/Make-lang.in; overridden in, for example, config/pa/x-ada.
133 # Variables that exist for you to override.
134 # See below for how to change them for certain systems.
136 # List of language subdirectories.
137 SUBDIRS
=@subdirs@ build
139 # Selection of languages to be made.
140 CONFIG_LANGUAGES
= @all_selected_languages@
141 LANGUAGES
= c gcov
$(exeext
) gcov-dump
$(exeext
) $(CONFIG_LANGUAGES
)
143 # Various ways of specifying flags for compilations:
144 # CFLAGS is for the user to override to, e.g., do a cross build with -O2.
145 # XCFLAGS is used for most compilations but not when using the GCC just built.
146 # TCFLAGS is used for compilations with the GCC just built.
152 # Flags to determine code coverage. When coverage is disabled, this will
153 # contain the optimization flags, as you normally want code coverage
154 # without optimization.
155 COVERAGE_FLAGS
= @coverage_flags@
156 coverageexts
= .
{gcda
,gcno
}
158 # The warning flags are separate from CFLAGS because people tend to
159 # override optimization flags and we'd like them to still have warnings
160 # turned on. These flags are also used to pass other stage dependent
161 # flags from configure. The user is free to explicitly turn these flags
163 # LOOSE_WARN are the warning flags to use when compiling something
164 # which is only compiled with gcc, such as libgcc and the frontends
166 # STRICT_WARN are the additional warning flags to
167 # apply to the back end and the C front end, which may be compiled
168 # with other compilers.
169 # CXX_COMPAT_WARN are C++ source compatibility warnings.
170 LOOSE_WARN
= @loose_warn@
171 STRICT_WARN
= @strict_warn@
172 CXX_COMPAT_WARN
= @cxx_compat_warn@
174 # This is set by --enable-checking. The idea is to catch forgotten
175 # "extern" tags in header files.
176 NOCOMMON_FLAG
= @nocommon_flag@
178 # This is set by --disable-maintainer-mode (default) to "#"
181 # These are set by --enable-checking=valgrind.
182 RUN_GEN
= @valgrind_command@
183 VALGRIND_DRIVER_DEFINES
= @valgrind_path_defines@
185 # This is how we control whether or not the additional warnings are applied.
186 .
-warn
= $(STRICT_WARN
)
187 build-warn
= $(STRICT_WARN
)
188 GCC_WARN_CFLAGS
= $(LOOSE_WARN
) $($(@D
)-warn
) $(NOCOMMON_FLAG
) $($@
-warn
)
190 # These files are to have specific diagnostics suppressed, or are not to
191 # be subject to -Werror:
192 # flex output may yield harmless "no previous prototype" warnings
193 build
/gengtype-lex.o-warn
= -Wno-error
194 # SYSCALLS.c misses prototypes
195 SYSCALLS.c.X-warn
= -Wno-strict-prototypes
-Wno-error
197 # All warnings have to be shut off in stage1 if the compiler used then
198 # isn't gcc; configure determines that. WARN_CFLAGS will be either
199 # $(GCC_WARN_CFLAGS), or nothing.
200 WARN_CFLAGS
= @warn_cflags@
202 CPPFLAGS
= @CPPFLAGS@
204 # These exists to be overridden by the x-* and t-* files, respectively.
221 RANLIB_FLAGS
= @ranlib_flags@
223 # -------------------------------------------
224 # Programs which operate on the build machine
225 # -------------------------------------------
228 # pwd command to use. Allow user to override default by setting PWDCMD in
229 # the environment to account for automounters. The make variable must not
230 # be called PWDCMD, otherwise the value set here is passed to make
231 # subprocesses and overrides the setting from the user's environment.
232 # Don't use PWD since it is a common shell environment variable and we
233 # don't want to corrupt it.
234 PWD_COMMAND
= $${PWDCMD-pwd
}
235 # on sysV, define this as cp.
237 # Some systems may be missing symbolic links, regular links, or both.
238 # Allow configure to check this and use "ln -s", "ln", or "cp" as appropriate.
241 # These permit overriding just for certain files.
242 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
243 INSTALL_DATA
= @INSTALL_DATA@
244 INSTALL_SCRIPT
= @INSTALL@
245 MAKEINFO
= @MAKEINFO@
246 MAKEINFOFLAGS
= --no-split
249 TEXI2HTML
= $(MAKEINFO
) --html
250 TEXI2POD
= perl
$(srcdir)/..
/contrib
/texi2pod.pl
251 POD2MAN
= pod2man
--center
="GNU" --release
="gcc-$(version)"
252 # Some versions of `touch' (such as the version on Solaris 2.8)
253 # do not correctly set the timestamp due to buggy versions of `utime'
254 # in the kernel. So, we use `echo' instead.
255 STAMP
= echo timestamp
>
256 # If necessary (e.g., when using the MSYS shell on Microsoft Windows)
257 # translate the shell's notion of absolute pathnames to the native
259 build_file_translate
= @build_file_translate@
261 # Make sure the $(MAKE) variable is defined.
264 # Locate mkinstalldirs.
265 mkinstalldirs
=$(SHELL
) $(srcdir)/..
/mkinstalldirs
271 # Dependency tracking stuff.
272 CCDEPMODE
= @CCDEPMODE@
274 depcomp
= $(SHELL
) $(srcdir)/..
/depcomp
275 BUILD_DEPMODE
= @BUILD_DEPMODE@
277 # Some compilers can't handle cc -c blah.c -o foo/blah.o.
278 # In stage2 and beyond, we force this to "-o $@" since we know we're using gcc.
279 OUTPUT_OPTION
= @OUTPUT_OPTION@
281 # This is where we get zlib from. zlibdir is -L../zlib and zlibinc is
282 # -I../zlib, unless we were configured with --with-system-zlib, in which
283 # case both are empty.
291 CPPLIB
= ..
/libcpp
/libcpp.a
292 CPPINC
= -I
$(srcdir)/..
/libcpp
/include
294 # Where to find decNumber
295 enable_decimal_float
= @enable_decimal_float@
296 DECNUM
= $(srcdir)/..
/libdecnumber
297 DECNUMFMT
= $(srcdir)/..
/libdecnumber
/$(enable_decimal_float
)
298 DECNUMINC
= -I
$(DECNUM
) -I
$(DECNUMFMT
) -I..
/libdecnumber
299 LIBDECNUMBER
= ..
/libdecnumber
/libdecnumber.a
301 # Substitution type for target's getgroups 2nd arg.
302 TARGET_GETGROUPS_T
= @TARGET_GETGROUPS_T@
304 # Target to use when installing include directory. Either
305 # install-headers-tar, install-headers-cpio or install-headers-cp.
306 INSTALL_HEADERS_DIR
= @build_install_headers_dir@
308 # Header files that are made available under the same name
309 # to programs compiled with GCC.
310 USER_H
= $(srcdir)/ginclude
/float.h \
311 $(srcdir)/ginclude
/iso646.h \
312 $(srcdir)/ginclude
/stdarg.h \
313 $(srcdir)/ginclude
/stdbool.h \
314 $(srcdir)/ginclude
/stddef.h \
315 $(srcdir)/ginclude
/varargs.h \
316 $(srcdir)/ginclude
/stdfix.h \
319 UNWIND_H
= $(srcdir)/unwind-generic.h
321 # The GCC to use for compiling crt*.o.
322 # Usually the one we just built.
323 # Don't use this as a dependency--use $(GCC_PASSES).
324 GCC_FOR_TARGET
= $(STAGE_CC_WRAPPER
) .
/xgcc
-B.
/ -B
$(build_tooldir
)/bin
/ -isystem
$(build_tooldir
)/include -isystem
$(build_tooldir
)/sys-include
-L
$(objdir
)/..
/ld
326 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
327 # It omits XCFLAGS, and specifies -B./.
328 # It also specifies -isystem ./include to find, e.g., stddef.h.
329 GCC_CFLAGS
=$(CFLAGS_FOR_TARGET
) $(INTERNAL_CFLAGS
) $(X_CFLAGS
) $(T_CFLAGS
) $(LOOSE_WARN
) -Wold-style-definition
$($@
-warn
) -isystem .
/include $(TCFLAGS
)
331 # ---------------------------------------------------
332 # Programs which produce files for the target machine
333 # ---------------------------------------------------
335 AR_FOR_TARGET
:= $(shell \
336 if
[ -f
$(objdir
)/..
/binutils
/ar ] ; then \
337 echo
$(objdir
)/..
/binutils
/ar ; \
339 if
[ "$(host)" = "$(target)" ] ; then \
342 t
='$(program_transform_name)'; echo
ar | sed
-e
$$t ; \
345 AR_FLAGS_FOR_TARGET
=
346 AR_CREATE_FOR_TARGET
= $(AR_FOR_TARGET
) $(AR_FLAGS_FOR_TARGET
) rc
347 AR_EXTRACT_FOR_TARGET
= $(AR_FOR_TARGET
) $(AR_FLAGS_FOR_TARGET
) x
348 LIPO_FOR_TARGET
= lipo
349 ORIGINAL_AS_FOR_TARGET
= @ORIGINAL_AS_FOR_TARGET@
350 RANLIB_FOR_TARGET
:= $(shell \
351 if
[ -f
$(objdir
)/..
/binutils
/ranlib
] ; then \
352 echo
$(objdir
)/..
/binutils
/ranlib
; \
354 if
[ "$(host)" = "$(target)" ] ; then \
357 t
='$(program_transform_name)'; echo ranlib | sed
-e
$$t ; \
360 ORIGINAL_LD_FOR_TARGET
= @ORIGINAL_LD_FOR_TARGET@
361 ORIGINAL_NM_FOR_TARGET
= @ORIGINAL_NM_FOR_TARGET@
363 STRIP_FOR_TARGET
:= $(shell \
364 if
[ -f
$(objdir
)/..
/binutils
/strip ] ; then \
365 echo
$(objdir
)/..
/binutils
/strip ; \
367 if
[ "$(host)" = "$(target)" ] ; then \
370 t
='$(program_transform_name)'; echo
strip | sed
-e
$$t ; \
378 # Where to find some libiberty headers.
379 HASHTAB_H
= $(srcdir)/..
/include/hashtab.h
380 SPLAY_TREE_H
= $(srcdir)/..
/include/splay-tree.h
382 # Default native SYSTEM_HEADER_DIR, to be overridden by targets.
383 NATIVE_SYSTEM_HEADER_DIR
= /usr
/include
384 # Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
385 CROSS_SYSTEM_HEADER_DIR
= @CROSS_SYSTEM_HEADER_DIR@
387 # autoconf sets SYSTEM_HEADER_DIR to one of the above.
388 # Purge it of unneccessary internal relative paths
389 # to directories that might not exist yet.
390 # The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
391 # Use single quotes here to avoid nested double- and backquotes, this
392 # macro is also used in a double-quoted context.
393 SYSTEM_HEADER_DIR
= `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta`
395 # Control whether to run fixproto and fixincludes.
396 STMP_FIXPROTO
= @STMP_FIXPROTO@
397 STMP_FIXINC
= @STMP_FIXINC@
399 # Test to see whether <limits.h> exists in the system header files.
400 LIMITS_H_TEST
= [ -f
$(SYSTEM_HEADER_DIR
)/limits.h
]
402 # Directory for prefix to system directories, for
403 # each of $(system_prefix)/usr/include, $(system_prefix)/usr/lib, etc.
404 TARGET_SYSTEM_ROOT
= @TARGET_SYSTEM_ROOT@
406 xmake_file
=@xmake_file@
407 tmake_file
=@tmake_file@
408 out_file
=$(srcdir)/config
/@out_file@
409 out_object_file
=@out_object_file@
410 md_file
=$(srcdir)/config
/@md_file@
411 tm_file_list
=@tm_file_list@
412 tm_include_list
=@tm_include_list@
413 tm_defines
=@tm_defines@
414 tm_p_file_list
=@tm_p_file_list@
415 tm_p_include_list
=@tm_p_include_list@
416 build_xm_file_list
=@build_xm_file_list@
417 build_xm_include_list
=@build_xm_include_list@
418 build_xm_defines
=@build_xm_defines@
419 host_xm_file_list
=@host_xm_file_list@
420 host_xm_include_list
=@host_xm_include_list@
421 host_xm_defines
=@host_xm_defines@
422 xm_file_list
=@xm_file_list@
423 xm_include_list
=@xm_include_list@
424 xm_defines
=@xm_defines@
425 lang_checks
=check-gcc
426 lang_opt_files
=@lang_opt_files@
$(srcdir)/c.opt
$(srcdir)/common.opt
427 lang_specs_files
=@lang_specs_files@
428 lang_tree_files
=@lang_tree_files@
429 target_cpu_default
=@target_cpu_default@
430 GCC_THREAD_FILE
=@thread_file@
431 OBJC_BOEHM_GC
=@objc_boehm_gc@
432 GTHREAD_FLAGS
=@gthread_flags@
433 extra_modes_file
=@extra_modes_file@
434 extra_opt_files
=@extra_opt_files@
435 host_hook_obj
=@out_host_hook_obj@
437 # ------------------------
438 # Installation directories
439 # ------------------------
441 # Common prefix for installation directories.
442 # NOTE: This directory must exist when you start installation.
444 # Directory in which to put localized header files. On the systems with
445 # gcc as the native cc, `local_prefix' may not be `prefix' which is
447 # NOTE: local_prefix *should not* default from prefix.
448 local_prefix
= @local_prefix@
449 # Directory in which to put host dependent programs and libraries
450 exec_prefix = @
exec_prefix@
451 # Directory in which to put the executable for the command `gcc'
453 # Directory in which to put the directories used by the compiler.
455 # Directory in which GCC puts its executables.
456 libexecdir
= @libexecdir@
462 # Directory in which the compiler finds libraries etc.
463 libsubdir
= $(libdir)/gcc
/$(target_noncanonical
)/$(version
)
464 # Directory in which the compiler finds executables
465 libexecsubdir
= $(libexecdir
)/gcc
/$(target_noncanonical
)/$(version
)
466 # Used to produce a relative $(gcc_tooldir) in gcc.o
467 unlibsubdir
= ..
/..
/..
468 # $(prefix), expressed as a path relative to $(libsubdir).
470 # An explanation of the sed strings:
471 # -e 's|^$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
472 # -e 's|/$$||' match a trailing forward slash and eliminates it
473 # -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
474 # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
476 # (*) Note this pattern overwrites the first character of the string
477 # with a forward slash if one is not already present. This is not a
478 # problem because the exact names of the sub-directories concerned is
479 # unimportant, just the number of them matters.
481 # The practical upshot of these patterns is like this:
483 # prefix exec_prefix result
484 # ------ ----------- ------
488 # /foo/ /foo/bar/ ../
489 # /foo /foo/bar/ugg ../../
490 libsubdir_to_prefix
:= \
491 $(unlibsubdir
)/$(shell echo
"$(libdir)" | \
492 sed
-e
's|^$(prefix)||' -e
's|/$$||' -e
's|^[^/]|/|' \
494 # $(exec_prefix), expressed as a path relative to $(prefix).
495 prefix_to_exec_prefix
:= \
496 $(shell echo
"$(exec_prefix)" | \
497 sed
-e
's|^$(prefix)||' -e
's|^/||' -e
'/./s|$$|/|')
498 # Directory in which to find other cross-compilation tools and headers.
500 # Used in install-cross.
501 gcc_tooldir
= @gcc_tooldir@
502 # Used to install the shared libgcc.
504 # Since gcc_tooldir does not exist at build-time, use -B$(build_tooldir)/bin/
505 build_tooldir
= $(exec_prefix)/$(target_noncanonical
)
506 # Directory in which the compiler finds target-independent g++ includes.
507 gcc_gxx_include_dir
= @gcc_gxx_include_dir@
508 # Directory to search for site-specific includes.
509 local_includedir
= $(local_prefix
)/include
510 includedir = $(prefix)/include
511 # where the info files go
513 # Where cpp should go besides $prefix/bin if necessary
514 cpp_install_dir
= @cpp_install_dir@
515 # where the locale files go
517 localedir
= $(datadir)/locale
518 # Extension (if any) to put in installed man-page filename.
522 exeext
= @host_exeext@
523 build_exeext
= @build_exeext@
525 # Directory in which to put man pages.
527 man1dir = $(mandir)/man1
528 man7dir = $(mandir)/man7
529 # Dir for temp files.
532 datarootdir
= @datarootdir@
534 # Directory in which to build HTML
535 build_htmldir
= $(objdir
)/HTML
/gcc-
$(version
)
536 # Directory in which to put HTML
539 # Whether we were configured with NLS.
542 # Internationalization library.
544 LIBINTL_DEP
= @LIBINTL_DEP@
546 # Character encoding conversion library.
547 LIBICONV
= @LIBICONV@
548 LIBICONV_DEP
= @LIBICONV_DEP@
550 # The GC method to be used on this system.
553 # If a supplementary library is being used for the GC.
556 # "true" if the target C library headers are unavailable; "false"
558 inhibit_libc
= @inhibit_libc@
559 ifeq ($(inhibit_libc
),true
)
560 INHIBIT_LIBC_CFLAGS
= -Dinhibit_libc
563 # Options to use when compiling libgcc2.a.
565 LIBGCC2_DEBUG_CFLAGS
= -g
566 LIBGCC2_CFLAGS
= -O2
$(LIBGCC2_INCLUDES
) $(GCC_CFLAGS
) $(TARGET_LIBGCC2_CFLAGS
) \
567 $(LIBGCC2_DEBUG_CFLAGS
) $(GTHREAD_FLAGS
) \
568 -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED \
569 $(INHIBIT_LIBC_CFLAGS
)
571 # Additional options to use when compiling libgcc2.a.
572 # Some targets override this to -isystem include
575 # Additional target-dependent options for compiling libgcc2.a.
576 TARGET_LIBGCC2_CFLAGS
=
578 # Options to use when compiling crtbegin/end.
579 CRTSTUFF_CFLAGS
= -O2
$(GCC_CFLAGS
) $(INCLUDES
) $(MULTILIB_CFLAGS
) -g0 \
580 -finhibit-size-directive
-fno-inline-functions
-fno-exceptions \
581 -fno-zero-initialized-in-bss
-fno-toplevel-reorder
-fno-tree-vectorize \
582 $(INHIBIT_LIBC_CFLAGS
)
584 # Additional sources to handle exceptions; overridden by targets as needed.
585 LIB2ADDEH
= $(srcdir)/unwind-dw2.c
$(srcdir)/unwind-dw2-fde.c \
586 $(srcdir)/unwind-sjlj.c
$(srcdir)/gthr-gnat.c
$(srcdir)/unwind-c.c
587 LIB2ADDEHSTATIC
= $(LIB2ADDEH
)
588 LIB2ADDEHSHARED
= $(LIB2ADDEH
)
589 LIB2ADDEHDEP
= $(UNWIND_H
) unwind-pe.h unwind.inc unwind-dw2-fde.h unwind-dw2.h
591 # Don't build libunwind by default.
595 SHLIBUNWIND_INSTALL
=
597 # nm flags to list global symbols in libgcc object files.
600 # List of extra executables that should be compiled for this target machine
601 # that are used for compiling from source code to object code.
602 # The rules for compiling them should be in the t-* file for the machine.
603 EXTRA_PASSES
=@extra_passes@
605 # Like EXTRA_PASSES, but these are used when linking.
606 EXTRA_PROGRAMS
= @extra_programs@
608 # List of extra object files that should be compiled for this target machine.
609 # The rules for compiling them should be in the t-* file for the machine.
610 EXTRA_PARTS
= @extra_parts@
612 # List of extra object files that should be compiled and linked with
613 # compiler proper (cc1, cc1obj, cc1plus).
614 EXTRA_OBJS
= @extra_objs@
616 # List of extra object files that should be compiled and linked with
618 EXTRA_GCC_OBJS
=@extra_gcc_objs@
620 # List of additional header files to install.
621 EXTRA_HEADERS
=@extra_headers_list@
623 # The configure script will set this to collect2$(exeext), except on a
624 # (non-Unix) host which can not build collect2, for which it will be
626 COLLECT2
= @collect2@
628 # List of extra C and assembler files to add to static and shared libgcc2.
629 # Assembler files should have names ending in `.asm'.
632 # List of extra C and assembler files to add to static libgcc2.
633 # Assembler files should have names ending in `.asm'.
634 LIB2FUNCS_STATIC_EXTRA
=
636 # List of functions not to build from libgcc2.c.
639 # Target sfp-machine.h file.
642 # Program to convert libraries.
645 # Control whether header files are installed.
646 INSTALL_HEADERS
=install-headers install-mkheaders
648 # Control whether Info documentation is built and installed.
649 BUILD_INFO
= @BUILD_INFO@
651 # Control whether manpages generated by texi2pod.pl can be rebuilt.
652 GENERATED_MANPAGES
= @GENERATED_MANPAGES@
654 # Additional directories of header files to run fixincludes on.
655 # These should be directories searched automatically by default
656 # just as /usr/include is.
657 # *Do not* use this for directories that happen to contain
658 # header files, but are not searched automatically by default.
659 # On most systems, this is empty.
660 OTHER_FIXINCLUDES_DIRS
=
662 # A list of all the language-specific executables.
663 COMPILERS
= cc1
$(exeext
) @all_compilers@
665 # List of things which should already be built whenever we try to use xgcc
666 # to compile anything (without linking).
667 GCC_PASSES
=xgcc
$(exeext
) cc1
$(exeext
) specs
$(EXTRA_PASSES
)
669 # Directory to link to, when using the target `maketest'.
672 # Native compiler for the build machine and its switches.
673 CC_FOR_BUILD
= @CC_FOR_BUILD@
674 BUILD_CFLAGS
= @BUILD_CFLAGS@
-DGENERATOR_FILE
676 # Native linker and preprocessor flags. For x-fragment overrides.
677 BUILD_LDFLAGS
=$(LDFLAGS
)
678 BUILD_CPPFLAGS
=$(ALL_CPPFLAGS
)
680 # Actual name to use when installing a native compiler.
681 GCC_INSTALL_NAME
:= $(shell echo gcc|sed
'$(program_transform_name)')
682 GCC_TARGET_INSTALL_NAME
:= $(target_noncanonical
)-$(shell echo gcc|sed
'$(program_transform_name)')
683 CPP_INSTALL_NAME
:= $(shell echo
cpp|sed
'$(program_transform_name)')
684 PROTOIZE_INSTALL_NAME
:= $(shell echo protoize|sed
'$(program_transform_name)')
685 UNPROTOIZE_INSTALL_NAME
:= $(shell echo unprotoize|sed
'$(program_transform_name)')
686 GCOV_INSTALL_NAME
:= $(shell echo gcov|sed
'$(program_transform_name)')
687 GCCBUG_INSTALL_NAME
:= $(shell echo gccbug|sed
'$(program_transform_name)')
689 # Setup the testing framework, if you have one
690 EXPECT
= `if [ -f $${rootme}/../expect/expect ] ; then \
691 echo $${rootme}/../expect/expect ; \
692 else echo expect ; fi`
694 RUNTEST
= `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
695 echo $${srcdir}/../dejagnu/runtest ; \
696 else echo runtest; fi`
699 # Extra symbols for fixproto to define when parsing headers.
702 # Extra flags to use when compiling crt{begin,end}.o.
705 # Extra flags to use when compiling [m]crt0.o.
708 # "t" or nothing, for building multilibbed versions of, say, crtbegin.o.
711 # Should T contain a `=', libgcc/Makefile will make T_TARGET, setting
712 # $(T_TARGET) to the name of the actual target filename.
714 T_TARGET
: $(T_TARGET
)
716 # This should name the specs file that we're going to install. Target
717 # Makefiles may override it and name another file to be generated from
718 # the built-in specs and installed as the default spec, as long as
719 # they also introduce a rule to generate a file name specs, to be used
723 # End of variables for you to override.
725 # GTM_H lists the config files that the generator files depend on,
726 # while TM_H lists the ones ordinary gcc files depend on, which
727 # includes several files generated by those generators.
728 CONFIG_H
= config.h
$(host_xm_file_list
)
729 TCONFIG_H
= tconfig.h
$(xm_file_list
)
730 TM_P_H
= tm_p.h
$(tm_p_file_list
)
731 GTM_H
= tm.h
$(tm_file_list
)
732 TM_H
= $(GTM_H
) insn-constants.h insn-flags.h options.h
734 # All generated headers which might be needed while building xgcc
735 # itself. Generated headers needed by build tools and the like should
736 # not be mentioned here.
737 simple_generated_h
= insn-attr.h insn-codes.h insn-config.h insn-flags.h
739 simple_generated_c
= insn-attrtab.c insn-automata.c insn-emit.c \
740 insn-extract.c insn-opinit.c insn-output.c \
741 insn-peep.c insn-recog.c
743 generated_files
= config.h tm.h
$(TM_P_H
) $(TM_H
) multilib.h \
744 $(simple_generated_h
) $(simple_generated_c
) specs.h \
745 tree-check.h genrtl.h insn-modes.h tm-preds.h tm-constrs.h \
746 $(ALL_GTFILES_H
) gtype-desc.c gtype-desc.h gcov-iov.h
749 # Variables for version information.
750 BASEVER
:= $(srcdir)/BASE-VER
# 4.x.y
751 DEVPHASE
:= $(srcdir)/DEV-PHASE
# experimental, prerelease, ""
752 DATESTAMP
:= $(srcdir)/DATESTAMP
# YYYYMMDD or empty
753 REVISION
:= $(srcdir)/REVISION
# [BRANCH revision XXXXXX]
755 BASEVER_c
:= $(shell cat
$(BASEVER
))
756 DEVPHASE_c
:= $(shell cat
$(DEVPHASE
))
757 DATESTAMP_c
:= $(shell cat
$(DATESTAMP
))
759 ifeq (,$(wildcard $(REVISION
)))
762 REVISION_c
:= $(shell cat
$(REVISION
))
765 version
:= $(BASEVER_c
)
767 # For use in version.c - double quoted strings, with appropriate
768 # surrounding punctuation and spaces, and with the datestamp and
769 # development phase collapsed to the empty string in release mode
770 # (i.e. if DEVPHASE_c is empty). The space immediately after the
771 # comma in the $(if ...) constructs is significant - do not remove it.
772 BASEVER_s
:= "\"$(BASEVER_c)\""
773 DEVPHASE_s
:= "\"$(if $(DEVPHASE_c), ($(DEVPHASE_c)))\""
774 DATESTAMP_s
:= "\"$(if $(DEVPHASE_c), $(DATESTAMP_c))\""
775 PKGVERSION_s
:= "\"@PKGVERSION@\""
776 BUGURL_s
:= "\"@REPORT_BUGS_TO@\""
778 PKGVERSION
:= @PKGVERSION@
779 BUGURL_TEXI
:= @REPORT_BUGS_TEXI@
782 REVISION_s
:= "\"$(if $(DEVPHASE_c), $(REVISION_c))\""
787 CPPLIB_H
= $(srcdir)/..
/libcpp
/include/line-map.h \
788 $(srcdir)/..
/libcpp
/include/cpplib.h
789 CPP_ID_DATA_H
= $(CPPLIB_H
) $(srcdir)/..
/libcpp
/include/cpp-id-data.h
792 # Now figure out from those variables how to compile and link.
794 # IN_GCC distinguishes between code compiled into GCC itself and other
795 # programs built during a bootstrap.
796 # autoconf inserts -DCROSS_DIRECTORY_STRUCTURE if we are building a
797 # cross compiler which does not use the native headers and libraries.
798 INTERNAL_CFLAGS
= -DIN_GCC @CROSS@
800 # This is the variable actually used when we compile. If you change this,
801 # you probably want to update BUILD_CFLAGS in configure.ac
802 ALL_CFLAGS
= $(X_CFLAGS
) $(T_CFLAGS
) \
803 $(CFLAGS
) $(INTERNAL_CFLAGS
) $(COVERAGE_FLAGS
) $(WARN_CFLAGS
) $(XCFLAGS
) @DEFS@
805 # Likewise. Put INCLUDES at the beginning: this way, if some autoconf macro
806 # puts -I options in CPPFLAGS, our include files in the srcdir will always
807 # win against random include files in /usr/include.
808 ALL_CPPFLAGS
= $(INCLUDES
) $(CPPFLAGS
) $(X_CPPFLAGS
) $(T_CPPFLAGS
)
810 # Build and host support libraries.
811 LIBIBERTY
= ..
/libiberty
/libiberty.a
812 BUILD_LIBIBERTY
= $(build_libobjdir
)/libiberty
/libiberty.a
814 # Dependencies on the intl and portability libraries.
815 LIBDEPS
= $(CPPLIB
) $(LIBIBERTY
) $(LIBINTL_DEP
) $(LIBICONV_DEP
) $(LIBDECNUMBER
)
817 # Likewise, for use in the tools that must run on this machine
818 # even if we are cross-building GCC.
819 BUILD_LIBDEPS
= $(BUILD_LIBIBERTY
)
821 # How to link with both our special library facilities
822 # and the system's installed libraries.
823 LIBS
= @LIBS@
$(CPPLIB
) $(LIBINTL
) $(LIBICONV
) $(LIBIBERTY
) $(LIBDECNUMBER
)
825 # Any system libraries needed just for GNAT.
826 SYSLIBS
= @GNAT_LIBEXC@
828 # Libs needed (at present) just for jcf-dump.
829 LDEXP_LIB
= @LDEXP_LIB@
831 # Likewise, for use in the tools that must run on this machine
832 # even if we are cross-building GCC.
833 BUILD_LIBS
= $(BUILD_LIBIBERTY
)
835 BUILD_RTL
= build
/rtl.o build
/read-rtl.o build
/ggc-none.o build
/vec.o \
836 build
/min-insn-modes.o build
/gensupport.o build
/print-rtl.o
837 BUILD_ERRORS
= build
/errors.o
839 # Specify the directories to be searched for header files.
840 # Both . and srcdir are used, in that order,
841 # so that *config.h will be found in the compilation
842 # subdirectory rather than in the source directory.
843 # -I$(@D) and -I$(srcdir)/$(@D) cause the subdirectory of the file
844 # currently being compiled, in both source trees, to be examined as well.
845 # libintl.h will be found in ../intl if we are using the included libintl.
846 INCLUDES
= -I.
-I
$(@D
) -I
$(srcdir) -I
$(srcdir)/$(@D
) \
847 -I
$(srcdir)/..
/include @INCINTL@ \
848 $(CPPINC
) $(GMPINC
) $(DECNUMINC
)
850 COMPILE.base
= $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) -o
$@
851 ifeq ($(CCDEPMODE
),depmode
=gcc3
)
852 COMPILE
= $(COMPILE.base
) -MT
$@
-MMD
-MP
-MF
$(*D
)/$(DEPDIR
)/$(*F
).Po
854 COMPILE
= source
='$<' object
='$@' libtool
=no \
855 DEPDIR
=$(DEPDIR
) $(CCDEPMODE
) $(depcomp
) $(COMPILE.base
)
862 # Support for additional languages (other than C).
863 # C can be supported this way too (leave for later).
865 LANG_MAKEFRAGS
= @all_lang_makefrags@
866 LANG_MAKEFILES
= @all_lang_makefiles@
868 # Flags to pass to recursive makes.
869 # CC is set by configure.
870 # ??? The choices here will need some experimenting with.
873 export AR_CREATE_FOR_TARGET
874 export AR_FLAGS_FOR_TARGET
875 export AR_EXTRACT_FOR_TARGET
878 export GCC_FOR_TARGET
882 export LIBGCC2_CFLAGS
883 export LIPO_FOR_TARGET
886 export STRIP_FOR_TARGET
887 export RANLIB_FOR_TARGET
893 "BISONFLAGS=$(BISONFLAGS)" \
894 "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)" \
895 "LDFLAGS=$(LDFLAGS)" \
897 "FLEXFLAGS=$(FLEXFLAGS)" \
900 "MAKEINFO=$(MAKEINFO)" \
901 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
905 "build_exeext=$(build_exeext)" \
907 "exec_prefix=$(exec_prefix)" \
909 "local_prefix=$(local_prefix)" \
910 "gxx_include_dir=$(gcc_gxx_include_dir)" \
911 "build_tooldir=$(build_tooldir)" \
912 "gcc_tooldir=$(gcc_tooldir)" \
914 "libexecsubdir=$(libsubdir)" \
915 "datadir=$(datadir)" \
916 "localedir=$(localedir)"
918 # Lists of files for various purposes.
920 # All option source files
921 ALL_OPT_FILES
=$(lang_opt_files
) $(extra_opt_files
)
923 # Target specific, C specific object file
924 C_TARGET_OBJS
=@c_target_objs@
926 # Target specific, C++ specific object file
927 CXX_TARGET_OBJS
=@cxx_target_objs@
929 # Object files for gcc driver.
930 GCC_OBJS
= gcc.o opts-common.o gcc-options.o
932 # Language-specific object files for C and Objective C.
933 C_AND_OBJC_OBJS
= attribs.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o \
934 c-convert.o c-aux-info.o c-common.o c-opts.o c-format.o c-semantics.o \
935 c-incpath.o cppdefault.o c-ppoutput.o c-cppbuiltin.o
prefix.o \
936 c-objc-common.o c-dump.o c-pch.o c-parser.o
$(C_TARGET_OBJS
) \
937 c-gimplify.o tree-mudflap.o c-pretty-print.o c-omp.o
939 # Language-specific object files for C.
940 C_OBJS
= c-lang.o stub-objc.o
$(C_AND_OBJC_OBJS
)
942 # Language-independent object files.
943 # We put the insn-*.o files first so that a parallel make will build
944 # them sooner, because they are large and otherwise tend to be the
945 # last objects to finish building.
979 combine-stack-adj.o \
1109 tree-loop-distribution.o \
1110 tree-loop-linear.o \
1113 tree-object-size.o \
1119 tree-pretty-print.o \
1121 tree-scalar-evolution.o \
1123 tree-ssa-address.o \
1125 tree-ssa-alias-warnings.o \
1127 tree-ssa-coalesce.o \
1129 tree-ssa-copyrename.o \
1133 tree-ssa-forwprop.o \
1134 tree-ssa-ifcombine.o \
1136 tree-ssa-loop-ch.o \
1137 tree-ssa-loop-im.o \
1138 tree-ssa-loop-ivcanon.o \
1139 tree-ssa-loop-ivopts.o \
1140 tree-ssa-loop-manip.o \
1141 tree-ssa-loop-niter.o \
1142 tree-ssa-loop-prefetch.o \
1143 tree-ssa-loop-unswitch.o \
1145 tree-ssa-math-opts.o \
1146 tree-ssa-operands.o \
1148 tree-ssa-phiprop.o \
1150 tree-ssa-propagate.o \
1151 tree-ssa-reassoc.o \
1154 tree-ssa-structalias.o \
1156 tree-ssa-threadedge.o \
1157 tree-ssa-threadupdate.o \
1158 tree-ssa-uncprop.o \
1163 tree-vect-analyze.o \
1164 tree-vect-generic.o \
1165 tree-vect-patterns.o \
1166 tree-vect-transform.o \
1181 # Target object files.
1182 OBJS-md
= $(out_object_file
)
1184 # Language independent object files which are not used by all languages.
1196 ipa-struct-reorg.o \
1205 OBJS
= $(OBJS-common
) $(OBJS-md
) $(OBJS-archive
)
1207 OBJS-onestep
= libbackend.o
$(OBJS-archive
)
1209 # This lists all host object files, whether they are included in this
1210 # compilation or not. This is used for dependency tracking.
1211 ALL_HOST_OBJS
= $(GCC_OBJS
) $(C_OBJS
) $(OBJS
) libbackend.o \
1212 @TREEBROWSER@ main.o gccspec.o version.o intl.o
prefix.o cppspec.o \
1213 $(foreach v
,$(CONFIG_LANGUAGES
),$($(v
)_OBJS
)) \
1214 $(COLLECT2_OBJS
) $(EXTRA_GCC_OBJS
) \
1215 mips-tfile.o mips-tdump.o \
1216 $(PROTO_OBJS
) $(GCOV_OBJS
) $(GCOV_DUMP_OBJS
)
1218 BACKEND
= main.o @TREEBROWSER@ libbackend.a
$(CPPLIB
) $(LIBDECNUMBER
)
1220 MOSTLYCLEANFILES
= insn-flags.h insn-config.h insn-codes.h \
1221 insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
1222 insn-attr.h insn-attrtab.c insn-opinit.c insn-preds.c insn-constants.h \
1223 tm-preds.h tm-constrs.h \
1224 tree-check.h min-insn-modes.c insn-modes.c insn-modes.h \
1225 genrtl.c genrtl.h gt-
*.h gtype-
*.h gtype-desc.c gtyp-input.list \
1226 xgcc
$(exeext
) cpp$(exeext
) cc1
$(exeext
) cc1
*-dummy
$(exeext
) $(EXTRA_PASSES
) \
1227 $(EXTRA_PARTS
) $(EXTRA_PROGRAMS
) gcc-cross
$(exeext
) \
1228 protoize
$(exeext
) unprotoize
$(exeext
) \
1229 $(SPECS
) collect2
$(exeext
) \
1230 gcov-iov
$(build_exeext
) gcov
$(exeext
) gcov-dump
$(exeext
) \
1231 *.
[0-9][0-9].
* *.
[si
] *-checksum.c libbackend.a libgcc.mk
1233 # Defined in libgcc2.c, included only in the static library.
1234 LIB2FUNCS_ST
= _eprintf __gcc_bcmp
1236 # Defined in libgcov.c, included only in gcov library
1237 LIBGCOV
= _gcov _gcov_merge_add _gcov_merge_single _gcov_merge_delta \
1238 _gcov_fork _gcov_execl _gcov_execlp _gcov_execle \
1239 _gcov_execv _gcov_execvp _gcov_execve \
1240 _gcov_interval_profiler _gcov_pow2_profiler _gcov_one_value_profiler \
1241 _gcov_indirect_call_profiler _gcov_average_profiler _gcov_ior_profiler \
1244 FPBIT_FUNCS
= _pack_sf _unpack_sf _addsub_sf _mul_sf _div_sf \
1245 _fpcmp_parts_sf _compare_sf _eq_sf _ne_sf _gt_sf _ge_sf \
1246 _lt_sf _le_sf _unord_sf _si_to_sf _sf_to_si _negate_sf _make_sf \
1247 _sf_to_df _sf_to_tf _thenan_sf _sf_to_usi _usi_to_sf
1249 DPBIT_FUNCS
= _pack_df _unpack_df _addsub_df _mul_df _div_df \
1250 _fpcmp_parts_df _compare_df _eq_df _ne_df _gt_df _ge_df \
1251 _lt_df _le_df _unord_df _si_to_df _df_to_si _negate_df _make_df \
1252 _df_to_sf _df_to_tf _thenan_df _df_to_usi _usi_to_df
1254 TPBIT_FUNCS
= _pack_tf _unpack_tf _addsub_tf _mul_tf _div_tf \
1255 _fpcmp_parts_tf _compare_tf _eq_tf _ne_tf _gt_tf _ge_tf \
1256 _lt_tf _le_tf _unord_tf _si_to_tf _tf_to_si _negate_tf _make_tf \
1257 _tf_to_df _tf_to_sf _thenan_tf _tf_to_usi _usi_to_tf
1259 D32PBIT_FUNCS
= _addsub_sd _div_sd _mul_sd _plus_sd _minus_sd \
1260 _eq_sd _ne_sd _lt_sd _gt_sd _le_sd _ge_sd \
1261 _sd_to_si _sd_to_di _sd_to_usi _sd_to_udi \
1262 _si_to_sd _di_to_sd _usi_to_sd _udi_to_sd \
1263 _sd_to_sf _sd_to_df _sd_to_xf _sd_to_tf \
1264 _sf_to_sd _df_to_sd _xf_to_sd _tf_to_sd \
1265 _sd_to_dd _sd_to_td _unord_sd _conv_sd
1267 D64PBIT_FUNCS
= _addsub_dd _div_dd _mul_dd _plus_dd _minus_dd \
1268 _eq_dd _ne_dd _lt_dd _gt_dd _le_dd _ge_dd \
1269 _dd_to_si _dd_to_di _dd_to_usi _dd_to_udi \
1270 _si_to_dd _di_to_dd _usi_to_dd _udi_to_dd \
1271 _dd_to_sf _dd_to_df _dd_to_xf _dd_to_tf \
1272 _sf_to_dd _df_to_dd _xf_to_dd _tf_to_dd \
1273 _dd_to_sd _dd_to_td _unord_dd _conv_dd
1275 D128PBIT_FUNCS
= _addsub_td _div_td _mul_td _plus_td _minus_td \
1276 _eq_td _ne_td _lt_td _gt_td _le_td _ge_td \
1277 _td_to_si _td_to_di _td_to_usi _td_to_udi \
1278 _si_to_td _di_to_td _usi_to_td _udi_to_td \
1279 _td_to_sf _td_to_df _td_to_xf _td_to_tf \
1280 _sf_to_td _df_to_td _xf_to_td _tf_to_td \
1281 _td_to_sd _td_to_dd _unord_td _conv_td
1283 # These might cause a divide overflow trap and so are compiled with
1285 LIB2_DIVMOD_FUNCS
= _divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4
1288 # Language makefile fragments.
1290 # The following targets define the interface between us and the languages.
1292 # all.cross, start.encap, rest.encap,
1293 # install-common, install-info, install-man,
1295 # mostlyclean, clean, distclean, maintainer-clean,
1297 # Each language is linked in with a series of hooks. The name of each
1298 # hooked is "lang.${target_name}" (eg: lang.info). Configure computes
1299 # and adds these here. We use double-colon rules for some of the hooks;
1300 # double-colon rules should be preferred for any new hooks.
1302 # language hooks, generated by configure
1305 # per-language makefile fragments
1306 ifneq ($(LANG_MAKEFRAGS
),)
1307 include $(LANG_MAKEFRAGS
)
1310 # target and host overrides must follow the per-language makefile fragments
1311 # so they can override or augment language-specific variables
1314 ifneq ($(tmake_file
),)
1315 include $(tmake_file
)
1319 ifneq ($(xmake_file
),)
1320 include $(xmake_file
)
1325 # -----------------------------
1326 # Rebuilding this configuration
1327 # -----------------------------
1329 # On the use of stamps:
1330 # Consider the example of tree-check.h. It is constructed with build/gencheck.
1331 # A simple rule to build tree-check.h would be
1332 # tree-check.h: build/gencheck$(build_exeext)
1333 # $(RUN_GEN) build/gencheck$(build_exeext) > tree-check.h
1335 # but tree-check.h doesn't change every time gencheck changes. It would the
1336 # nice if targets that depend on tree-check.h wouldn't be rebuilt
1337 # unnecessarily when tree-check.h is unchanged. To make this, tree-check.h
1338 # must not be overwritten with a identical copy. One solution is to use a
1340 # tree-check.h: build/gencheck$(build_exeext)
1341 # $(RUN_GEN) build/gencheck$(build_exeext) > tmp-check.h
1342 # $(SHELL) $(srcdir)/../move-if-change tmp-check.h tree-check.h
1344 # This solution has a different problem. Since the time stamp of tree-check.h
1345 # is unchanged, make will try to update tree-check.h every time it runs.
1346 # To prevent this, one can add a stamp
1347 # tree-check.h: s-check
1348 # s-check : build/gencheck$(build_exeext)
1349 # $(RUN_GEN) build/gencheck$(build_exeext) > tmp-check.h
1350 # $(SHELL) $(srcdir)/../move-if-change tmp-check.h tree-check.h
1353 # The problem with this solution is that make thinks that tree-check.h is
1354 # always unchanged. Make must be deceived into thinking that tree-check.h is
1355 # rebuild by the "tree-check.h: s-check" rule. To do this, add a dummy command:
1356 # tree-check.h: s-check; @true
1357 # s-check : build/gencheck$(build_exeext)
1358 # $(RUN_GEN) build/gencheck$(build_exeext) > tmp-check.h
1359 # $(SHELL) $(srcdir)/../move-if-change tmp-check.h tree-check.h
1362 # This is what is done in this makefile. Note that mkconfig.sh has a
1363 # move-if-change built-in
1365 Makefile
: config.status
$(srcdir)/Makefile.in
$(LANG_MAKEFRAGS
)
1366 LANGUAGES
="$(CONFIG_LANGUAGES)" \
1368 CONFIG_SHELL
="$(SHELL)" \
1369 CONFIG_FILES
=$@
$(SHELL
) config.status
1371 config.h
: cs-config.h
; @true
1372 bconfig.h
: cs-bconfig.h
; @true
1373 tconfig.h
: cs-tconfig.h
; @true
1374 tm.h
: cs-tm.h
; @true
1375 tm_p.h
: cs-tm_p.h
; @true
1377 cs-config.h
: Makefile
1378 TARGET_CPU_DEFAULT
="" \
1379 HEADERS
="$(host_xm_include_list)" DEFINES
="$(host_xm_defines)" \
1380 $(SHELL
) $(srcdir)/mkconfig.sh config.h
1382 cs-bconfig.h
: Makefile
1383 TARGET_CPU_DEFAULT
="" \
1384 HEADERS
="$(build_xm_include_list)" DEFINES
="$(build_xm_defines)" \
1385 $(SHELL
) $(srcdir)/mkconfig.sh bconfig.h
1387 cs-tconfig.h
: Makefile
1388 TARGET_CPU_DEFAULT
="" \
1389 HEADERS
="$(xm_include_list)" DEFINES
="USED_FOR_TARGET $(xm_defines)" \
1390 $(SHELL
) $(srcdir)/mkconfig.sh tconfig.h
1393 TARGET_CPU_DEFAULT
="$(target_cpu_default)" \
1394 HEADERS
="$(tm_include_list)" DEFINES
="$(tm_defines)" \
1395 $(SHELL
) $(srcdir)/mkconfig.sh tm.h
1398 TARGET_CPU_DEFAULT
="" \
1399 HEADERS
="$(tm_p_include_list)" DEFINES
="" \
1400 $(SHELL
) $(srcdir)/mkconfig.sh tm_p.h
1402 # Don't automatically run autoconf, since configure.ac might be accidentally
1403 # newer than configure. Also, this writes into the source directory which
1404 # might be on a read-only file system. If configured for maintainer mode
1405 # then do allow autoconf to be run.
1407 $(srcdir)/configure
: @MAINT@
$(srcdir)/configure.ac
$(srcdir)/aclocal.m4 \
1408 $(srcdir)/acinclude.m4
1409 (cd
$(srcdir) && autoconf
)
1411 gccbug
: $(srcdir)/gccbug.in
1412 CONFIG_FILES
=gccbug CONFIG_HEADERS
= .
/config.status
1414 # cstamp-h.in controls rebuilding of config.in.
1415 # It is named cstamp-h.in and not stamp-h.in so the mostlyclean rule doesn't
1416 # delete it. A stamp file is needed as autoheader won't update the file if
1417 # nothing has changed.
1418 # It remains in the source directory and is part of the distribution.
1419 # This follows what is done in shellutils, fileutils, etc.
1420 # "echo timestamp" is used instead of touch to be consistent with other
1421 # packages that use autoconf (??? perhaps also to avoid problems with patch?).
1422 # ??? Newer versions have a maintainer mode that may be useful here.
1424 # Don't run autoheader automatically either.
1425 # Only run it if maintainer mode is enabled.
1426 @MAINT@
$(srcdir)/config.in
: $(srcdir)/cstamp-h.in
1427 @MAINT@
$(srcdir)/cstamp-h.in
: $(srcdir)/configure.ac
1428 @MAINT@
(cd
$(srcdir) && autoheader
)
1429 @MAINT@ @
rm -f
$(srcdir)/cstamp-h.in
1430 @MAINT@ echo timestamp
> $(srcdir)/cstamp-h.in
1431 auto-host.h
: cstamp-h
; @true
1432 cstamp-h
: config.in config.status
1433 CONFIG_HEADERS
=auto-host.h
:config.in \
1435 LANGUAGES
="$(CONFIG_LANGUAGES)" $(SHELL
) config.status
1437 # Really, really stupid make features, such as SUN's KEEP_STATE, may force
1438 # a target to build even if it is up-to-date. So we must verify that
1439 # config.status does not exist before failing.
1440 config.status
: $(srcdir)/configure
$(srcdir)/config.gcc
1441 @if
[ ! -f config.status
] ; then \
1442 echo You must configure gcc. Look at http
://gcc.gnu.org
/install/ for details.
; \
1445 LANGUAGES
="$(CONFIG_LANGUAGES)" $(SHELL
) config.status
--recheck
; \
1452 # Provide quickstrap as a target that people can type into the gcc directory,
1453 # and that fails if you're not into it.
1455 cd
$(toplevel_builddir
) && $(MAKE
) all-target-libgcc
1457 all.internal
: start.encap rest.encap doc
1458 # This is what to compile if making a cross-compiler.
1459 all.cross
: native gcc-cross
$(exeext
) cpp$(exeext
) specs \
1460 libgcc-support lang.
all.cross doc @GENINSRC@ srcextra
1461 # This is what must be made before installing GCC and converting libraries.
1462 start.encap
: native xgcc
$(exeext
) cpp$(exeext
) specs \
1463 libgcc-support lang.start.encap @GENINSRC@ srcextra
1464 # These can't be made until after GCC can run.
1465 rest.encap
: $(STMP_FIXPROTO
) lang.rest.encap
1466 # This is what is made with the host's compiler
1467 # whether making a cross compiler or not.
1468 native
: config.status auto-host.h build-@POSUB@
$(LANGUAGES
) \
1469 $(EXTRA_PASSES
) $(EXTRA_PROGRAMS
) $(COLLECT2
)
1471 # Define the names for selecting languages in LANGUAGES.
1474 # Tell GNU make these are phony targets.
1477 # On the target machine, finish building a cross compiler.
1478 # This does the things that can't be done on the host machine.
1481 # Recompile all the language-independent object files.
1482 # This is used only if the user explicitly asks for it.
1483 compilations
: $(BACKEND
)
1485 # This archive is strictly for the host.
1486 libbackend.a
: $(OBJS@onestep@
)
1487 -rm -rf libbackend.a
1488 $(AR
) $(AR_FLAGS
) libbackend.a
$(OBJS@onestep@
)
1489 -$(RANLIB
) $(RANLIB_FLAGS
) libbackend.a
1491 # We call this executable `xgcc' rather than `gcc'
1492 # to avoid confusion if the current directory is in the path
1493 # and CC is `gcc'. It is renamed to `gcc' when it is installed.
1494 xgcc
$(exeext
): $(GCC_OBJS
) gccspec.o version.o intl.o
prefix.o \
1495 $(LIBDEPS
) $(EXTRA_GCC_OBJS
)
1496 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@
$(GCC_OBJS
) gccspec.o \
1497 intl.o
prefix.o version.o
$(EXTRA_GCC_OBJS
) $(LIBS
)
1499 # cpp is to cpp0 as gcc is to cc1.
1500 # The only difference from xgcc is that it's linked with cppspec.o
1501 # instead of gccspec.o.
1502 cpp$(exeext
): $(GCC_OBJS
) cppspec.o version.o intl.o
prefix.o \
1503 $(LIBDEPS
) $(EXTRA_GCC_OBJS
)
1504 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@
$(GCC_OBJS
) cppspec.o \
1505 intl.o
prefix.o version.o
$(EXTRA_GCC_OBJS
) $(LIBS
)
1507 # Dump a specs file to make -B./ read these specs over installed ones.
1508 $(SPECS
): xgcc
$(exeext
)
1509 $(GCC_FOR_TARGET
) -dumpspecs
> tmp-specs
1510 mv tmp-specs
$(SPECS
)
1512 # We do want to create an executable named `xgcc', so we can use it to
1513 # compile libgcc2.a.
1514 # Also create gcc-cross, so that install-common will install properly.
1515 gcc-cross
$(exeext
): xgcc
$(exeext
)
1516 cp xgcc
$(exeext
) gcc-cross
$(exeext
)
1518 cc1-dummy
$(exeext
): $(C_OBJS
) dummy-checksum.o
$(BACKEND
) $(LIBDEPS
)
1519 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@
$(C_OBJS
) dummy-checksum.o \
1520 $(BACKEND
) $(LIBS
) $(GMPLIBS
)
1522 cc1-checksum.c
: cc1-dummy
$(exeext
) build
/genchecksum
$(build_exeext
)
1523 build
/genchecksum
$(build_exeext
) cc1-dummy
$(exeext
) > $@
1525 cc1
$(exeext
): $(C_OBJS
) cc1-checksum.o
$(BACKEND
) $(LIBDEPS
)
1526 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@
$(C_OBJS
) cc1-checksum.o \
1527 $(BACKEND
) $(LIBS
) $(GMPLIBS
)
1532 LIB2ADD
= $(LIB2FUNCS_EXTRA
)
1533 LIB2ADD_ST
= $(LIB2FUNCS_STATIC_EXTRA
)
1535 # All source files for libgcc are either in the source directory (in
1536 # which case they will start with $(srcdir)), or generated into the build
1537 # directory (in which case they will be relative paths).
1538 srcdirify
= $(patsubst $(srcdir)%,$$(gcc_srcdir
)%,$(filter $(srcdir)%,$(1))) \
1539 $(patsubst %,$$(gcc_objdir
)/%,$(filter-out $(srcdir)%,$(1)))
1541 # The distinction between these two variables is no longer relevant,
1542 # so we combine them. Sort removes duplicates.
1543 GCC_EXTRA_PARTS
:= $(sort $(EXTRA_MULTILIB_PARTS
) $(EXTRA_PARTS
))
1545 libgcc-support
: libgcc.mvars stmp-int-hdrs
$(STMP_FIXPROTO
) $(TCONFIG_H
) \
1546 $(MACHMODE_H
) $(FPBIT
) $(DPBIT
) $(TPBIT
) $(LIB2ADD
) \
1547 $(LIB2ADD_ST
) $(LIB2ADDEH
) $(srcdir)/emutls.c gcov-iov.h
$(SFP_MACHINE
)
1549 libgcc.mvars
: config.status Makefile
$(LIB2ADD
) $(LIB2ADD_ST
) specs \
1551 : > tmp-libgcc.mvars
1552 echo LIB1ASMFUNCS
= '$(LIB1ASMFUNCS)' >> tmp-libgcc.mvars
1553 echo LIB1ASMSRC
= '$(LIB1ASMSRC)' >> tmp-libgcc.mvars
1554 echo LIB2FUNCS_ST
= '$(LIB2FUNCS_ST)' >> tmp-libgcc.mvars
1555 echo LIB2FUNCS_EXCLUDE
= '$(LIB2FUNCS_EXCLUDE)' >> tmp-libgcc.mvars
1556 echo LIBGCOV
= '$(LIBGCOV)' >> tmp-libgcc.mvars
1557 echo LIB2ADD
= '$(call srcdirify,$(LIB2ADD))' >> tmp-libgcc.mvars
1558 echo LIB2ADD_ST
= '$(call srcdirify,$(LIB2ADD_ST))' >> tmp-libgcc.mvars
1559 echo LIB2ADDEH
= '$(call srcdirify,$(LIB2ADDEH) $(srcdir)/emutls.c)' >> tmp-libgcc.mvars
1560 echo LIB2ADDEHSTATIC
= '$(call srcdirify,$(LIB2ADDEHSTATIC) $(srcdir)/emutls.c)' >> tmp-libgcc.mvars
1561 echo LIB2ADDEHSHARED
= '$(call srcdirify,$(LIB2ADDEHSHARED) $(srcdir)/emutls.c)' >> tmp-libgcc.mvars
1562 echo LIB2_SIDITI_CONV_FUNCS
= '$(LIB2_SIDITI_CONV_FUNCS)' >> tmp-libgcc.mvars
1563 echo LIBUNWIND
= '$(call srcdirify,$(LIBUNWIND))' >> tmp-libgcc.mvars
1564 echo SHLIBUNWIND_LINK
= '$(SHLIBUNWIND_LINK)' >> tmp-libgcc.mvars
1565 echo SHLIBUNWIND_INSTALL
= '$(SHLIBUNWIND_INSTALL)' >> tmp-libgcc.mvars
1566 echo FPBIT
= '$(FPBIT)' >> tmp-libgcc.mvars
1567 echo FPBIT_FUNCS
= '$(FPBIT_FUNCS)' >> tmp-libgcc.mvars
1568 echo LIB2_DIVMOD_FUNCS
= '$(LIB2_DIVMOD_FUNCS)' >> tmp-libgcc.mvars
1569 echo DPBIT
= '$(DPBIT)' >> tmp-libgcc.mvars
1570 echo DPBIT_FUNCS
= '$(DPBIT_FUNCS)' >> tmp-libgcc.mvars
1571 echo TPBIT
= '$(TPBIT)' >> tmp-libgcc.mvars
1572 echo TPBIT_FUNCS
= '$(TPBIT_FUNCS)' >> tmp-libgcc.mvars
1573 echo DFP_ENABLE
= '$(DFP_ENABLE)' >> tmp-libgcc.mvars
1574 echo DFP_CFLAGS
='$(DFP_CFLAGS)' >> tmp-libgcc.mvars
1575 echo D32PBIT
='$(D32PBIT)' >> tmp-libgcc.mvars
1576 echo D32PBIT_FUNCS
='$(D32PBIT_FUNCS)' >> tmp-libgcc.mvars
1577 echo D64PBIT
='$(D64PBIT)' >> tmp-libgcc.mvars
1578 echo D64PBIT_FUNCS
='$(D64PBIT_FUNCS)' >> tmp-libgcc.mvars
1579 echo D128PBIT
='$(D128PBIT)' >> tmp-libgcc.mvars
1580 echo D128PBIT_FUNCS
='$(D128PBIT_FUNCS)' >> tmp-libgcc.mvars
1581 echo GCC_EXTRA_PARTS
= '$(GCC_EXTRA_PARTS)' >> tmp-libgcc.mvars
1582 echo SHLIB_LINK
= '$(subst $(GCC_FOR_TARGET),$$(GCC_FOR_TARGET),$(SHLIB_LINK))' >> tmp-libgcc.mvars
1583 echo SHLIB_INSTALL
= '$(SHLIB_INSTALL)' >> tmp-libgcc.mvars
1584 echo SHLIB_EXT
= '$(SHLIB_EXT)' >> tmp-libgcc.mvars
1585 echo SHLIB_MKMAP
= '$(call srcdirify,$(SHLIB_MKMAP))' >> tmp-libgcc.mvars
1586 echo SHLIB_MKMAP_OPTS
= '$(SHLIB_MKMAP_OPTS)' >> tmp-libgcc.mvars
1587 echo SHLIB_MAPFILES
= '$(call srcdirify,$(SHLIB_MAPFILES))' >> tmp-libgcc.mvars
1588 echo SHLIB_NM_FLAGS
= '$(SHLIB_NM_FLAGS)' >> tmp-libgcc.mvars
1589 echo LIBGCC2_CFLAGS
= '$(LIBGCC2_CFLAGS)' >> tmp-libgcc.mvars
1590 echo CRTSTUFF_CFLAGS
= '$(CRTSTUFF_CFLAGS)' >> tmp-libgcc.mvars
1591 echo CRTSTUFF_T_CFLAGS
= '$(CRTSTUFF_T_CFLAGS)' >> tmp-libgcc.mvars
1592 echo CRTSTUFF_T_CFLAGS_S
= '$(CRTSTUFF_T_CFLAGS_S)' >> tmp-libgcc.mvars
1594 mv tmp-libgcc.mvars libgcc.mvars
1596 # Use the genmultilib shell script to generate the information the gcc
1597 # driver program needs to select the library directory based on the
1599 multilib.h
: s-mlib
; @true
1600 s-mlib
: $(srcdir)/genmultilib Makefile
1601 if
test @enable_multilib@
= yes \
1602 ||
test -n
"$(MULTILIB_OSDIRNAMES)"; then \
1603 $(SHELL
) $(srcdir)/genmultilib \
1604 "$(MULTILIB_OPTIONS)" \
1605 "$(MULTILIB_DIRNAMES)" \
1606 "$(MULTILIB_MATCHES)" \
1607 "$(MULTILIB_EXCEPTIONS)" \
1608 "$(MULTILIB_EXTRA_OPTS)" \
1609 "$(MULTILIB_EXCLUSIONS)" \
1610 "$(MULTILIB_OSDIRNAMES)" \
1611 "@enable_multilib@" \
1614 $(SHELL
) $(srcdir)/genmultilib
'' '' '' '' '' '' '' no \
1617 $(SHELL
) $(srcdir)/..
/move-if-change tmp-mlib.h multilib.h
1620 # Compile two additional files that are linked with every program
1621 # linked using GCC on systems using COFF or ELF, for the sake of C++
1623 $(T
)crtbegin.o
: crtstuff.c
$(GCC_PASSES
) $(TCONFIG_H
) auto-host.h \
1624 gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h
$(TM_H
)
1625 $(GCC_FOR_TARGET
) $(CRTSTUFF_CFLAGS
) $(CRTSTUFF_T_CFLAGS
) \
1626 -c
$(srcdir)/crtstuff.c
-DCRT_BEGIN \
1627 -o
$(T
)crtbegin
$(objext
)
1629 $(T
)crtend.o
: crtstuff.c
$(GCC_PASSES
) $(TCONFIG_H
) auto-host.h \
1630 gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h
$(TM_H
)
1631 $(GCC_FOR_TARGET
) $(CRTSTUFF_CFLAGS
) $(CRTSTUFF_T_CFLAGS
) \
1632 -c
$(srcdir)/crtstuff.c
-DCRT_END \
1633 -o
$(T
)crtend
$(objext
)
1635 # These are versions of crtbegin and crtend for shared libraries.
1636 $(T
)crtbeginS.o
: crtstuff.c
$(GCC_PASSES
) $(TCONFIG_H
) auto-host.h \
1637 gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h
$(TM_H
)
1638 $(GCC_FOR_TARGET
) $(CRTSTUFF_CFLAGS
) $(CRTSTUFF_T_CFLAGS_S
) \
1639 -c
$(srcdir)/crtstuff.c
-DCRT_BEGIN
-DCRTSTUFFS_O \
1640 -o
$(T
)crtbeginS
$(objext
)
1642 $(T
)crtendS.o
: crtstuff.c
$(GCC_PASSES
) $(TCONFIG_H
) auto-host.h \
1643 gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h
$(TM_H
)
1644 $(GCC_FOR_TARGET
) $(CRTSTUFF_CFLAGS
) $(CRTSTUFF_T_CFLAGS_S
) \
1645 -c
$(srcdir)/crtstuff.c
-DCRT_END
-DCRTSTUFFS_O \
1646 -o
$(T
)crtendS
$(objext
)
1648 # This is a version of crtbegin for -static links.
1649 $(T
)crtbeginT.o
: crtstuff.c
$(GCC_PASSES
) $(TCONFIG_H
) auto-host.h \
1650 gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h
$(TM_H
)
1651 $(GCC_FOR_TARGET
) $(CRTSTUFF_CFLAGS
) $(CRTSTUFF_T_CFLAGS
) \
1652 -c
$(srcdir)/crtstuff.c
-DCRT_BEGIN
-DCRTSTUFFT_O \
1653 -o
$(T
)crtbeginT
$(objext
)
1655 # Compile the start modules crt0.o and mcrt0.o that are linked with
1657 $(T
)crt0.o
: s-crt0
; @true
1658 $(T
)mcrt0.o
: s-crt0
; @true
1660 s-crt0
: $(CRT0_S
) $(MCRT0_S
) $(GCC_PASSES
) $(CONFIG_H
)
1661 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(CRT0STUFF_T_CFLAGS
) \
1662 -o
$(T
)crt0.o
-c
$(CRT0_S
)
1663 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(CRT0STUFF_T_CFLAGS
) \
1664 -o
$(T
)mcrt0.o
-c
$(MCRT0_S
)
1667 # Compiling object files from source files.
1669 srcextra
: gcc.srcextra lang.srcextra
1671 gcc.srcextra
: gengtype-lex.c
1674 COLLECT2_OBJS
= collect2.o tlink.o intl.o version.o
1675 COLLECT2_LIBS
= @COLLECT2_LIBS@
1676 collect2
$(exeext
): $(COLLECT2_OBJS
) $(LIBDEPS
)
1677 # Don't try modifying collect2 (aka ld) in place--it might be linking this.
1678 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o T
$@ \
1679 $(COLLECT2_OBJS
) $(LIBS
) $(COLLECT2_LIBS
)
1682 # Language-independent files.
1684 ifneq ($(SHLIB_LINK
),)
1685 ifeq (@enable_shared@
,yes
)
1686 DRIVER_SHLIB
= -DENABLE_SHARED_LIBGCC
1695 -DSTANDARD_STARTFILE_PREFIX
=\"$(unlibsubdir
)/\" \
1696 -DSTANDARD_EXEC_PREFIX
=\"$(libdir)/gcc
/\" \
1697 -DSTANDARD_LIBEXEC_PREFIX
=\"$(libexecdir
)/gcc
/\" \
1698 -DDEFAULT_TARGET_VERSION
=\"$(version
)\" \
1699 -DDEFAULT_TARGET_MACHINE
=\"$(target_noncanonical
)\" \
1700 -DSTANDARD_BINDIR_PREFIX
=\"$(bindir)/\" \
1701 -DTOOLDIR_BASE_PREFIX
=\"$(libsubdir_to_prefix
)$(prefix_to_exec_prefix
)\" \
1702 @TARGET_SYSTEM_ROOT_DEFINE@ \
1703 $(VALGRIND_DRIVER_DEFINES
) \
1706 gencheck.h
: s-gencheck
; @true
1707 s-gencheck
: Makefile
1708 ltf
="$(lang_tree_files)"; for f in
$$ltf; do \
1709 echo
"#include \"$$f\""; \
1710 done | sed
's|$(srcdir)/||' > tmp-gencheck.h
1711 $(SHELL
) $(srcdir)/..
/move-if-change tmp-gencheck.h gencheck.h
1714 specs.h
: s-specs
; @true
1716 lsf
="$(lang_specs_files)"; for f in
$$lsf; do \
1717 echo
"#include \"$$f\""; \
1718 done | sed
's|$(srcdir)/||' > tmp-specs.h
1719 $(SHELL
) $(srcdir)/..
/move-if-change tmp-specs.h specs.h
1722 optionlist
: s-options
; @true
1723 s-options
: $(ALL_OPT_FILES
) Makefile
$(srcdir)/opt-gather.awk
1724 $(AWK
) -f
$(srcdir)/opt-gather.awk
$(ALL_OPT_FILES
) > tmp-optionlist
1725 $(SHELL
) $(srcdir)/..
/move-if-change tmp-optionlist optionlist
1728 options.c
: optionlist
$(srcdir)/opt-functions.awk
$(srcdir)/optc-gen.awk
1729 $(AWK
) -f
$(srcdir)/opt-functions.awk
-f
$(srcdir)/optc-gen.awk \
1730 -v header_name
="config.h system.h coretypes.h tm.h" < $< > $@
1732 options.h
: s-options-h
; @true
1733 s-options-h
: optionlist
$(srcdir)/opt-functions.awk
$(srcdir)/opth-gen.awk
1734 $(AWK
) -f
$(srcdir)/opt-functions.awk
-f
$(srcdir)/opth-gen.awk \
1735 < $< > tmp-options.h
1736 $(SHELL
) $(srcdir)/..
/move-if-change tmp-options.h options.h
1739 dumpvers
: dumpvers.c
1741 # Build auxiliary files that support ecoff format.
1742 mips-tfile
: mips-tfile.o version.o
$(LIBDEPS
)
1743 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o
$@ mips-tfile.o version.o
$(LIBS
)
1745 mips-tdump
: mips-tdump.o version.o
$(LIBDEPS
)
1746 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o
$@ mips-tdump.o version.o
$(LIBS
)
1749 # Generate header and source files from the machine description,
1752 .PRECIOUS
: insn-config.h insn-flags.h insn-codes.h insn-constants.h \
1753 insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
1754 insn-attr.h insn-attrtab.c insn-preds.c
1756 # Dependencies for the md file. The first time through, we just assume
1757 # the md file itself and the generated dependency file (in order to get
1758 # it built). The second time through we have the dependency file.
1760 MD_DEPS
= s-mddeps
$(md_file
) $(MD_INCLUDES
)
1762 s-mddeps
: $(md_file
) $(MD_INCLUDES
) build
/genmddeps
$(build_exeext
)
1763 $(RUN_GEN
) build
/genmddeps
$(build_exeext
) $(md_file
) > tmp-mddeps
1764 $(SHELL
) $(srcdir)/..
/move-if-change tmp-mddeps mddeps.mk
1767 # For each of the files generated by running a generator program over
1768 # the machine description, the following pair of static pattern rules
1769 # runs the generator program only if the machine description has changed,
1770 # but touches the target file only when its contents actually change.
1771 # The "; @true" construct forces Make to recheck the timestamp on the
1774 simple_generated_h
= insn-attr.h insn-codes.h insn-config.h insn-flags.h
1776 simple_generated_c
= insn-attrtab.c insn-automata.c insn-emit.c \
1777 insn-extract.c insn-opinit.c insn-output.c \
1778 insn-peep.c insn-recog.c
1780 $(simple_generated_h
): insn-
%.h
: s-
%; @true
1782 $(simple_generated_h
:insn-
%.h
=s-
%): s-
%: build
/gen
%$(build_exeext
) \
1783 $(MD_DEPS
) insn-conditions.md
1784 $(RUN_GEN
) build
/gen
$*$(build_exeext
) $(md_file
) \
1785 insn-conditions.md
> tmp-
$*.h
1786 $(SHELL
) $(srcdir)/..
/move-if-change tmp-
$*.h insn-
$*.h
1789 $(simple_generated_c
): insn-
%.c
: s-
%; @true
1790 $(simple_generated_c
:insn-
%.c
=s-
%): s-
%: build
/gen
%$(build_exeext
) \
1791 $(MD_DEPS
) insn-conditions.md
1792 $(RUN_GEN
) build
/gen
$*$(build_exeext
) $(md_file
) \
1793 insn-conditions.md
> tmp-
$*.c
1794 $(SHELL
) $(srcdir)/..
/move-if-change tmp-
$*.c insn-
$*.c
1797 # genconstants needs to run before insn-conditions.md is available
1798 # (because the constants may be used in the conditions).
1799 insn-constants.h
: s-constants
; @true
1800 s-constants
: build
/genconstants
$(build_exeext
) $(MD_DEPS
)
1801 $(RUN_GEN
) build
/genconstants
$(build_exeext
) $(md_file
) \
1803 $(SHELL
) $(srcdir)/..
/move-if-change tmp-constants.h insn-constants.h
1804 $(STAMP
) s-constants
1806 # gencheck doesn't read the machine description, and the file produced
1807 # doesn't use the insn-* convention.
1808 tree-check.h
: s-check
; @true
1809 s-check
: build
/gencheck
$(build_exeext
)
1810 $(RUN_GEN
) build
/gencheck
$(build_exeext
) > tmp-check.h
1811 $(SHELL
) $(srcdir)/..
/move-if-change tmp-check.h tree-check.h
1814 # gencondmd doesn't use the standard naming convention.
1815 gencondmd.c
: s-conditions
; @true
1816 s-conditions
: $(MD_DEPS
) build
/genconditions
$(build_exeext
)
1817 $(RUN_GEN
) build
/genconditions
$(build_exeext
) $(md_file
) > tmp-condmd.c
1818 $(SHELL
) $(srcdir)/..
/move-if-change tmp-condmd.c gencondmd.c
1819 $(STAMP
) s-conditions
1821 insn-conditions.md
: s-condmd
; @true
1822 s-condmd
: build
/gencondmd
$(build_exeext
)
1823 $(RUN_GEN
) build
/gencondmd
$(build_exeext
) > tmp-cond.md
1824 $(SHELL
) $(srcdir)/..
/move-if-change tmp-cond.md insn-conditions.md
1828 # These files are generated by running the same generator more than
1829 # once with different options, so they have custom rules. The
1830 # stampfile idiom is the same.
1831 genrtl.c
: s-genrtl
; @true
1832 genrtl.h
: s-genrtl-h
; @true
1834 s-genrtl
: build
/gengenrtl
$(build_exeext
)
1835 $(RUN_GEN
) build
/gengenrtl
$(build_exeext
) > tmp-genrtl.c
1836 $(SHELL
) $(srcdir)/..
/move-if-change tmp-genrtl.c genrtl.c
1839 s-genrtl-h
: build
/gengenrtl
$(build_exeext
)
1840 $(RUN_GEN
) build
/gengenrtl
$(build_exeext
) -h
> tmp-genrtl.h
1841 $(SHELL
) $(srcdir)/..
/move-if-change tmp-genrtl.h genrtl.h
1844 insn-modes.c
: s-modes
; @true
1845 insn-modes.h
: s-modes-h
; @true
1846 min-insn-modes.c
: s-modes-m
; @true
1848 s-modes
: build
/genmodes
$(build_exeext
)
1849 $(RUN_GEN
) build
/genmodes
$(build_exeext
) > tmp-modes.c
1850 $(SHELL
) $(srcdir)/..
/move-if-change tmp-modes.c insn-modes.c
1853 s-modes-h
: build
/genmodes
$(build_exeext
)
1854 $(RUN_GEN
) build
/genmodes
$(build_exeext
) -h
> tmp-modes.h
1855 $(SHELL
) $(srcdir)/..
/move-if-change tmp-modes.h insn-modes.h
1858 s-modes-m
: build
/genmodes
$(build_exeext
)
1859 $(RUN_GEN
) build
/genmodes
$(build_exeext
) -m
> tmp-min-modes.c
1860 $(SHELL
) $(srcdir)/..
/move-if-change tmp-min-modes.c min-insn-modes.c
1863 insn-preds.c
: s-preds
; @true
1864 tm-preds.h
: s-preds-h
; @true
1865 tm-constrs.h
: s-constrs-h
; @true
1867 s-preds
: $(MD_DEPS
) build
/genpreds
$(build_exeext
)
1868 $(RUN_GEN
) build
/genpreds
$(build_exeext
) $(md_file
) > tmp-preds.c
1869 $(SHELL
) $(srcdir)/..
/move-if-change tmp-preds.c insn-preds.c
1872 s-preds-h
: $(MD_DEPS
) build
/genpreds
$(build_exeext
)
1873 $(RUN_GEN
) build
/genpreds
$(build_exeext
) -h
$(md_file
) > tmp-preds.h
1874 $(SHELL
) $(srcdir)/..
/move-if-change tmp-preds.h tm-preds.h
1877 s-constrs-h
: $(MD_DEPS
) build
/genpreds
$(build_exeext
)
1878 $(RUN_GEN
) build
/genpreds
$(build_exeext
) -c
$(md_file
) > tmp-constrs.h
1879 $(SHELL
) $(srcdir)/..
/move-if-change tmp-constrs.h tm-constrs.h
1880 $(STAMP
) s-constrs-h
1882 GTFILES
= $(CPP_ID_DATA_H
) $(srcdir)/input.h
$(srcdir)/coretypes.h \
1883 $(host_xm_file_list
) \
1884 $(tm_file_list
) $(HASHTAB_H
) $(SPLAY_TREE_H
) $(srcdir)/bitmap.h \
1885 $(srcdir)/alias.h
$(srcdir)/coverage.c
$(srcdir)/rtl.h \
1886 $(srcdir)/optabs.h
$(srcdir)/tree.h
$(srcdir)/function.h \
1887 $(srcdir)/libfuncs.h
$(srcdir)/..
/libcpp
/include/symtab.h \
1888 $(srcdir)/real.h
$(srcdir)/varray.h
$(srcdir)/insn-addr.h
$(srcdir)/hwint.h \
1889 $(srcdir)/fixed-value.h \
1890 $(srcdir)/ipa-reference.h
$(srcdir)/output.h
$(srcdir)/cfgloop.h \
1891 $(srcdir)/cselib.h
$(srcdir)/basic-block.h
$(srcdir)/cgraph.h \
1892 $(srcdir)/reload.h
$(srcdir)/caller-save.c \
1893 $(srcdir)/alias.c
$(srcdir)/bitmap.c
$(srcdir)/cselib.c
$(srcdir)/cgraph.c \
1894 $(srcdir)/ipa-prop.c
$(srcdir)/ipa-cp.c
$(srcdir)/ipa-inline.c
$(srcdir)/matrix-reorg.c \
1895 $(srcdir)/dbxout.c
$(srcdir)/ipa-struct-reorg.c
$(srcdir)/dwarf2out.c
$(srcdir)/dwarf2asm.c \
1896 $(srcdir)/dojump.c \
1897 $(srcdir)/emit-rtl.c
$(srcdir)/except.c
$(srcdir)/explow.c
$(srcdir)/expr.c \
1898 $(srcdir)/function.c
$(srcdir)/except.h \
1899 $(srcdir)/gcse.c
$(srcdir)/integrate.c
$(srcdir)/lists.c
$(srcdir)/optabs.c \
1900 $(srcdir)/profile.c
$(srcdir)/regclass.c \
1901 $(srcdir)/reg-stack.c
$(srcdir)/cfglayout.c
$(srcdir)/cfglayout.h \
1902 $(srcdir)/sdbout.c
$(srcdir)/stor-layout.c \
1903 $(srcdir)/stringpool.c
$(srcdir)/tree.c
$(srcdir)/varasm.c \
1904 $(srcdir)/tree-mudflap.c
$(srcdir)/tree-flow.h
$(srcdir)/tree-scalar-evolution.c \
1905 $(srcdir)/tree-ssanames.c
$(srcdir)/tree-eh.c
$(srcdir)/tree-ssa-address.c \
1906 $(srcdir)/tree-phinodes.c
$(srcdir)/tree-cfg.c \
1907 $(srcdir)/tree-dfa.c
$(srcdir)/tree-ssa-propagate.c \
1908 $(srcdir)/tree-iterator.c
$(srcdir)/gimplify.c \
1909 $(srcdir)/tree-chrec.h
$(srcdir)/tree-vect-generic.c \
1910 $(srcdir)/tree-ssa-operands.h \
1911 $(srcdir)/tree-profile.c
$(srcdir)/tree-nested.c \
1912 $(srcdir)/ipa-reference.c
$(srcdir)/tree-ssa-structalias.h \
1913 $(srcdir)/tree-ssa-structalias.c
$(srcdir)/tree-parloops.c \
1914 $(srcdir)/omp-low.c
$(srcdir)/varpool.c \
1915 $(srcdir)/targhooks.c
$(out_file
) $(srcdir)/passes.c
$(srcdir)/cgraphunit.c \
1918 GTFILES_H
= $(subst /,-, $(patsubst $(srcdir)/%,gt-
%, $(patsubst %.c
,%.h
, \
1919 $(filter %.c
, $(GTFILES
)))))
1921 GTFILES_LANG_H
= $(patsubst [%], gtype-
%.h
, $(filter [%], $(GTFILES
)))
1922 ALL_GTFILES_H
:= $(sort $(GTFILES_H
) $(GTFILES_LANG_H
))
1924 # $(GTFILES) may be too long to put on a command line, so we have to
1925 # write it out to a file (taking care not to do that in a way that
1926 # overflows a command line!) and then have gengtype read the file in.
1927 # The extra blank line in this definition is crucial: it makes the
1928 # $(foreach ...) below expand to many lines instead of one.
1930 define echo_to_gi.list
1931 echo
'$(gtyp)' >> tmp-gi.list
1935 $(ALL_GTFILES_H
) gtype-desc.c gtype-desc.h
: s-gtype
; @true
1937 gtyp-input.list
: s-gtyp-input
; @true
1938 s-gtyp-input
: Makefile
1939 $(foreach gtyp
, $(GTFILES
), $(echo_to_gi.list
))
1940 $(SHELL
) $(srcdir)/..
/move-if-change tmp-gi.list gtyp-input.list
1941 $(STAMP
) s-gtyp-input
1943 s-gtype
: build
/gengtype
$(build_exeext
) $(filter-out [%], $(GTFILES
)) \
1945 $(RUN_GEN
) build
/gengtype
$(build_exeext
) $(srcdir) gtyp-input.list
1949 # How to compile object files to run on the build machine.
1951 BUILDCOMPILE.base
= $(CC_FOR_BUILD
) -c
$(BUILD_CFLAGS
) $(BUILD_CPPFLAGS
) -o
$@
1952 ifeq ($(BUILD_DEPMODE
),depmode
=gcc3
)
1953 BUILDCOMPILE
= $(BUILDCOMPILE.base
) -MT
$@
-MMD
-MP
-MF build
/$(DEPDIR
)/$(*F
).Po
1955 BUILDCOMPILE
= source
='$<' object
='$@' libtool
=no \
1956 DEPDIR
=$(DEPDIR
) $(BUILD_DEPMODE
) $(depcomp
) $(BUILDCOMPILE.base
)
1959 ALL_BUILD_OBJS
= $(BUILD_RTL
) $(BUILD_ERRORS
) \
1960 build
/gencondmd.o build
/genattr.o build
/genattrtab.o \
1961 build
/genautomata.o build
/gencheck.o build
/genconstants.o \
1962 build
/genemit.o build
/genextract.o build
/genflags.o \
1963 build
/gengenrtl.o build
/gengtype-lex.o build
/gengtype-parse.o \
1964 build
/gengtype.o build
/genmddeps.o build
/genmodes.o \
1965 build
/genopinit.o build
/genoutput.o build
/genpeep.o \
1966 build
/genpreds.o build
/genrecog.o \
1967 build
/gcov-iov.o build
/gen-protos.o build
/scan.o \
1968 build
/fix-header.o build
/scan-decls.o
1970 build
/%.o
: %.c bconfig.h
1973 # Dependencies on generated headers for various build/ objects.
1974 build
/gensupport.o
: $(GTM_H
) insn-modes.h
1975 build
/ggc-none.o
: gtype-desc.h
1976 build
/min-insn-modes.o
: insn-modes.h
1977 build
/print-rtl.o
: $(GTM_H
) insn-modes.h
1978 build
/read-rtl.o
: $(GTM_H
) insn-modes.h
1979 build
/rtl.o
: $(GTM_H
) insn-modes.h gtype-desc.h
1980 build
/vec.o
: gtype-desc.h
1981 build
/gencondmd.o
: gencondmd.c
$(GTM_H
) insn-constants.h
$(TM_P_H
) \
1982 tm-constrs.h options.h gtype-desc.h genrtl.h tree-check.h
1983 build
/genattr.o
: $(GTM_H
) insn-modes.h
1984 build
/genattrtab.o
: $(GTM_H
) gtype-desc.h insn-modes.h
1985 build
/genautomata.o
: insn-modes.h
$(GTM_H
)
1986 build
/gencheck.o
: $(GTM_H
) gencheck.h
1987 build
/gencodes.o
: $(GTM_H
) insn-modes.h
1988 build
/genconditions.o
: insn-modes.h
1989 build
/genconfig.o
: $(GTM_H
) insn-modes.h
1990 build
/genconstants.o
: $(GTM_H
) insn-modes.h
1991 build
/genemit.o
: $(GTM_H
) insn-modes.h
1992 build
/genextract.o
: $(GTM_H
) insn-modes.h
1993 build
/genflags.o
: $(GTM_H
) insn-modes.h
1994 build
/genmddeps.o
: $(GTM_H
) insn-modes.h
1995 build
/genopinit.o
: insn-modes.h
$(GTM_H
)
1996 build
/genoutput.o
: insn-modes.h
$(GTM_H
)
1997 build
/genpeep.o
: insn-modes.h
$(GTM_H
)
1998 build
/genpreds.o
: insn-modes.h
$(GTM_H
)
1999 build
/genrecog.o
: insn-modes.h
$(GTM_H
)
2000 build
/gcov-iov.o
: $(GTM_H
) $(TM_H
)
2001 build
/gen-protos.o
: $(GTM_H
)
2002 build
/scan.o
: $(GTM_H
)
2003 build
/fix-header.o
: xsys-protos.h
$(GTM_H
)
2004 build
/scan-decls.o
: $(GTM_H
)
2006 # This pulls in tm-pred.h which contains inline functions wrapping up
2007 # predicates from the back-end so those functions must be discarded.
2008 # No big deal since gencondmd.c is a dummy file for non-GCC compilers.
2009 build
/gencondmd.o
: \
2010 BUILD_CFLAGS
:= $(filter-out -fkeep-inline-functions
, $(BUILD_CFLAGS
))
2012 # Compile the programs that generate insn-* from the machine description.
2013 # They are compiled with $(CC_FOR_BUILD), and associated libraries,
2014 # since they need to run on this machine
2015 # even if GCC is being compiled to run on some other machine.
2017 # As a general rule...
2018 build
/gen
%$(build_exeext
): build
/gen
%.o
$(BUILD_LIBDEPS
)
2019 $(CC_FOR_BUILD
) $(BUILD_CFLAGS
) $(BUILD_LDFLAGS
) -o
$@ \
2020 $(filter-out $(BUILD_LIBDEPS
), $^
) $(BUILD_LIBS
)
2022 # All these programs use the MD reader ($(BUILD_RTL)).
2023 genprogmd
= attr attrtab automata codes conditions config constants emit \
2024 extract flags mddeps opinit output peep preds recog
2025 $(genprogmd
:%=build
/gen
%$(build_exeext
)): $(BUILD_RTL
) $(BUILD_ERRORS
)
2027 # These programs need libs over and above what they get from the above list.
2028 build
/genautomata
$(build_exeext
) : BUILD_LIBS
+= -lm
2030 # These programs are not linked with the MD reader.
2031 build
/gengenrtl
$(build_exeext
) : $(BUILD_ERRORS
)
2032 build
/genmodes
$(build_exeext
) : $(BUILD_ERRORS
)
2033 build
/gengtype
$(build_exeext
) : build
/gengtype-lex.o build
/gengtype-parse.o \
2036 # Generated source files for gengtype.
2037 gengtype-lex.c
: gengtype-lex.l
2038 -$(FLEX
) $(FLEXFLAGS
) -o
$@
$<
2041 # Remake cpp and protoize.
2043 PREPROCESSOR_DEFINES
= \
2044 -DGCC_INCLUDE_DIR
=\"$(libsubdir
)/include\" \
2045 -DFIXED_INCLUDE_DIR
=\"$(libsubdir
)/include-fixed
\" \
2046 -DGPLUSPLUS_INCLUDE_DIR
=\"$(gcc_gxx_include_dir
)\" \
2047 -DGPLUSPLUS_TOOL_INCLUDE_DIR
=\"$(gcc_gxx_include_dir
)/$(target_noncanonical
)\" \
2048 -DGPLUSPLUS_BACKWARD_INCLUDE_DIR
=\"$(gcc_gxx_include_dir
)/backward
\" \
2049 -DLOCAL_INCLUDE_DIR
=\"$(local_includedir
)\" \
2050 -DCROSS_INCLUDE_DIR
=\"$(CROSS_SYSTEM_HEADER_DIR
)\" \
2051 -DTOOL_INCLUDE_DIR
=\"$(gcc_tooldir
)/include\" \
2052 -DPREFIX
=\"$(prefix)/\" \
2053 -DSTANDARD_EXEC_PREFIX
=\"$(libdir)/gcc
/\" \
2054 @TARGET_SYSTEM_ROOT_DEFINE@
2056 # Note for the stamp targets, we run the program `true' instead of
2057 # having an empty command (nothing following the semicolon).
2059 proto
: config.status protoize
$(exeext
) unprotoize
$(exeext
) SYSCALLS.c.X
2061 PROTO_OBJS
= intl.o version.o cppdefault.o errors.o
2063 protoize
$(exeext
): protoize.o
$(PROTO_OBJS
) $(LIBDEPS
)
2064 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@ protoize.o
$(PROTO_OBJS
) $(LIBS
)
2066 unprotoize
$(exeext
): unprotoize.o
$(PROTO_OBJS
) $(LIBDEPS
)
2067 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@ unprotoize.o
$(PROTO_OBJS
) $(LIBS
)
2069 # This info describes the target machine, so compile with GCC just built.
2070 SYSCALLS.c.X
: $(srcdir)/sys-types.h
$(srcdir)/sys-protos.h
$(GCC_PASSES
) \
2072 -rm -f SYSCALLS.c tmp-SYSCALLS.s
2073 sed
-e s
/TARGET_GETGROUPS_T
/$(TARGET_GETGROUPS_T
)/ \
2074 $(srcdir)/sys-types.h
$(srcdir)/sys-protos.h
> SYSCALLS.c
2075 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(ALL_CPPFLAGS
) \
2076 -aux-info
$@
-S
-o tmp-SYSCALLS.s SYSCALLS.c
2077 -rm -f SYSCALLS.c tmp-SYSCALLS.s
2080 test-protoize-simple
: .
/protoize .
/unprotoize
$(GCC_PASSES
)
2081 -rm -f tmp-proto.
[cso
]
2082 cp
$(srcdir)/protoize.c tmp-proto.c
2083 chmod u
+w tmp-proto.c
2084 .
/protoize
-N
-B .
/ -x getopt.h
-c
"-B./ -Wall -Wwrite-strings \
2085 $(GCC_CFLAGS) $(INCLUDES) \
2086 -DGCC_INCLUDE_DIR=0 \
2087 -DFIXED_INCLUDE_DIR=0 \
2088 -DGPLUSPLUS_INCLUDE_DIR=0 \
2089 -DCROSS_INCLUDE_DIR=0 \
2090 -DTOOL_INCLUDE_DIR=0 \
2091 -DSTANDARD_EXEC_PREFIX=0 \
2092 -DDEFAULT_TARGET_MACHINE=0 \
2093 -DDEFAULT_TARGET_VERSION=0" tmp-proto.c
2094 @echo
'**********' Expect
400 lines of differences.
2095 -diff
$(srcdir)/protoize.c tmp-proto.c
> tmp-proto.diff
2096 -wc
-l tmp-proto.diff
2097 .
/unprotoize
-N
-x getopt.h
-c
"-B./ -Wall -Wwrite-strings \
2098 $(GCC_CFLAGS) $(INCLUDES) \
2099 -DGCC_INCLUDE_DIR=0 \
2100 -DFIXED_INCLUDE_DIR=0 \
2101 -DGPLUSPLUS_INCLUDE_DIR=0 \
2102 -DCROSS_INCLUDE_DIR=0 \
2103 -DTOOL_INCLUDE_DIR=0 \
2104 -DSTANDARD_EXEC_PREFIX=0 \
2105 -DDEFAULT_TARGET_MACHINE=0 \
2106 -DDEFAULT_TARGET_VERSION=0" tmp-proto.c
2107 @echo Expect zero differences.
2108 diff
$(srcdir)/protoize.c tmp-proto.c | cat
2109 -rm -f tmp-proto.
[cs
] tmp-proto
$(objext
)
2111 build
/gcov-iov
$(build_exeext
): build
/gcov-iov.o
2112 $(CC_FOR_BUILD
) $(BUILD_CFLAGS
) $(BUILD_LDFLAGS
) build
/gcov-iov.o
-o
$@
2115 s-iov
: build
/gcov-iov
$(build_exeext
) $(BASEVER
) $(DEVPHASE
)
2116 build
/gcov-iov
$(build_exeext
) '$(BASEVER_c)' '$(DEVPHASE_c)' \
2118 $(SHELL
) $(srcdir)/..
/move-if-change tmp-gcov-iov.h gcov-iov.h
2121 GCOV_OBJS
= gcov.o intl.o version.o errors.o
2122 gcov
$(exeext
): $(GCOV_OBJS
) $(LIBDEPS
)
2123 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) $(GCOV_OBJS
) $(LIBS
) -o
$@
2124 GCOV_DUMP_OBJS
= gcov-dump.o version.o errors.o
2125 gcov-dump
$(exeext
): $(GCOV_DUMP_OBJS
) $(LIBDEPS
)
2126 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) $(GCOV_DUMP_OBJS
) $(LIBS
) -o
$@
2128 # Build the include directories. The stamp files are stmp-* rather than
2129 # s-* so that mostlyclean does not force the include directory to
2132 # Build the include directories.
2133 stmp-int-hdrs
: $(STMP_FIXINC
) $(USER_H
) $(UNWIND_H
) fixinc_list
2134 # Copy in the headers provided with gcc.
2135 # The sed command gets just the last file name component;
2136 # this is necessary because VPATH could add a dirname.
2137 # Using basename would be simpler, but some systems don't have it.
2138 # The touch command is here to workaround an AIX/Linux NFS bug.
2139 -if
[ -d
include ] ; then true
; else mkdir
include; chmod a
+rx
include; fi
2140 -if
[ -d include-fixed
] ; then true
; else mkdir include-fixed
; chmod a
+rx include-fixed
; fi
2141 for file in ..
$(USER_H
); do \
2142 if
[ X
$$file != X..
]; then \
2143 realfile
=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
2144 $(STAMP
) include/$$realfile; \
2145 rm -f
include/$$realfile; \
2146 cp
$$file include; \
2147 chmod a
+r
include/$$realfile; \
2150 rm -f
include/unwind.h
2151 cp
$(UNWIND_H
) include/unwind.h
2152 set
-e
; for ml in
`cat fixinc_list`; do \
2153 sysroot_headers_suffix
=`echo $${ml} | sed -e 's/;.*$$//'`; \
2154 multi_dir
=`echo $${ml} | sed -e 's/^[^;]*;//'`; \
2155 fix_dir
=include-fixed
$${multi_dir}; \
2156 if
$(LIMITS_H_TEST
) ; then \
2157 cat
$(srcdir)/limitx.h
$(srcdir)/glimits.h
$(srcdir)/limity.h
> tmp-xlimits.h
; \
2159 cat
$(srcdir)/glimits.h
> tmp-xlimits.h
; \
2161 $(mkinstalldirs
) $${fix_dir}; \
2162 chmod a
+rx
$${fix_dir} || true
; \
2163 rm -f
$${fix_dir}/limits.h
; \
2164 mv tmp-xlimits.h
$${fix_dir}/limits.h
; \
2165 chmod a
+r
$${fix_dir}/limits.h
; \
2167 # Install the README
2168 rm -f include-fixed
/README
2169 cp
$(srcdir)/..
/fixincludes
/README-fixinc include-fixed
/README
2170 chmod a
+r include-fixed
/README
2173 .PHONY
: install-gcc-tooldir
2174 install-gcc-tooldir
:
2175 $(mkinstalldirs
) $(DESTDIR
)$(gcc_tooldir
)
2177 macro_list
: s-macro_list
; @true
2178 s-macro_list
: $(GCC_PASSES
)
2179 echo |
$(GCC_FOR_TARGET
) -E
-dM
- | \
2180 sed
-n
-e
's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p' \
2181 -e
's/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \
2182 sort -u
> tmp-macro_list
2183 $(SHELL
) $(srcdir)/..
/move-if-change tmp-macro_list macro_list
2184 $(STAMP
) s-macro_list
2186 fixinc_list
: s-fixinc_list
; @true
2187 s-fixinc_list
: $(GCC_PASSES
)
2188 # Build up a list of multilib directories and corresponding sysroot
2189 # suffixes, in form sysroot;multilib.
2190 if
$(GCC_FOR_TARGET
) -print-sysroot-headers-suffix
> /dev
/null
2>&1; then \
2191 set
-e
; for ml in
`$(GCC_FOR_TARGET) -print-multi-lib`; do \
2192 multi_dir
=`echo $${ml} | sed -e 's/;.*$$//'`; \
2193 flags
=`echo $${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
2194 sfx
=`$(GCC_FOR_TARGET) $${flags} -print-sysroot-headers-suffix`; \
2195 if
[ "$${multi_dir}" = "." ]; \
2196 then multi_dir
=""; \
2198 multi_dir
=/$${multi_dir}; \
2200 echo
"$${sfx};$${multi_dir}"; \
2204 fi
> tmp-fixinc_list
2205 $(SHELL
) $(srcdir)/..
/move-if-change tmp-fixinc_list fixinc_list
2206 $(STAMP
) s-fixinc_list
2208 # The line below is supposed to avoid accidentally matching the
2209 # built-in suffix rule `.o:' to build fixincl out of fixincl.o. You'd
2210 # expect fixincl to be newer than fixincl.o, such that this situation
2211 # would never come up. As it turns out, if you use ccache with
2212 # CCACHE_HARDLINK enabled, the compiler doesn't embed the current
2213 # working directory in object files (-g absent, or -fno-working-dir
2214 # present), and build and host are the same, fixincl for the host will
2215 # build after fixincl for the build machine, getting a cache hit,
2216 # thereby updating the timestamp of fixincl.o in the host tree.
2217 # Because of CCACHE_HARDLINK, this will also update the timestamp in
2218 # the build tree, and so fixincl in the build tree will appear to be
2219 # out of date. Yuck.
2220 ..
/$(build_subdir
)/fixincludes
/fixincl
: ; @
:
2222 # Build fixed copies of system files.
2223 # Abort if no system headers available, unless building a crosscompiler.
2224 # FIXME: abort unless building --without-headers would be more accurate and less ugly
2225 stmp-fixinc
: gsyslimits.h macro_list fixinc_list \
2226 $(build_objdir
)/fixincludes
/fixincl \
2227 $(build_objdir
)/fixincludes
/fixinc.sh
2228 rm -rf include-fixed
; mkdir include-fixed
2229 -chmod a
+rx include-fixed
2230 if
[ -d ..
/prev-gcc
]; then \
2232 $(MAKE
) real-
$(INSTALL_HEADERS_DIR
) DESTDIR
=`pwd`/..
/gcc
/ \
2235 set
-e
; for ml in
`cat fixinc_list`; do \
2236 sysroot_headers_suffix
=`echo $${ml} | sed -e 's/;.*$$//'`; \
2237 multi_dir
=`echo $${ml} | sed -e 's/^[^;]*;//'`; \
2238 fix_dir
=include-fixed
$${multi_dir}; \
2239 if
! $(inhibit_libc
) && test ! -d
${SYSTEM_HEADER_DIR}; then \
2240 echo The directory that should contain system headers does not exist
: >&2 ; \
2241 echo
" ${SYSTEM_HEADER_DIR}" >&2 ; \
2242 tooldir_sysinc
=`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`; \
2243 if
test "x${SYSTEM_HEADER_DIR}" = "x$${tooldir_sysinc}"; \
2244 then sleep
1; else exit
1; fi
; \
2246 $(mkinstalldirs
) $${fix_dir}; \
2247 chmod a
+rx
$${fix_dir} || true
; \
2248 (TARGET_MACHINE
='$(target)'; srcdir=`cd $(srcdir); ${PWD_COMMAND}`; \
2249 SHELL
='$(SHELL)'; MACRO_LIST
=`${PWD_COMMAND}`/macro_list
; \
2250 export TARGET_MACHINE
srcdir SHELL MACRO_LIST
&& \
2251 cd
$(build_objdir
)/fixincludes
&& \
2252 $(SHELL
) .
/fixinc.sh ..
/..
/gcc
/$${fix_dir} \
2253 $(SYSTEM_HEADER_DIR
) $(OTHER_FIXINCLUDES_DIRS
) ); \
2254 rm -f
$${fix_dir}/syslimits.h
; \
2255 if
[ -f
$${fix_dir}/limits.h
]; then \
2256 mv
$${fix_dir}/limits.h
$${fix_dir}/syslimits.h
; \
2258 cp
$(srcdir)/gsyslimits.h
$${fix_dir}/syslimits.h
; \
2260 chmod a
+r
$${fix_dir}/syslimits.h
; \
2263 $(STAMP
) stmp-fixinc
2265 # Files related to the fixproto script.
2266 # gen-protos and fix-header are compiled with CC_FOR_BUILD, but they are only
2267 # used in native and host-x-target builds, so it's safe to link them with
2270 deduced.h
: $(GCC_PASSES
) $(srcdir)/scan-types.sh stmp-int-hdrs
2271 if
[ -d
"$(SYSTEM_HEADER_DIR)" ]; \
2273 CC
="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -isystem include -isystem ${SYSTEM_HEADER_DIR}"; \
2275 $(SHELL
) $(srcdir)/scan-types.sh
"$(srcdir)" >tmp-deduced.h
; \
2276 mv tmp-deduced.h deduced.h
; \
2278 $(STAMP
) deduced.h
; \
2281 GEN_PROTOS_OBJS
= build
/gen-protos.o build
/scan.o
$(BUILD_ERRORS
)
2282 build
/gen-protos
$(build_exeext
): $(GEN_PROTOS_OBJS
)
2283 ${CC_FOR_BUILD} $(BUILD_CFLAGS
) $(BUILD_LDFLAGS
) -o
$@ \
2284 $(GEN_PROTOS_OBJS
) $(BUILD_LIBS
)
2286 xsys-protos.h
: $(GCC_PASSES
) $(srcdir)/sys-protos.h deduced.h \
2287 build
/gen-protos
$(build_exeext
) Makefile
2288 sed
-e s
/TARGET_GETGROUPS_T
/$(TARGET_GETGROUPS_T
)/ \
2289 deduced.h
$(srcdir)/sys-protos.h
> tmp-fixtmp.c
2290 mv tmp-fixtmp.c fixtmp.c
2291 $(GCC_FOR_TARGET
) fixtmp.c
-w
-U__SIZE_TYPE__
-U__PTRDIFF_TYPE__
-U__WCHAR_TYPE__
-E \
2292 | sed
-e
's/ / /g' -e
's/ *(/ (/g' -e
's/ [ ]*/ /g' -e
's/( )/()/' \
2293 |
$(RUN_GEN
) build
/gen-protos
>xsys-protos.hT
2294 mv xsys-protos.hT xsys-protos.h
2297 # This is nominally a 'build' program, but it's run only when host==build,
2298 # so we can (indeed, must) use $(LIBDEPS) and $(LIBS).
2299 build
/fix-header
$(build_exeext
): build
/fix-header.o build
/scan-decls.o \
2300 build
/scan.o xsys-protos.h c-incpath.o cppdefault.o
prefix.o \
2301 $(BUILD_ERRORS
) $(LIBDEPS
)
2302 $(CC_FOR_BUILD
) $(BUILD_CFLAGS
) $(BUILD_LDFLAGS
) -o
$@ \
2303 build
/fix-header.o c-incpath.o cppdefault.o build
/scan-decls.o
prefix.o \
2304 build
/scan.o
$(BUILD_ERRORS
) $(LIBS
)
2306 # stmp-fixproto depends on this, not on fix-header directly.
2307 # The idea is to make sure fix-header gets built,
2308 # but not rerun fixproto after each stage
2309 # just because fix-header's mtime has changed.
2310 fixhdr.ready
: build
/fix-header
$(build_exeext
)
2311 -if
[ -f fixhdr.ready
] ; then \
2314 $(STAMP
) fixhdr.ready
; \
2317 # stmp-int-hdrs is to make sure fixincludes has already finished.
2318 # The if statement is so that we don't run fixproto a second time
2319 # if it has already been run on the files in `include-fixed'.
2320 stmp-fixproto
: fixhdr.ready fixproto fixinc_list stmp-int-hdrs
2321 set
-e
; for ml in
`cat fixinc_list`; do \
2322 sysroot_headers_suffix
=`echo $${ml} | sed -e 's/;.*$$//'`; \
2323 multi_dir
=`echo $${ml} | sed -e 's/^[^;]*;//'`; \
2324 fix_dir
=include-fixed
$${multi_dir}; \
2325 if
[ -f
$${fix_dir}/fixed
] ; then true
; \
2327 : This line works around a
'make' bug in BSDI
1.1.
; \
2328 FIXPROTO_DEFINES
="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES
; \
2329 FIX_HEADER
="build/fix-header$(build_exeext)"; export FIX_HEADER
; \
2330 mkinstalldirs
="$(mkinstalldirs)"; \
2331 export mkinstalldirs
; \
2332 if
[ -d
"$(SYSTEM_HEADER_DIR)" ]; then \
2333 $(SHELL
) ${srcdir}/fixproto
$${fix_dir} $${fix_dir} $(SYSTEM_HEADER_DIR
); \
2334 if
[ $$?
-eq
0 ] ; then true
; else exit
1 ; fi
; \
2336 $(STAMP
) $${fix_dir}/fixed
; \
2339 $(STAMP
) stmp-fixproto
2341 # We can't run fixproto (it's being built for a different host), but we still
2342 # need to install it so that the user can run it when the compiler is
2344 stmp-install-fixproto
: fixproto
2347 # Remake the info files.
2349 doc
: $(BUILD_INFO
) $(GENERATED_MANPAGES
) gccbug
2351 INFOFILES
= doc
/cpp.
info doc
/gcc.
info doc
/gccint.
info \
2352 doc
/gccinstall.
info doc
/cppinternals.
info
2354 info: $(INFOFILES
) lang.
info @GENINSRC@ srcinfo lang.srcinfo
2356 srcinfo
: $(INFOFILES
)
2357 -cp
-p
$^
$(srcdir)/doc
2359 TEXI_CPP_FILES
= cpp.texi fdl.texi cppenv.texi cppopts.texi \
2360 gcc-common.texi gcc-vers.texi
2362 TEXI_GCC_FILES
= gcc.texi gcc-common.texi gcc-vers.texi frontends.texi \
2363 standards.texi invoke.texi extend.texi md.texi objc.texi \
2364 gcov.texi trouble.texi bugreport.texi service.texi \
2365 contribute.texi compat.texi funding.texi gnu.texi gpl.texi \
2366 fdl.texi contrib.texi cppenv.texi cppopts.texi \
2367 implement-c.texi arm-neon-intrinsics.texi
2369 TEXI_GCCINT_FILES
= gccint.texi gcc-common.texi gcc-vers.texi \
2370 contribute.texi makefile.texi configterms.texi options.texi \
2371 portability.texi interface.texi passes.texi c-tree.texi \
2372 rtl.texi md.texi tm.texi hostconfig.texi fragments.texi \
2373 configfiles.texi collect2.texi headerdirs.texi funding.texi \
2374 gnu.texi gpl.texi fdl.texi contrib.texi languages.texi \
2375 sourcebuild.texi gty.texi libgcc.texi cfg.texi tree-ssa.texi \
2378 TEXI_GCCINSTALL_FILES
= install.texi install-old.texi fdl.texi \
2379 gcc-common.texi gcc-vers.texi
2381 TEXI_CPPINT_FILES
= cppinternals.texi gcc-common.texi gcc-vers.texi
2383 # gcc-vers.texi is generated from the version files.
2384 gcc-vers.texi
: $(BASEVER
) $(DEVPHASE
)
2385 (echo
"@set version-GCC $(BASEVER_c)"; \
2386 if
[ "$(DEVPHASE_c)" = "experimental" ]; \
2387 then echo
"@set DEVELOPMENT"; \
2388 else echo
"@clear DEVELOPMENT"; \
2390 $(build_file_translate
) echo @set
srcdir $(abs_srcdir
) >> $@T
2391 if
[ -n
"$(PKGVERSION)" ]; then \
2392 echo
"@set VERSION_PACKAGE $(PKGVERSION)" >> $@T
; \
2394 echo
"@set BUGURL $(BUGURL_TEXI)" >> $@T
; \
2398 # The *.1, *.7, *.info, *.dvi, and *.pdf files are being generated from implicit
2399 # patterns. To use them, put each of the specific targets with its
2400 # specific dependencies but no build commands.
2402 doc
/cpp.
info: $(TEXI_CPP_FILES
)
2403 doc
/gcc.
info: $(TEXI_GCC_FILES
)
2404 doc
/gccint.
info: $(TEXI_GCCINT_FILES
)
2405 doc
/cppinternals.
info: $(TEXI_CPPINT_FILES
)
2408 if
[ x
$(BUILD_INFO
) = xinfo
]; then \
2409 $(MAKEINFO
) $(MAKEINFOFLAGS
) -I .
-I
$(gcc_docdir
) \
2410 -I
$(gcc_docdir
)/include -o
$@
$<; \
2413 # Duplicate entry to handle renaming of gccinstall.info
2414 doc
/gccinstall.
info: $(TEXI_GCCINSTALL_FILES
)
2415 if
[ x
$(BUILD_INFO
) = xinfo
]; then \
2416 $(MAKEINFO
) $(MAKEINFOFLAGS
) -I
$(gcc_docdir
) \
2417 -I
$(gcc_docdir
)/include -o
$@
$<; \
2420 doc
/cpp.
dvi: $(TEXI_CPP_FILES
)
2421 doc
/gcc.
dvi: $(TEXI_GCC_FILES
)
2422 doc
/gccint.
dvi: $(TEXI_GCCINT_FILES
)
2423 doc
/cppinternals.
dvi: $(TEXI_CPPINT_FILES
)
2425 doc
/cpp.pdf
: $(TEXI_CPP_FILES
)
2426 doc
/gcc.pdf
: $(TEXI_GCC_FILES
)
2427 doc
/gccint.pdf
: $(TEXI_GCCINT_FILES
)
2428 doc
/cppinternals.pdf
: $(TEXI_CPPINT_FILES
)
2430 $(build_htmldir
)/cpp/index.html
: $(TEXI_CPP_FILES
)
2431 $(build_htmldir
)/gcc
/index.html
: $(TEXI_GCC_FILES
)
2432 $(build_htmldir
)/gccint
/index.html
: $(TEXI_GCCINT_FILES
)
2433 $(build_htmldir
)/cppinternals
/index.html
: $(TEXI_CPPINT_FILES
)
2435 dvi:: doc
/gcc.
dvi doc
/gccint.
dvi doc
/gccinstall.
dvi doc
/cpp.
dvi \
2436 doc
/cppinternals.
dvi lang.
dvi
2439 $(TEXI2DVI
) -I .
-I
$(abs_docdir
) -I
$(abs_docdir
)/include -o
$@
$<
2441 # Duplicate entry to handle renaming of gccinstall.dvi
2442 doc
/gccinstall.
dvi: $(TEXI_GCCINSTALL_FILES
)
2443 $(TEXI2DVI
) -I .
-I
$(abs_docdir
) -I
$(abs_docdir
)/include -o
$@
$<
2445 PDFFILES
= doc
/gcc.pdf doc
/gccint.pdf doc
/gccinstall.pdf doc
/cpp.pdf \
2446 doc
/cppinternals.pdf
2448 pdf
:: $(PDFFILES
) lang.pdf
2451 $(TEXI2PDF
) -I .
-I
$(abs_docdir
) -I
$(abs_docdir
)/include -o
$@
$<
2453 # Duplicate entry to handle renaming of gccinstall.pdf
2454 doc
/gccinstall.pdf
: $(TEXI_GCCINSTALL_FILES
)
2455 $(TEXI2PDF
) -I .
-I
$(abs_docdir
) -I
$(abs_docdir
)/include -o
$@
$<
2457 # List the directories or single hmtl files which are installed by
2458 # install-html. The lang.html file triggers language fragments to build
2459 # html documentation. Installing language fragment documentation is not
2461 HTMLS_INSTALL
=$(build_htmldir
)/cpp $(build_htmldir
)/gcc \
2462 $(build_htmldir
)/gccinstall
$(build_htmldir
)/gccint \
2463 $(build_htmldir
)/cppinternals
2465 # List the html file targets.
2466 HTMLS_BUILD
=$(build_htmldir
)/cpp/index.html
$(build_htmldir
)/gcc
/index.html \
2467 $(build_htmldir
)/gccinstall
/index.html
$(build_htmldir
)/gccint
/index.html \
2468 $(build_htmldir
)/cppinternals
/index.html lang.html
2470 html
:: $(HTMLS_BUILD
)
2472 $(build_htmldir
)/%/index.html
: %.texi
2473 $(mkinstalldirs
) $(@D
)
2475 $(TEXI2HTML
) -I
$(abs_docdir
) -I
$(abs_docdir
)/include -o
$(@D
) $<
2477 # Duplicate entry to handle renaming of gccinstall
2478 $(build_htmldir
)/gccinstall
/index.html
: $(TEXI_GCCINSTALL_FILES
)
2479 $(mkinstalldirs
) $(@D
)
2481 SOURCEDIR
=$(abs_docdir
) \
2483 $(SHELL
) $(srcdir)/doc
/install.texi2html
2485 MANFILES
= doc
/gcov
.1 doc
/cpp.1 doc
/gcc
.1 doc
/gfdl
.7 doc
/gpl
.7 doc
/fsf-funding
.7
2487 generated-manpages
: man
2489 man
: $(MANFILES
) lang.man @GENINSRC@ srcman lang.srcman
2492 -cp
-p
$^
$(srcdir)/doc
2496 -($(POD2MAN
) --section
=1 $< > $(@
).T
$$$$ && \
2497 mv
-f
$(@
).T
$$$$ $@
) || \
2498 (rm -f
$(@
).T
$$$$ && exit
1)
2502 -($(POD2MAN
) --section
=7 $< > $(@
).T
$$$$ && \
2503 mv
-f
$(@
).T
$$$$ $@
) || \
2504 (rm -f
$(@
).T
$$$$ && exit
1)
2508 -$(TEXI2POD
) -DBUGURL
="$(BUGURL_TEXI)" $< > $@
2510 .INTERMEDIATE
: cpp.pod gcc.pod gfdl.pod fsf-funding.pod
2511 cpp.pod
: cpp.texi cppenv.texi cppopts.texi
2513 # These next rules exist because the output name is not the same as
2514 # the input name, so our implicit %.pod rule will not work.
2516 gcc.pod
: invoke.texi cppenv.texi cppopts.texi
2518 -$(TEXI2POD
) $< > $@
2521 -$(TEXI2POD
) $< > $@
2522 fsf-funding.pod
: funding.texi
2524 -$(TEXI2POD
) $< > $@
2527 # Deletion of files made during compilation.
2528 # There are four levels of this:
2529 # `mostlyclean', `clean', `distclean' and `maintainer-clean'.
2530 # `mostlyclean' is useful while working on a particular type of machine.
2531 # It deletes most, but not all, of the files made by compilation.
2532 # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
2533 # `clean' deletes everything made by running `make all'.
2534 # `distclean' also deletes the files made by config.
2535 # `maintainer-clean' also deletes everything that could be regenerated
2536 # automatically, except for `configure'.
2537 # We remove as much from the language subdirectories as we can
2538 # (less duplicated code).
2540 mostlyclean: lang.
mostlyclean
2541 -rm -f
$(MOSTLYCLEANFILES
)
2543 -rm -f
*$(coverageexts
)
2544 # Delete build programs
2547 # Delete other built files.
2548 -rm -f xsys-protos.hT
2549 -rm -f specs.h gencheck.h options.c options.h
2550 # Delete the stamp and temporary files.
2551 -rm -f s-
* tmp-
* stamp-
* stmp-
*
2552 -rm -f
*/stamp-
* */tmp-
*
2553 # Delete debugging dump files.
2554 -rm -f
*.
[0-9][0-9].
* */*.
[0-9][0-9].
*
2555 # Delete some files made during installation.
2556 -rm -f specs
$(SPECS
) SYSCALLS.c.X SYSCALLS.c
2557 -rm -f collect collect2 mips-tfile mips-tdump
2558 # Delete files generated for fixproto
2559 -rm -rf
$(build_exeext
) xsys-protos.h deduced.h tmp-deduced.h \
2560 gen-protos
$(build_exeext
) fixproto.list fixtmp.
* fixhdr.ready
2561 # Delete unwanted output files from TeX.
2562 -rm -f
*.toc
*.log
*.vr
*.fn
*.cp
*.tp
*.ky
*.pg
2563 -rm -f
*/*.toc
*/*.log
*/*.vr
*/*.fn
*/*.cp
*/*.tp
*/*.ky
*/*.pg
2564 # Delete sorted indices we don't actually use.
2565 -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
2566 # Delete core dumps.
2568 # Delete file generated for gengtype
2569 -rm -f gtyp-input.list
2570 # Delete files generated by gengtype.c
2573 # Delete genchecksum outputs
2576 # Delete all files made by compilation
2577 # that don't exist in the distribution.
2578 clean: mostlyclean lang.
clean
2579 -rm -f libgcc.a libgcc_eh.a libgcov.a
2582 -rm -f config.h tconfig.h bconfig.h tm_p.h tm.h
2583 -rm -f options.c options.h optionlist
2587 # Delete the include directories.
2588 -rm -rf
include include-fixed
2589 # Delete files used by the "multilib" facility (including libgcc subdirs).
2590 -rm -f multilib.h tmpmultilib
*
2591 -if
[ "x$(MULTILIB_DIRNAMES)" != x
] ; then \
2592 rm -rf
$(MULTILIB_DIRNAMES
); \
2593 else if
[ "x$(MULTILIB_OPTIONS)" != x
] ; then \
2594 rm -rf
`echo $(MULTILIB_OPTIONS) | sed -e 's/\// /g'`; \
2597 # Delete all files that users would normally create
2598 # while building and installing GCC.
2599 distclean: clean lang.
distclean
2600 -rm -f auto-host.h auto-build.h
2602 -rm -f config.status config.run config.cache config.bak
2603 -rm -f Make-lang Make-hooks Make-host Make-target
2604 -rm -f Makefile
*.oaux
2605 -rm -f gthr-default.h
2608 -rm -f site.exp site.bak testsuite
/site.exp testsuite
/site.bak
2609 -rm -f testsuite
/*.log testsuite
/*.sum
2610 -cd testsuite
&& rm -f x
*.x
*.x?
*.exe
*.rpo
*.o
*.s
*.S
*.c
2611 -cd testsuite
&& rm -f
*.out
*.gcov
*$(coverageexts
)
2612 -rm -rf
${QMTEST_DIR} stamp-qmtest
2614 -rm -f gccbug .gdbinit configargs.h
2616 # Delete po/*.gmo only if we are not building in the source directory.
2617 -if
[ ! -f po
/exgettext
]; then
rm -f po
/*.gmo
; fi
2618 -rm -rf
$(DEPDIR
) */$(DEPDIR
)
2619 -rmdir ada cp f java objc intl po testsuite
2>/dev
/null
2621 # Get rid of every file that's generated from some other file, except for `configure'.
2622 # Most of these files ARE PRESENT in the GCC distribution.
2624 @echo
'This command is intended for maintainers to use; it'
2625 @echo
'deletes files that may need special tools to rebuild.'
2626 $(MAKE
) lang.maintainer-clean
distclean
2627 -rm -f
cpp.??s
cpp.
*aux
2628 -rm -f gcc.??s gcc.
*aux
2629 -rm -f
$(gcc_docdir
)/*.
info $(gcc_docdir
)/*.1 $(gcc_docdir
)/*.7 $(gcc_docdir
)/*.
dvi $(gcc_docdir
)/*.pdf
2631 # Entry points `install' and `uninstall'.
2632 # Also use `install-collect2' to install collect2 when the config files don't.
2634 # Copy the compiler files into directories where they will be run.
2635 # Install the driver last so that the window when things are
2637 install: install-common
$(INSTALL_HEADERS
) \
2638 install-cpp install-man install-info install-@POSUB@ \
2641 # Handle cpp installation.
2642 install-cpp
: installdirs cpp$(exeext
)
2643 -rm -f
$(DESTDIR
)$(bindir)/$(CPP_INSTALL_NAME
)$(exeext
)
2644 -$(INSTALL_PROGRAM
) -m
755 cpp$(exeext
) $(DESTDIR
)$(bindir)/$(CPP_INSTALL_NAME
)$(exeext
)
2645 -if
[ x
$(cpp_install_dir
) != x
]; then \
2646 rm -f
$(DESTDIR
)$(prefix)/$(cpp_install_dir
)/$(CPP_INSTALL_NAME
)$(exeext
); \
2647 $(INSTALL_PROGRAM
) -m
755 cpp$(exeext
) $(DESTDIR
)$(prefix)/$(cpp_install_dir
)/$(CPP_INSTALL_NAME
)$(exeext
); \
2650 # Create the installation directories.
2651 # $(libdir)/gcc/include isn't currently searched by cpp.
2653 $(mkinstalldirs
) $(DESTDIR
)$(libsubdir
)
2654 $(mkinstalldirs
) $(DESTDIR
)$(libexecsubdir
)
2655 $(mkinstalldirs
) $(DESTDIR
)$(bindir)
2656 $(mkinstalldirs
) $(DESTDIR
)$(includedir)
2657 $(mkinstalldirs
) $(DESTDIR
)$(infodir)
2658 $(mkinstalldirs
) $(DESTDIR
)$(slibdir
)
2659 $(mkinstalldirs
) $(DESTDIR
)$(man1dir)
2660 $(mkinstalldirs
) $(DESTDIR
)$(man7dir)
2662 # Install the compiler executables built during cross compilation.
2663 install-common
: native lang.install-common
installdirs
2664 for file in
$(COMPILERS
); do \
2665 if
[ -f
$$file ] ; then \
2666 rm -f
$(DESTDIR
)$(libexecsubdir
)/$$file; \
2667 $(INSTALL_PROGRAM
) $$file $(DESTDIR
)$(libexecsubdir
)/$$file; \
2671 for file in
$(EXTRA_PASSES
) $(EXTRA_PROGRAMS
) $(COLLECT2
) ..
; do \
2672 if
[ x
"$$file" != x..
]; then \
2673 rm -f
$(DESTDIR
)$(libexecsubdir
)/$$file; \
2674 $(INSTALL_PROGRAM
) $$file $(DESTDIR
)$(libexecsubdir
)/$$file; \
2677 # We no longer install the specs file because its presence makes the
2678 # driver slower, and because people who need it can recreate it by
2679 # using -dumpspecs. We remove any old version because it would
2680 # otherwise override the specs built into the driver.
2681 rm -f
$(DESTDIR
)$(libsubdir
)/specs
2682 # Install protoize if it was compiled.
2683 -if
[ -f protoize
$(exeext
) ]; then \
2684 rm -f
$(DESTDIR
)$(bindir)/$(PROTOIZE_INSTALL_NAME
)$(exeext
); \
2685 $(INSTALL_PROGRAM
) protoize
$(exeext
) $(DESTDIR
)$(bindir)/$(PROTOIZE_INSTALL_NAME
)$(exeext
); \
2686 rm -f
$(DESTDIR
)$(bindir)/$(UNPROTOIZE_INSTALL_NAME
)$(exeext
); \
2687 $(INSTALL_PROGRAM
) unprotoize
$(exeext
) $(DESTDIR
)$(bindir)/$(UNPROTOIZE_INSTALL_NAME
)$(exeext
); \
2688 rm -f
$(DESTDIR
)$(libsubdir
)/SYSCALLS.c.X
; \
2689 $(INSTALL_DATA
) SYSCALLS.c.X
$(DESTDIR
)$(libsubdir
)/SYSCALLS.c.X
; \
2690 chmod a-x
$(DESTDIR
)$(libsubdir
)/SYSCALLS.c.X
; \
2692 # Install gcov if it was compiled.
2693 -if
[ -f gcov
$(exeext
) ]; \
2695 rm -f
$(DESTDIR
)$(bindir)/$(GCOV_INSTALL_NAME
)$(exeext
); \
2696 $(INSTALL_PROGRAM
) gcov
$(exeext
) $(DESTDIR
)$(bindir)/$(GCOV_INSTALL_NAME
)$(exeext
); \
2698 $(INSTALL_SCRIPT
) gccbug
$(DESTDIR
)$(bindir)/$(GCCBUG_INSTALL_NAME
)
2700 # Install the driver program as $(target_noncanonical)-gcc,
2701 # $(target_noncanonical)-gcc-$(version)
2702 # and also as either gcc (if native) or $(gcc_tooldir)/bin/gcc.
2703 install-driver
: installdirs xgcc
$(exeext
)
2704 -rm -f
$(DESTDIR
)$(bindir)/$(GCC_INSTALL_NAME
)$(exeext
)
2705 -$(INSTALL_PROGRAM
) xgcc
$(exeext
) $(DESTDIR
)$(bindir)/$(GCC_INSTALL_NAME
)$(exeext
)
2706 -rm -f
$(DESTDIR
)$(bindir)/$(target_noncanonical
)-gcc-
$(version
)$(exeext
)
2707 -( cd
$(DESTDIR
)$(bindir) && \
2708 $(LN
) $(GCC_INSTALL_NAME
)$(exeext
) $(target_noncanonical
)-gcc-
$(version
)$(exeext
) )
2709 -if
[ -f gcc-cross
$(exeext
) ] ; then \
2710 if
[ -d
$(DESTDIR
)$(gcc_tooldir
)/bin
/.
] ; then \
2711 rm -f
$(DESTDIR
)$(gcc_tooldir
)/bin
/gcc
$(exeext
); \
2712 $(INSTALL_PROGRAM
) gcc-cross
$(exeext
) $(DESTDIR
)$(gcc_tooldir
)/bin
/gcc
$(exeext
); \
2715 rm -f
$(DESTDIR
)$(bindir)/$(target_noncanonical
)-gcc-tmp
$(exeext
); \
2716 ( cd
$(DESTDIR
)$(bindir) && \
2717 $(LN
) $(GCC_INSTALL_NAME
)$(exeext
) $(target_noncanonical
)-gcc-tmp
$(exeext
) && \
2718 mv
-f
$(target_noncanonical
)-gcc-tmp
$(exeext
) $(GCC_TARGET_INSTALL_NAME
)$(exeext
) ); \
2721 # Install the info files.
2722 # $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir
2723 # to do the install.
2724 install-info
:: doc
installdirs \
2725 $(DESTDIR
)$(infodir)/cpp.
info \
2726 $(DESTDIR
)$(infodir)/gcc.
info \
2727 $(DESTDIR
)$(infodir)/cppinternals.
info \
2728 $(DESTDIR
)$(infodir)/gccinstall.
info \
2729 $(DESTDIR
)$(infodir)/gccint.
info \
2732 $(DESTDIR
)$(infodir)/%.
info: doc
/%.
info installdirs
2734 if
[ -f
$< ]; then \
2735 for f in
$(<)*; do \
2736 realfile
=`echo $$f | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
2737 $(INSTALL_DATA
) $$f $(DESTDIR
)$(infodir)/$$realfile; \
2738 chmod a-x
$(DESTDIR
)$(infodir)/$$realfile; \
2741 -if
$(SHELL
) -c
'install-info --version' >/dev
/null
2>&1; then \
2742 if
[ -f
$@
]; then \
2743 install-info
--dir-file
=$(DESTDIR
)$(infodir)/dir $@
; \
2747 pdf__strip_dir
= `echo $$p | sed -e 's|^.*/||'`;
2749 install-pdf
: $(PDFFILES
) lang.install-pdf
2751 test -z
"$(pdfdir)/gcc" ||
$(mkinstalldirs
) "$(DESTDIR)$(pdfdir)/gcc"
2752 @list
='$(PDFFILES)'; for p in
$$list; do \
2753 if
test -f
"$$p"; then d
=; else d
="$(srcdir)/"; fi
; \
2754 f
=$(pdf__strip_dir
) \
2755 echo
" $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/gcc/$$f'"; \
2756 $(INSTALL_DATA
) "$$d$$p" "$(DESTDIR)$(pdfdir)/gcc/$$f"; \
2759 html__strip_dir
= `echo $$p | sed -e 's|^.*/||'`;
2761 install-html
: $(HTMLS_BUILD
)
2763 test -z
"$(htmldir)" ||
$(mkinstalldirs
) "$(DESTDIR)$(htmldir)"
2764 @list
='$(HTMLS_INSTALL)'; for p in
$$list; do \
2765 if
test -f
"$$p" ||
test -d
"$$p"; then d
=""; else d
="$(srcdir)/"; fi
; \
2766 f
=$(html__strip_dir
) \
2767 if
test -d
"$$d$$p"; then \
2768 echo
" $(mkinstalldirs) '$(DESTDIR)$(htmldir)/$$f'"; \
2769 $(mkinstalldirs
) "$(DESTDIR)$(htmldir)/$$f" || exit
1; \
2770 echo
" $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
2771 $(INSTALL_DATA
) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
2773 echo
" $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
2774 $(INSTALL_DATA
) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
2778 # Install the man pages.
2779 install-man
: lang.install-man \
2780 $(DESTDIR
)$(man1dir)/$(GCC_INSTALL_NAME
)$(man1ext) \
2781 $(DESTDIR
)$(man1dir)/$(CPP_INSTALL_NAME
)$(man1ext) \
2782 $(DESTDIR
)$(man1dir)/$(GCOV_INSTALL_NAME
)$(man1ext) \
2783 $(DESTDIR
)$(man7dir)/fsf-funding
$(man7ext) \
2784 $(DESTDIR
)$(man7dir)/gfdl
$(man7ext) \
2785 $(DESTDIR
)$(man7dir)/gpl
$(man7ext)
2787 $(DESTDIR
)$(man7dir)/%$(man7ext): doc
/%.7 installdirs
2789 -$(INSTALL_DATA
) $< $@
2792 $(DESTDIR
)$(man1dir)/$(GCC_INSTALL_NAME
)$(man1ext): doc
/gcc
.1 installdirs
2794 -$(INSTALL_DATA
) $< $@
2797 $(DESTDIR
)$(man1dir)/$(CPP_INSTALL_NAME
)$(man1ext): doc
/cpp.1 installdirs
2799 -$(INSTALL_DATA
) $< $@
2802 $(DESTDIR
)$(man1dir)/$(GCOV_INSTALL_NAME
)$(man1ext): doc
/gcov
.1 installdirs
2804 -$(INSTALL_DATA
) $< $@
2807 # Install all the header files built in the include subdirectory.
2808 install-headers
: $(INSTALL_HEADERS_DIR
)
2809 # Fix symlinks to absolute paths in the installed include directory to
2810 # point to the installed directory, not the build directory.
2811 # Don't need to use LN_S here since we really do need ln -s and no substitutes.
2812 -files
=`cd $(DESTDIR)$(libsubdir)/include-fixed; find . -type l -print 2>/dev/null`; \
2813 if
[ $$?
-eq
0 ]; then \
2814 dir=`cd include-fixed; ${PWD_COMMAND}`; \
2815 for i in
$$files; do \
2816 dest
=`ls -ld $(DESTDIR)$(libsubdir)/include-fixed/$$i | sed -n 's/.*-> //p'`; \
2817 if expr
"$$dest" : "$$dir.*" > /dev
/null
; then \
2818 rm -f
$(DESTDIR
)$(libsubdir
)/include-fixed
/$$i; \
2819 ln
-s
`echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(DESTDIR
)$(libsubdir
)/include-fixed
/$$i; \
2824 # Create or recreate the gcc private include file directory.
2825 install-include-dir
: installdirs
2826 $(mkinstalldirs
) $(DESTDIR
)$(libsubdir
)/include
2827 -rm -rf
$(DESTDIR
)$(libsubdir
)/include-fixed
2828 mkdir
$(DESTDIR
)$(libsubdir
)/include-fixed
2829 -chmod a
+rx
$(DESTDIR
)$(libsubdir
)/include-fixed
2831 # Create or recreate the install-tools include file directory.
2832 itoolsdir
= $(libexecsubdir
)/install-tools
2833 itoolsdatadir
= $(libsubdir
)/install-tools
2834 install-itoolsdirs
: installdirs
2835 $(mkinstalldirs
) $(DESTDIR
)$(itoolsdatadir
)/include
2836 $(mkinstalldirs
) $(DESTDIR
)$(itoolsdir
)
2838 # Install the include directory using tar.
2839 install-headers-tar
: stmp-int-hdrs
$(STMP_FIXPROTO
) install-include-dir
2840 # We use `pwd`/include instead of just include to problems with CDPATH
2841 # Unless a full pathname is provided, some shells would print the new CWD,
2842 # found in CDPATH, corrupting the output. We could just redirect the
2843 # output of `cd', but some shells lose on redirection within `()'s
2844 (cd
`${PWD_COMMAND}`/include ; \
2845 tar -cf
- .
; exit
0) |
(cd
$(DESTDIR
)$(libsubdir
)/include; tar xpf
- )
2846 (cd
`${PWD_COMMAND}`/include-fixed
; \
2847 tar -cf
- .
; exit
0) |
(cd
$(DESTDIR
)$(libsubdir
)/include-fixed
; tar xpf
- )
2848 # /bin/sh on some systems returns the status of the first tar,
2849 # and that can lose with GNU tar which always writes a full block.
2850 # So use `exit 0' to ignore its exit status.
2852 # Install the include directory using cpio.
2853 install-headers-cpio
: stmp-int-hdrs
$(STMP_FIXPROTO
) install-include-dir
2854 # See discussion about the use of `pwd` above
2855 cd
`${PWD_COMMAND}`/include ; \
2856 find .
-print | cpio
-pdum
$(DESTDIR
)$(libsubdir
)/include
2857 cd
`${PWD_COMMAND}`/include-fixed
; \
2858 find .
-print | cpio
-pdum
$(DESTDIR
)$(libsubdir
)/include-fixed
2860 # Install the include directory using cp.
2861 install-headers-cp
: stmp-int-hdrs
$(STMP_FIXPROTO
) install-include-dir
2862 cp
-p
-r
include $(DESTDIR
)$(libsubdir
)
2863 cp
-p
-r include-fixed
$(DESTDIR
)$(libsubdir
)
2865 # Targets without dependencies, for use in prev-gcc during bootstrap.
2866 real-install-headers-tar
:
2867 (cd
`${PWD_COMMAND}`/include-fixed
; \
2868 tar -cf
- .
; exit
0) |
(cd
$(DESTDIR
)$(libsubdir
)/include-fixed
; tar xpf
- )
2870 real-install-headers-cpio
:
2871 cd
`${PWD_COMMAND}`/include-fixed
; \
2872 find .
-print | cpio
-pdum
$(DESTDIR
)$(libsubdir
)/include-fixed
2874 real-install-headers-cp
:
2875 cp
-p
-r include-fixed
$(DESTDIR
)$(libsubdir
)
2877 # Install supporting files for fixincludes to be run later.
2878 install-mkheaders
: stmp-int-hdrs
$(STMP_FIXPROTO
) install-itoolsdirs \
2879 macro_list fixinc_list
2880 $(INSTALL_DATA
) $(srcdir)/gsyslimits.h \
2881 $(DESTDIR
)$(itoolsdatadir
)/gsyslimits.h
2882 $(INSTALL_DATA
) macro_list
$(DESTDIR
)$(itoolsdatadir
)/macro_list
2883 $(INSTALL_DATA
) fixinc_list
$(DESTDIR
)$(itoolsdatadir
)/fixinc_list
2884 set
-e
; for ml in
`cat fixinc_list`; do \
2885 multi_dir
=`echo $${ml} | sed -e 's/^[^;]*;//'`; \
2886 $(mkinstalldirs
) $(DESTDIR
)$(itoolsdatadir
)/include$${multi_dir}; \
2887 $(INSTALL_DATA
) include-fixed
$${multidir}/limits.h
$(DESTDIR
)$(itoolsdatadir
)/include$${multi_dir}/limits.h
; \
2889 $(INSTALL_SCRIPT
) $(srcdir)/..
/mkinstalldirs \
2890 $(DESTDIR
)$(itoolsdir
)/mkinstalldirs
; \
2891 if
[ x
$(STMP_FIXPROTO
) != x
] ; then \
2892 $(INSTALL_SCRIPT
) $(srcdir)/fixproto
$(DESTDIR
)$(itoolsdir
)/fixproto
; \
2893 $(INSTALL_PROGRAM
) build
/fix-header
$(build_exeext
) \
2894 $(DESTDIR
)$(itoolsdir
)/fix-header
$(build_exeext
) ; \
2896 sysroot_headers_suffix
='$${sysroot_headers_suffix}'; \
2897 echo
'SYSTEM_HEADER_DIR="'"$(SYSTEM_HEADER_DIR)"'"' \
2898 > $(DESTDIR
)$(itoolsdatadir
)/mkheaders.conf
2899 echo
'OTHER_FIXINCLUDES_DIRS="$(OTHER_FIXINCLUDES_DIRS)"' \
2900 >> $(DESTDIR
)$(itoolsdatadir
)/mkheaders.conf
2901 echo
'FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"' \
2902 >> $(DESTDIR
)$(itoolsdatadir
)/mkheaders.conf
2903 echo
'STMP_FIXPROTO="$(STMP_FIXPROTO)"' \
2904 >> $(DESTDIR
)$(itoolsdatadir
)/mkheaders.conf
2905 echo
'STMP_FIXINC="$(STMP_FIXINC)"' \
2906 >> $(DESTDIR
)$(itoolsdatadir
)/mkheaders.conf
2908 # Use this target to install the program `collect2' under the name `collect2'.
2909 install-collect2
: collect2
installdirs
2910 $(INSTALL_PROGRAM
) collect2
$(exeext
) $(DESTDIR
)$(libexecsubdir
)/collect2
$(exeext
)
2911 # Install the driver program as $(libsubdir)/gcc for collect2.
2912 $(INSTALL_PROGRAM
) xgcc
$(exeext
) $(DESTDIR
)$(libexecsubdir
)/gcc
$(exeext
)
2914 # Cancel installation by deleting the installed files.
2915 uninstall: lang.
uninstall
2916 -rm -rf
$(DESTDIR
)$(libsubdir
)
2917 -rm -rf
$(DESTDIR
)$(libexecsubdir
)
2918 -rm -rf
$(DESTDIR
)$(bindir)/$(GCC_INSTALL_NAME
)$(exeext
)
2919 -rm -f
$(DESTDIR
)$(bindir)/$(CPP_INSTALL_NAME
)$(exeext
)
2920 -if
[ x
$(cpp_install_dir
) != x
]; then \
2921 rm -f
$(DESTDIR
)$(prefix)/$(cpp_install_dir
)/$(CPP_INSTALL_NAME
)$(exeext
); \
2923 -rm -rf
$(DESTDIR
)$(bindir)/$(PROTOIZE_INSTALL_NAME
)$(exeext
)
2924 -rm -rf
$(DESTDIR
)$(bindir)/$(UNPROTOIZE_INSTALL_NAME
)$(exeext
)
2925 -rm -rf
$(DESTDIR
)$(bindir)/$(GCOV_INSTALL_NAME
)$(exeext
)
2926 -rm -rf
$(DESTDIR
)$(man1dir)/$(GCC_INSTALL_NAME
)$(man1ext)
2927 -rm -rf
$(DESTDIR
)$(man1dir)/cpp$(man1ext)
2928 -rm -rf
$(DESTDIR
)$(man1dir)/protoize
$(man1ext)
2929 -rm -rf
$(DESTDIR
)$(man1dir)/unprotoize
$(man1ext)
2930 -rm -f
$(DESTDIR
)$(infodir)/cpp.
info* $(DESTDIR
)$(infodir)/gcc.
info*
2931 -rm -f
$(DESTDIR
)$(infodir)/cppinternals.
info* $(DESTDIR
)$(infodir)/gccint.
info*
2933 # These targets are for the dejagnu testsuites. The file site.exp
2934 # contains global variables that all the testsuites will use.
2936 target_subdir
= @target_subdir@
2938 site.exp
: .
/config.status Makefile
2939 @echo
"Making a new config file..."
2942 -@mv site.exp site.bak
2943 @echo
"## these variables are automatically generated by make ##" > .
/tmp0
2944 @echo
"# Do not edit here. If you wish to override these values" >> .
/tmp0
2945 @echo
"# add them to the last section" >> .
/tmp0
2946 @echo
"set rootme \"`${PWD_COMMAND}`\"" >> .
/tmp0
2947 @echo
"set srcdir \"`cd ${srcdir}; ${PWD_COMMAND}`\"" >> .
/tmp0
2948 @echo
"set host_triplet $(host)" >> .
/tmp0
2949 @echo
"set build_triplet $(build)" >> .
/tmp0
2950 @echo
"set target_triplet $(target)" >> .
/tmp0
2951 @echo
"set target_alias $(target_noncanonical)" >> .
/tmp0
2952 @echo
"set libiconv \"$(LIBICONV)\"" >> .
/tmp0
2953 # CFLAGS is set even though it's empty to show we reserve the right to set it.
2954 @echo
"set CFLAGS \"\"" >> .
/tmp0
2955 @echo
"set CXXFLAGS \"\"" >> .
/tmp0
2956 @echo
"set HOSTCC \"$(CC)\"" >> .
/tmp0
2957 @echo
"set HOSTCFLAGS \"$(CFLAGS)\"" >> .
/tmp0
2958 @echo
"set TESTING_IN_BUILD_TREE 1" >> .
/tmp0
2959 @echo
"set HAVE_LIBSTDCXX_V3 1" >> .
/tmp0
2960 @echo
"set GCC_EXEC_PREFIX \"$(libdir)/gcc/\"" >> .
/tmp0
2961 # If newlib has been configured, we need to pass -B to gcc so it can find
2962 # newlib's crt0.o if it exists. This will cause a "path prefix not used"
2963 # message if it doesn't, but the testsuite is supposed to ignore the message -
2964 # it's too difficult to tell when to and when not to pass -B (not all targets
2965 # have crt0's). We could only add the -B if ../newlib/crt0.o exists, but that
2966 # seems like too selective a test.
2967 # ??? Another way to solve this might be to rely on linker scripts. Then
2968 # theoretically the -B won't be needed.
2969 # We also need to pass -L ../ld so that the linker can find ldscripts.
2970 @if
[ -d
$(objdir
)/..
/$(target_subdir
)/newlib
] \
2971 && [ "${host}" != "${target}" ]; then \
2972 echo
"set newlib_cflags \"-I$(objdir)/../$(target_subdir)/newlib/targ-include -I\$$srcdir/../newlib/libc/include\"" >> .
/tmp0
; \
2973 echo
"set newlib_ldflags \"-B$(objdir)/../$(target_subdir)/newlib/\"" >> .
/tmp0
; \
2974 echo
"append CFLAGS \" \$$newlib_cflags\"" >> .
/tmp0
; \
2975 echo
"append CXXFLAGS \" \$$newlib_cflags\"" >> .
/tmp0
; \
2976 echo
"append LDFLAGS \" \$$newlib_ldflags\"" >> .
/tmp0
; \
2979 @if
[ -d
$(objdir
)/..
/ld ] ; then \
2980 echo
"append LDFLAGS \" -L$(objdir)/../ld\"" >> .
/tmp0
; \
2983 echo
"set tmpdir $(objdir)/testsuite" >> .
/tmp0
2984 @echo
"set srcdir \"\$${srcdir}/testsuite\"" >> .
/tmp0
2985 @if
[ "X$(ALT_CC_UNDER_TEST)" != "X" ] ; then \
2986 echo
"set ALT_CC_UNDER_TEST \"$(ALT_CC_UNDER_TEST)\"" >> .
/tmp0
; \
2989 @if
[ "X$(ALT_CXX_UNDER_TEST)" != "X" ] ; then \
2990 echo
"set ALT_CXX_UNDER_TEST \"$(ALT_CXX_UNDER_TEST)\"" >> .
/tmp0
; \
2993 @if
[ "X$(COMPAT_OPTIONS)" != "X" ] ; then \
2994 echo
"set COMPAT_OPTIONS \"$(COMPAT_OPTIONS)\"" >> .
/tmp0
; \
2997 @echo
"## All variables above are generated by configure. Do Not Edit ##" >> .
/tmp0
2998 @cat .
/tmp0
> site.exp
2999 @cat site.bak | sed \
3000 -e
'1,/^## All variables above are.*##/ d' >> site.exp
3003 CHECK_TARGETS
= check-gcc @check_languages@
3005 check: $(CHECK_TARGETS
)
3007 # The idea is to parallelize testing of multilibs, for example:
3008 # make -j3 check-gcc//sh-hms-sim/{-m1,-m2,-m3,-m3e,-m4}/{,-nofpu}
3009 # will run 3 concurrent sessions of check-gcc, eventually testing
3010 # all 10 combinations. GNU make is required, as is a shell that expands
3011 # alternations within braces.
3012 lang_checks_parallel
= $(lang_checks
:=//%)
3013 $(lang_checks_parallel
): site.exp
3014 target
=`echo "$@" | sed 's,//.*,,'`; \
3015 variant
=`echo "$@" | sed 's,^[^/]*//,,'`; \
3016 vardots
=`echo "$$variant" | sed 's,/,.,g'`; \
3017 $(MAKE
) TESTSUITEDIR
="testsuite.$$vardots" \
3018 RUNTESTFLAGS
="--target_board=$$variant $(RUNTESTFLAGS)" \
3021 TESTSUITEDIR
= testsuite
3023 $(TESTSUITEDIR
)/site.exp
: site.exp
3024 -test -d
$(TESTSUITEDIR
) || mkdir
$(TESTSUITEDIR
)
3026 sed
'/set tmpdir/ s|testsuite|$(TESTSUITEDIR)|' < site.exp
> $@
3028 $(lang_checks
): check-
% : site.exp
3029 -test -d
$(TESTSUITEDIR
) || mkdir
$(TESTSUITEDIR
)
3030 test -d
$(TESTSUITEDIR
)/$* || mkdir
$(TESTSUITEDIR
)/$*
3031 -(rootme
=`${PWD_COMMAND}`; export rootme
; \
3032 srcdir=`cd ${srcdir}; ${PWD_COMMAND}` ; export srcdir ; \
3033 cd
$(TESTSUITEDIR
)/$*; \
3034 rm -f tmp-site.exp
; \
3035 sed
'/set tmpdir/ s|testsuite|$(TESTSUITEDIR)/$*|' \
3036 < ..
/..
/site.exp
> tmp-site.exp
; \
3037 $(SHELL
) $${srcdir}/..
/move-if-change tmp-site.exp site.exp
; \
3038 EXPECT
=${EXPECT} ; export EXPECT
; \
3039 if
[ -f
$${rootme}/..
/expect
/expect
] ; then \
3040 TCL_LIBRARY
=`cd .. ; cd $${srcdir}/../tcl/library ; ${PWD_COMMAND}` ; \
3041 export TCL_LIBRARY
; fi
; \
3042 GCC_EXEC_PREFIX
="$(libdir)/gcc/" ; export GCC_EXEC_PREFIX
; \
3043 $(RUNTEST
) --tool
$* $(RUNTESTFLAGS
))
3045 check-consistency
: testsuite
/site.exp
3046 -rootme
=`${PWD_COMMAND}`; export rootme
; \
3047 srcdir=`cd ${srcdir}; ${PWD_COMMAND}` ; export srcdir ; \
3049 EXPECT
=${EXPECT} ; export EXPECT
; \
3050 if
[ -f
$${rootme}/..
/expect
/expect
] ; then \
3051 TCL_LIBRARY
=`cd .. ; cd $${srcdir}/../tcl/library ; ${PWD_COMMAND}` ; \
3052 export TCL_LIBRARY
; fi
; \
3053 GCC_EXEC_PREFIX
="$(libdir)/gcc/" ; export GCC_EXEC_PREFIX
; \
3054 $(RUNTEST
) --tool consistency
$(RUNTESTFLAGS
)
3058 # The path to qmtest.
3061 # The flags to pass to qmtest.
3064 # The flags to pass to "qmtest run".
3065 QMTESTRUNFLAGS
=-f none
--result-stream dejagnu_stream.DejaGNUStream
3067 # The command to use to invoke qmtest.
3068 QMTEST
=${QMTEST_PATH} ${QMTESTFLAGS}
3070 # The tests (or suites) to run.
3071 QMTEST_GPP_TESTS
=g
++
3073 # The subdirectory of the OBJDIR that will be used to store the QMTest
3074 # test database configuration and that will be used for temporary
3075 # scratch space during QMTest's execution.
3076 QMTEST_DIR
=qmtestsuite
3078 # Create the QMTest database configuration.
3079 ${QMTEST_DIR} stamp-qmtest
:
3080 ${QMTEST} -D
${QMTEST_DIR} create-tdb \
3081 -c gcc_database.GCCDatabase \
3082 -a
srcdir=`cd ${srcdir}/testsuite && ${PWD_COMMAND}` && \
3083 $(STAMP
) stamp-qmtest
3085 # Create the QMTest context file.
3086 ${QMTEST_DIR}/context
: stamp-qmtest
3088 echo
"CompilerTable.languages=c cplusplus" >> $@
3089 echo
"CompilerTable.c_kind=GCC" >> $@
3090 echo
"CompilerTable.c_path=${objdir}/xgcc" >> $@
3091 echo
"CompilerTable.c_options=-B${objdir}/" >> $@
3092 echo
"CompilerTable.cplusplus_kind=GCC" >> $@
3093 echo
"CompilerTable.cplusplus_path=${objdir}/g++" >> $@
3094 echo
"CompilerTable.cplusplus_options=-B${objdir}/" >> $@
3095 echo
"DejaGNUTest.target=${target_noncanonical}" >> $@
3097 # Run the G++ testsuite using QMTest.
3098 qmtest-g
++: ${QMTEST_DIR}/context
3099 cd
${QMTEST_DIR} && ${QMTEST} run
${QMTESTRUNFLAGS} -C context \
3100 -o g
++.qmr
${QMTEST_GPP_TESTS}
3102 # Use the QMTest GUI.
3103 qmtest-gui
: ${QMTEST_DIR}/context
3104 cd
${QMTEST_DIR} && ${QMTEST} gui
-C context
3108 # Run Paranoia on real.c.
3110 paranoia.o
: $(srcdir)/..
/contrib
/paranoia.
cc $(CONFIG_H
) $(SYSTEM_H
) \
3112 g
++ -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $< $(OUTPUT_OPTION
)
3114 paranoia
: paranoia.o real.o
$(LIBIBERTY
)
3115 g
++ -o
$@ paranoia.o real.o
$(LIBIBERTY
)
3117 # These exist for maintenance purposes.
3119 # Update the tags table.
3123 list
='$(SUBDIRS)'; for
dir in
$$list; do \
3124 if
test -f
$$dir/TAGS
; then \
3125 incs
="$$incs --include $$dir/TAGS.sub"; \
3128 etags
-o TAGS.sub
*.y
*.h
*.c
; \
3129 etags
--include TAGS.sub
$$incs)
3131 # -----------------------------------------------------
3132 # Rules for generating translated message descriptions.
3133 # Disabled by autoconf if the tools are not available.
3134 # -----------------------------------------------------
3136 XGETTEXT
= @XGETTEXT@
3139 CATALOGS
= $(patsubst %,po
/%,@CATALOGS@
)
3141 .PHONY
: build- install- build-po install-po update-po
3143 # Dummy rules to deal with dependencies produced by use of
3144 # "build-@POSUB@" and "install-@POSUB@" above, when NLS is disabled.
3148 build-po
: $(CATALOGS
)
3150 # This notation should be acceptable to all Make implementations used
3151 # by people who are interested in updating .po files.
3152 update-po
: $(CATALOGS
:.gmo
=.pox
)
3154 # N.B. We do not attempt to copy these into $(srcdir). The snapshot
3157 -test -d po || mkdir po
3158 $(GMSGFMT
) --statistics
-o
$@
$<
3160 # The new .po has to be gone over by hand, so we deposit it into
3161 # build/po with a different extension.
3162 # If build/po/gcc.pot exists, use it (it was just created),
3163 # else use the one in srcdir.
3165 -test -d po || mkdir po
3166 $(MSGMERGE
) $< `if test -f po/gcc.pot; \
3167 then echo po/gcc.pot; \
3168 else echo $(srcdir)/po/gcc.pot; fi` -o
$@
3170 # This rule has to look for .gmo modules in both srcdir and
3171 # the cwd, and has to check that we actually have a catalog
3172 # for each language, in case they weren't built or included
3173 # with the distribution.
3175 $(mkinstalldirs
) $(DESTDIR
)$(datadir)
3176 cats
="$(CATALOGS)"; for cat in
$$cats; do \
3177 lang
=`basename $$cat | sed 's/\.gmo$$//'`; \
3178 if
[ -f
$$cat ]; then
:; \
3179 elif
[ -f
$(srcdir)/$$cat ]; then cat
=$(srcdir)/$$cat; \
3182 dir=$(localedir
)/$$lang/LC_MESSAGES
; \
3183 echo
$(mkinstalldirs
) $(DESTDIR
)$$dir; \
3184 $(mkinstalldirs
) $(DESTDIR
)$$dir || exit
1; \
3185 echo
$(INSTALL_DATA
) $$cat $(DESTDIR
)$$dir/gcc.mo
; \
3186 $(INSTALL_DATA
) $$cat $(DESTDIR
)$$dir/gcc.mo
; \
3189 # Rule for regenerating the message template (gcc.pot).
3190 # Instead of forcing everyone to edit POTFILES.in, which proved impractical,
3191 # this rule has no dependencies and always regenerates gcc.pot. This is
3192 # relatively harmless since the .po files do not directly depend on it.
3193 # Note that exgettext has an awk script embedded in it which requires a
3194 # fairly modern (POSIX-compliant) awk.
3195 # The .pot file is left in the build directory.
3198 -test -d po || mkdir po
3200 AWK
=$(AWK
) $(SHELL
) $(srcdir)/po
/exgettext \
3201 $(XGETTEXT
) gcc
$(srcdir)
3205 # Dependency information.
3207 # Add flags needed by some particular compilations.
3209 ALL_CPPFLAGS
:= $(ALL_CPPFLAGS
) \
3210 -DTARGET_MACHINE
=\"$(target_noncanonical
)\"
3212 ALL_CPPFLAGS
:= $(ALL_CPPFLAGS
) @TARGET_SYSTEM_ROOT_DEFINE@
3214 ALL_CPPFLAGS
:= $(ALL_CPPFLAGS
) $(DRIVER_DEFINES
)
3216 ALL_CPPFLAGS
:= $(ALL_CPPFLAGS
) $(DRIVER_DEFINES
)
3218 ALL_CPPFLAGS
:= $(ALL_CPPFLAGS
) -DGCC_DRIVER
3220 ALL_CPPFLAGS
:= $(ALL_CPPFLAGS
) $(PREPROCESSOR_DEFINES
)
3222 ALL_CPPFLAGS
:= $(ALL_CPPFLAGS
) $(DRIVER_DEFINES
)
3224 ALL_CPPFLAGS
:= $(ALL_CPPFLAGS
) $(DRIVER_DEFINES
) -DUNPROTOIZE
3225 # Remake internationalization support.
3227 ALL_CPPFLAGS
:= $(ALL_CPPFLAGS
) -DLOCALEDIR
=\"$(localedir
)\"
3229 # We need an explicit dependency here, because these are not directly
3230 # included but their contents are included via command line options.
3232 version.o
: version.c version.h
$(REVISION
) $(DATESTAMP
) $(BASEVER
) $(DEVPHASE
)
3234 version.o
: version.c version.h
$(DATESTAMP
) $(BASEVER
) $(DEVPHASE
)
3238 ALL_CPPFLAGS
:= $(ALL_CPPFLAGS
) \
3239 -DBASEVER
=$(BASEVER_s
) -DDATESTAMP
=$(DATESTAMP_s
) \
3240 -DREVISION
=$(REVISION_s
) \
3241 -DDEVPHASE
=$(DEVPHASE_s
) -DPKGVERSION
=$(PKGVERSION_s
) \
3242 -DBUGURL
=$(BUGURL_s
)
3244 ALL_CPPFLAGS
:= $(ALL_CPPFLAGS
) -DPREFIX
=\"$(prefix)\" \
3245 -DBASEVER
=$(BASEVER_s
)
3247 ALL_CPPFLAGS
:= $(ALL_CPPFLAGS
) -DTARGET_NAME
=\"$(target_noncanonical
)\"
3249 # Special code and dependencies for -combine compilation.
3250 libbackend.o
: $(OBJS-common
:.o
=.c
) $(out_file
) \
3251 $(DATESTAMP
) $(BASEVER
) $(DEVPHASE
)
3253 -DTARGET_NAME
=\"$(target_noncanonical
)\" \
3254 -DLOCALEDIR
=\"$(localedir
)\" \
3256 -DBASEVER
=$(BASEVER_s
) -DDATESTAMP
=$(DATESTAMP_s
) \
3257 -DREVISION
=$(REVISION_s
) \
3258 -DDEVPHASE
=$(DEVPHASE_s
) -DPKGVERSION
=$(PKGVERSION_s
) \
3259 -DBUGURL
=$(BUGURL_s
) -combine
3261 # A couple object files don't share a base name with their source files.
3262 $(out_object_file
): $(out_file
)
3264 gcc-options.o
: options.c
3267 # Make sure generated files are built at the right time.
3268 $(ALL_HOST_OBJS
): |
$(generated_files
)
3270 # Include the auto-generated dependencies for all host objects.
3272 $(foreach obj
,$(ALL_HOST_OBJS
),\
3273 $(dir $(obj
))$(DEPDIR
)/$(patsubst %.o
,%.Po
,$(notdir $(obj
))))
3274 -include $(DEPFILES
)
3276 # Include the auto-generated dependencies for all build objects.
3277 -include $(patsubst %.o
,build
/$(DEPDIR
)/%.Po
,$(ALL_BUILD_OBJS
))