]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/Makefile.in
Update copyright years.
[thirdparty/gcc.git] / gcc / Makefile.in
index aa3c01831b44f4b33e517a410cb5f54d1fe55371..5c29edb374e6abe24441b02fd40e320d2a77f898 100644 (file)
@@ -1,7 +1,7 @@
 # Makefile for GNU Compiler Collection
 # Run 'configure' to generate Makefile from Makefile.in
 
-# Copyright (C) 1987-2016 Free Software Foundation, Inc.
+# Copyright (C) 1987-2017 Free Software Foundation, Inc.
 
 #This file is part of GCC.
 
@@ -56,6 +56,7 @@ MAKEOVERRIDES =
 
 build=@build@
 host=@host@
+host_noncanonical=@host_noncanonical@
 target=@target@
 target_noncanonical:=@target_noncanonical@
 
@@ -274,6 +275,17 @@ else
 LLINKER = $(LINKER)
 endif
 
+THIN_ARCHIVE_SUPPORT = @thin_archive_support@
+
+USE_THIN_ARCHIVES = no
+ifeq ($(THIN_ARCHIVE_SUPPORT),yes)
+ifeq ($(AR_FLAGS),rc)
+ifeq ($(RANLIB_FLAGS),)
+USE_THIN_ARCHIVES = yes
+endif
+endif
+endif
+
 # -------------------------------------------
 # Programs which operate on the build machine
 # -------------------------------------------
@@ -663,6 +675,15 @@ objext = .o
 exeext = @host_exeext@
 build_exeext = @build_exeext@
 
+
+# This allows overriding include paths in host specific Makefile
+# (config/i386/x-mingw32 overrides those variables and local_includedir).
+gplusplus_includedir = $(gcc_gxx_include_dir)
+gplusplus_tool_includedir = $(gcc_gxx_include_dir)/$(target_noncanonical)
+gplusplus_backward_includedir = $(gcc_gxx_include_dir)/backward
+native_system_includedir = $(NATIVE_SYSTEM_HEADER_DIR)
+
+
 # Directory in which to put man pages.
 mandir = @mandir@
 man1dir = $(mandir)/man1
@@ -899,7 +920,8 @@ RTL_H = $(RTL_BASE_H) $(FLAGS_H) genrtl.h
 READ_MD_H = $(OBSTACK_H) $(HASHTAB_H) read-md.h
 PARAMS_H = params.h params-enum.h params.def
 BUILTINS_DEF = builtins.def sync-builtins.def omp-builtins.def \
-       gtm-builtins.def sanitizer.def cilkplus.def cilk-builtins.def
+       gtm-builtins.def sanitizer.def cilkplus.def cilk-builtins.def \
+       hsa-builtins.def
 INTERNAL_FN_DEF = internal-fn.def
 INTERNAL_FN_H = internal-fn.h $(INTERNAL_FN_DEF)
 TREE_CORE_H = tree-core.h coretypes.h all-tree.def tree.def \
@@ -1159,7 +1181,7 @@ CXX_TARGET_OBJS=@cxx_target_objs@
 FORTRAN_TARGET_OBJS=@fortran_target_objs@
 
 # Object files for gcc many-languages driver.
-GCC_OBJS = gcc.o gcc-main.o ggc-none.o spellcheck.o
+GCC_OBJS = gcc.o gcc-main.o ggc-none.o
 
 c-family-warn = $(STRICT_WARN)
 
@@ -1170,7 +1192,8 @@ C_COMMON_OBJS = c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o \
   c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o \
   c-family/c-semantics.o c-family/c-ada-spec.o \
   c-family/c-cilkplus.o \
-  c-family/array-notation-common.o c-family/cilk.o c-family/c-ubsan.o
+  c-family/array-notation-common.o c-family/cilk.o c-family/c-ubsan.o \
+  c-family/c-attribs.o c-family/c-warn.o
 
 # Language-independent object files.
 # We put the *-match.o and insn-*.o files first so that a parallel make
@@ -1258,16 +1281,19 @@ OBJS = \
        explow.o \
        expmed.o \
        expr.o \
+       fibonacci_heap.o \
        final.o \
        fixed-value.o \
        fold-const.o \
        fold-const-call.o \
        function.o \
+       function-tests.o \
        fwprop.o \
        gcc-rich-location.o \
        gcse.o \
        gcse-common.o \
        ggc-common.o \
+       ggc-tests.o \
        gimple.o \
        gimple-builder.o \
        gimple-expr.o \
@@ -1278,8 +1304,12 @@ OBJS = \
        gimple-pretty-print.o \
        gimple-ssa-backprop.o \
        gimple-ssa-isolate-paths.o \
+       gimple-ssa-nonnull-compare.o \
        gimple-ssa-split-paths.o \
+       gimple-ssa-store-merging.o \
        gimple-ssa-strength-reduction.o \
+       gimple-ssa-sprintf.o \
+       gimple-ssa-warn-alloca.o \
        gimple-streamer-in.o \
        gimple-streamer-out.o \
        gimple-walk.o \
@@ -1297,6 +1327,8 @@ OBJS = \
        graphite-sese-to-poly.o \
        gtype-desc.o \
        haifa-sched.o \
+       hash-map-tests.o \
+       hash-set-tests.o \
        hsa.o \
        hsa-gen.o \
        hsa-regalloc.o \
@@ -1367,7 +1399,12 @@ OBJS = \
        mode-switching.o \
        modulo-sched.o \
        multiple_target.o \
+       omp-offload.o \
+       omp-expand.o \
+       omp-general.o \
+       omp-grid.o \
        omp-low.o \
+       omp-simd-clone.o \
        optabs.o \
        optabs-libfuncs.o \
        optabs-query.o \
@@ -1380,6 +1417,7 @@ OBJS = \
        postreload.o \
        predict.o \
        print-rtl.o \
+       print-rtl-function.o \
        print-tree.o \
        profile.o \
        real.o \
@@ -1396,6 +1434,7 @@ OBJS = \
        resource.o \
        rtl-chkp.o \
        rtl-error.o \
+       rtl-tests.o \
        rtl.o \
        rtlhash.o \
        rtlanal.o \
@@ -1408,6 +1447,7 @@ OBJS = \
        sel-sched-ir.o \
        sel-sched-dump.o \
        sel-sched.o \
+       selftest-run-tests.o \
        sese.o \
        shrink-wrap.o \
        simplify-rtx.o \
@@ -1422,6 +1462,7 @@ OBJS = \
        store-motion.o \
        streamer-hooks.o \
        stringpool.o \
+       substring-locations.o \
        target-globals.o \
        targhooks.o \
        timevar.o \
@@ -1482,6 +1523,7 @@ OBJS = \
        tree-ssa-loop-manip.o \
        tree-ssa-loop-niter.o \
        tree-ssa-loop-prefetch.o \
+       tree-ssa-loop-split.o \
        tree-ssa-loop-unswitch.o \
        tree-ssa-loop.o \
        tree-ssa-math-opts.o \
@@ -1521,6 +1563,7 @@ OBJS = \
        tree-vectorizer.o \
        tree-vrp.o \
        tree.o \
+       typed-splay-tree.o \
        valtrack.o \
        value-prof.o \
        var-tracking.o \
@@ -1539,14 +1582,16 @@ OBJS = \
 # Objects in libcommon.a, potentially used by all host binaries and with
 # no target dependencies.
 OBJS-libcommon = diagnostic.o diagnostic-color.o diagnostic-show-locus.o \
+       edit-context.o \
        pretty-print.o intl.o \
-       vec.o input.o version.o hash-table.o ggc-none.o memory-block.o
+       vec.o input.o version.o hash-table.o ggc-none.o memory-block.o \
+       selftest.o
 
 # Objects in libcommon-target.a, used by drivers and by the core
 # compiler and containing target-dependent code.
 OBJS-libcommon-target = $(common_out_object_file) prefix.o params.o \
        opts.o opts-common.o options.o vec.o hooks.o common/common-targhooks.o \
-       hash-table.o file-find.o
+       hash-table.o file-find.o spellcheck.o selftest.o
 
 # This lists all host objects for the front ends.
 ALL_HOST_FRONTEND_OBJS = $(foreach v,$(CONFIG_LANGUAGES),$($(v)_OBJS))
@@ -1557,6 +1602,14 @@ ALL_HOST_BACKEND_OBJS = $(GCC_OBJS) $(OBJS) $(OBJS-libcommon) \
   $(GCOV_TOOL_OBJS) $(GENGTYPE_OBJS) gcc-ar.o gcc-nm.o gcc-ranlib.o \
   lto-wrapper.o collect-utils.o
 
+# for anything that is shared use the cc1plus profile data, as that
+# is likely the most exercised during the build
+ifeq ($(if $(wildcard ../stage_current),$(shell cat \
+  ../stage_current)),stageautofeedback)
+$(ALL_HOST_BACKEND_OBJS): ALL_COMPILERFLAGS += -fauto-profile=cc1plus.fda
+$(ALL_HOST_BACKEND_OBJS): cc1plus.fda
+endif
+
 # This lists all host object files, whether they are included in this
 # compilation or not.
 ALL_HOST_OBJS = $(ALL_HOST_FRONTEND_OBJS) $(ALL_HOST_BACKEND_OBJS)
@@ -1586,7 +1639,7 @@ MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \
  gcov-iov$(build_exeext) gcov$(exeext) gcov-dump$(exeext) \
  gcov-tool$(exeect) \
  gengtype$(exeext) *.[0-9][0-9].* *.[si] *-checksum.c libbackend.a \
- libcommon-target.a libcommon.a libgcc.mk
+ libcommon-target.a libcommon.a libgcc.mk perf.data
 
 # This symlink makes the full installation name of the driver be available
 # from within the *build* directory, for use when running the JIT library
@@ -1813,10 +1866,10 @@ config.status: $(srcdir)/configure $(srcdir)/config.gcc
 quickstrap: all
        cd $(toplevel_builddir) && $(MAKE) all-target-libgcc
 
-all.internal: start.encap rest.encap doc
+all.internal: start.encap rest.encap doc selftest
 # This is what to compile if making a cross-compiler.
 all.cross: native gcc-cross$(exeext) cpp$(exeext) specs \
-       libgcc-support lang.all.cross doc @GENINSRC@ srcextra
+       libgcc-support lang.all.cross doc selftest @GENINSRC@ srcextra
 # This is what must be made before installing GCC and converting libraries.
 start.encap: native xgcc$(exeext) cpp$(exeext) specs \
        libgcc-support lang.start.encap @GENINSRC@ srcextra
@@ -1836,6 +1889,41 @@ endif
 # This does the things that can't be done on the host machine.
 rest.cross: specs
 
+# GCC's selftests.
+# Specify a dummy input file to placate the driver.
+# Specify -nostdinc to work around missing WIND_BASE environment variable
+# required for *-wrs-vxworks-* targets.
+# Specify -o /dev/null so the output of -S is discarded. More importantly
+# It does not try to create a file with the name "null.s" on POSIX and
+# "nul.s" on Windows. Because on Windows "nul" is a reserved file name.
+# Specify the path to gcc/testsuite/selftests within the srcdir
+# as an argument to -fself-test.
+SELFTEST_FLAGS = -nostdinc -x c /dev/null -S -o /dev/null \
+       -fself-test=$(srcdir)/testsuite/selftests
+
+# Run the selftests during the build once we have a driver and a cc1,
+# so that self-test failures are caught as early as possible.
+# Use "s-selftest" to ensure that we only run the selftests if the
+# driver, cc1, or selftest data change.
+.PHONY: selftest
+selftest: s-selftest
+s-selftest: $(GCC_PASSES) cc1$(exeext) stmp-int-hdrs \
+  $(srcdir)/testsuite/selftests
+       $(GCC_FOR_TARGET) $(SELFTEST_FLAGS)
+       $(STAMP) $@
+
+# Convenience method for running selftests under gdb:
+.PHONY: selftest-gdb
+selftest-gdb: $(GCC_PASSES) cc1$(exeext) stmp-int-hdrs
+       $(GCC_FOR_TARGET) $(SELFTEST_FLAGS) \
+         -wrapper gdb,--args
+
+# Convenience method for running selftests under valgrind:
+.PHONY: selftest-valgrind
+selftest-valgrind: $(GCC_PASSES) cc1$(exeext) stmp-int-hdrs
+       $(GCC_FOR_TARGET) $(SELFTEST_FLAGS) \
+         -wrapper valgrind,--leak-check=full
+
 # Recompile all the language-independent object files.
 # This is used only if the user explicitly asks for it.
 compilations: $(BACKEND)
@@ -1843,8 +1931,14 @@ compilations: $(BACKEND)
 # This archive is strictly for the host.
 libbackend.a: $(OBJS)
        -rm -rf libbackend.a
+       @# Build libbackend.a as a thin archive if possible, as doing so
+       @# significantly reduces build times.
+ifeq ($(USE_THIN_ARCHIVES),yes)
+       $(AR) $(AR_FLAGS)T libbackend.a $(OBJS)
+else
        $(AR) $(AR_FLAGS) libbackend.a $(OBJS)
        -$(RANLIB) $(RANLIB_FLAGS) libbackend.a
+endif
 
 libcommon-target.a: $(OBJS-libcommon-target)
        -rm -rf libcommon-target.a
@@ -1983,7 +2077,7 @@ gcc-nm.c: gcc-ar.c
        cp $^ $@
 
 COLLECT2_OBJS = collect2.o collect2-aix.o tlink.o vec.o ggc-none.o \
-  collect-utils.o file-find.o hash-table.o
+  collect-utils.o file-find.o hash-table.o selftest.o
 COLLECT2_LIBS = @COLLECT2_LIBS@
 collect2$(exeext): $(COLLECT2_OBJS) $(LIBDEPS)
 # Don't try modifying collect2 (aka ld) in place--it might be linking this.
@@ -2091,9 +2185,10 @@ s-bversion: BASE-VER
 
 CFLAGS-toplev.o += -DTARGET_NAME=\"$(target_noncanonical)\"
 
-pass-instances.def: $(srcdir)/passes.def $(srcdir)/gen-pass-instances.awk
+pass-instances.def: $(srcdir)/passes.def $(PASSES_EXTRA) \
+                   $(srcdir)/gen-pass-instances.awk
        $(AWK) -f $(srcdir)/gen-pass-instances.awk \
-         $(srcdir)/passes.def > pass-instances.def
+         $(srcdir)/passes.def $(PASSES_EXTRA) > pass-instances.def
 
 $(out_object_file): $(out_file)
        $(COMPILE) $<
@@ -2352,7 +2447,8 @@ s-match: build/genmatch$(build_exeext) $(srcdir)/match.pd cfn-operators.pd
 GTFILES = $(CPP_ID_DATA_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
   $(host_xm_file_list) \
   $(tm_file_list) $(HASHTAB_H) $(SPLAY_TREE_H) $(srcdir)/bitmap.h \
-  $(srcdir)/wide-int.h $(srcdir)/alias.h $(srcdir)/coverage.c $(srcdir)/rtl.h \
+  $(srcdir)/wide-int.h $(srcdir)/alias.h $(srcdir)/cilk.h \
+  $(srcdir)/cilk-common.c $(srcdir)/coverage.c  $(srcdir)/rtl.h \
   $(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/tree-core.h \
   $(srcdir)/libfuncs.h $(SYMTAB_H) \
   $(srcdir)/real.h $(srcdir)/function.h $(srcdir)/insn-addr.h $(srcdir)/hwint.h \
@@ -2373,6 +2469,7 @@ GTFILES = $(CPP_ID_DATA_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
   $(srcdir)/emit-rtl.c $(srcdir)/except.h $(srcdir)/explow.c $(srcdir)/expr.c \
   $(srcdir)/expr.h \
   $(srcdir)/function.c $(srcdir)/except.c \
+  $(srcdir)/ggc-tests.c \
   $(srcdir)/gcse.c $(srcdir)/godump.c \
   $(srcdir)/lists.c $(srcdir)/optabs-libfuncs.c \
   $(srcdir)/profile.c $(srcdir)/mcf.c \
@@ -2390,13 +2487,16 @@ GTFILES = $(CPP_ID_DATA_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
   $(srcdir)/tree-scalar-evolution.c \
   $(srcdir)/tree-ssa-operands.h \
   $(srcdir)/tree-profile.c $(srcdir)/tree-nested.c \
+  $(srcdir)/omp-offload.h \
+  $(srcdir)/omp-offload.c \
+  $(srcdir)/omp-expand.c \
   $(srcdir)/omp-low.c \
-  $(srcdir)/omp-low.h \
   $(srcdir)/targhooks.c $(out_file) $(srcdir)/passes.c $(srcdir)/cgraphunit.c \
   $(srcdir)/cgraphclones.c \
   $(srcdir)/tree-phinodes.c \
   $(srcdir)/tree-ssa-alias.h \
   $(srcdir)/tree-ssanames.h \
+  $(srcdir)/tree-vrp.h \
   $(srcdir)/ipa-prop.h \
   $(srcdir)/trans-mem.c \
   $(srcdir)/lto-streamer.h \
@@ -2461,7 +2561,7 @@ generated_files = config.h tm.h $(TM_P_H) $(TM_H) multilib.h \
        $(ALL_GTFILES_H) gtype-desc.c gtype-desc.h gcov-iov.h \
        options.h target-hooks-def.h insn-opinit.h \
        common/common-target-hooks-def.h pass-instances.def \
-       c-family/c-target-hooks-def.h params.list case-cfn-macros.h \
+       c-family/c-target-hooks-def.h params.list params.options case-cfn-macros.h \
        cfn-operators.pd
 
 #\f
@@ -2687,14 +2787,14 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\"
 PREPROCESSOR_DEFINES = \
   -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
   -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \
-  -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
+  -DGPLUSPLUS_INCLUDE_DIR=\"$(gplusplus_includedir)\" \
   -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \
-  -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_noncanonical)\" \
-  -DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \
+  -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gplusplus_tool_includedir)\" \
+  -DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gplusplus_backward_includedir)\" \
   -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \
   -DCROSS_INCLUDE_DIR=\"$(CROSS_SYSTEM_HEADER_DIR)\" \
   -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
-  -DNATIVE_SYSTEM_HEADER_DIR=\"$(NATIVE_SYSTEM_HEADER_DIR)\" \
+  -DNATIVE_SYSTEM_HEADER_DIR=\"$(native_system_includedir)\" \
   -DPREFIX=\"$(prefix)/\" \
   -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \
   @TARGET_SYSTEM_ROOT_DEFINE@
@@ -2715,7 +2815,7 @@ build/gcov-iov$(build_exeext): build/gcov-iov.o
        +$(LINKER_FOR_BUILD) $(BUILD_LINKERFLAGS) $(BUILD_LDFLAGS) \
                build/gcov-iov.o -o $@
 
-gcov-iov.h: s-iov
+gcov-iov.h: s-iov; @true
 s-iov: build/gcov-iov$(build_exeext) $(BASEVER) $(DEVPHASE)
        build/gcov-iov$(build_exeext) '$(BASEVER_c)' '$(DEVPHASE_c)' \
            > tmp-gcov-iov.h
@@ -3293,10 +3393,17 @@ s-params.list: $(srcdir)/params-list.h $(srcdir)/params.def
        $(SHELL) $(srcdir)/../move-if-change tmp-params.list params.list
        $(STAMP) s-params.list
 
+params.options: s-params.options; @true
+s-params.options: $(srcdir)/params-options.h $(srcdir)/params.def
+       $(CPP) $(srcdir)/params-options.h | sed 's/^#.*//;/^$$/d' > tmp-params.options
+       $(SHELL) $(srcdir)/../move-if-change tmp-params.options params.options
+       $(STAMP) s-params.options
+
+
 PLUGIN_HEADERS = $(TREE_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
   toplev.h $(DIAGNOSTIC_CORE_H) $(BASIC_BLOCK_H) $(HASH_TABLE_H) \
   tree-ssa-alias.h $(INTERNAL_FN_H) gimple-fold.h tree-eh.h gimple-expr.h \
-  gimple.h is-a.h $(TREE_PASS_H) $(GCC_PLUGIN_H) \
+  gimple.h is-a.h memmodel.h $(TREE_PASS_H) $(GCC_PLUGIN_H) \
   $(GGC_H) $(TREE_DUMP_H) $(PRETTY_PRINT_H) $(OPTS_H) $(PARAMS_H) \
   $(tm_file_list) $(tm_include_list) $(tm_p_file_list) $(tm_p_include_list) \
   $(host_xm_file_list) $(host_xm_include_list) $(xm_include_list) \
@@ -3320,7 +3427,8 @@ PLUGIN_HEADERS = $(TREE_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
   tree-ssa-loop-niter.h tree-ssa-ter.h tree-ssa-threadedge.h \
   tree-ssa-threadupdate.h inchash.h wide-int.h signop.h hash-map.h \
   hash-set.h dominance.h cfg.h cfgrtl.h cfganal.h cfgbuild.h cfgcleanup.h \
-  lcm.h cfgloopmanip.h builtins.def chkp-builtins.def pass-instances.def
+  lcm.h cfgloopmanip.h builtins.def chkp-builtins.def pass-instances.def \
+  params.list
 
 # generate the 'build fragment' b-header-vars
 s-header-vars: Makefile
@@ -3826,7 +3934,7 @@ check_p_subdirs=$(wordlist 1,$(check_p_count),$(wordlist 1, \
 # testsuites like objc or go.
 $(lang_checks_parallelized): check-% : site.exp
        -rm -rf $(TESTSUITEDIR)/$*-parallel
-       @if [ "$(filter -j, $(MFLAGS))" = "-j" ]; then \
+       @if [ -n "$(filter -j%, $(MFLAGS))" ]; then \
          test -d $(TESTSUITEDIR) || mkdir $(TESTSUITEDIR) || true; \
          test -d $(TESTSUITEDIR)/$*-parallel || mkdir $(TESTSUITEDIR)/$*-parallel || true; \
          GCC_RUNTEST_PARALLELIZE_DIR=`${PWD_COMMAND}`/$(TESTSUITEDIR)/$(check_p_tool)-parallel ; \