]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/Makefile.in
Merger of dmalcolm/jit branch from git
[thirdparty/gcc.git] / gcc / Makefile.in
index 1fd7915814cd4c8ab07ab30311830309cacbd45f..0ab3476d517b916ef1eef6178f26e4629a789cdc 100644 (file)
@@ -204,6 +204,8 @@ gengtype-lex.o-warn = -Wno-error
 libgcov-util.o-warn = -Wno-error
 libgcov-driver-tool.o-warn = -Wno-error
 libgcov-merge-tool.o-warn = -Wno-error
+gimple-match.o-warn = -Wno-unused-variable -Wno-unused-parameter
+generic-match.o-warn = -Wno-unused-variable -Wno-unused-parameter
 
 # All warnings have to be shut off in stage1 if the compiler used then
 # isn't gcc; configure determines that.  WARN_CFLAGS will be either
@@ -314,6 +316,11 @@ write_entries_to_file = $(shell rm -f $(2) || :) $(shell touch $(2)) \
                          $(shell expr $(range) + $(write_entries_to_file_split) - 1), $(1))" \
             | tr ' ' '\012' >> $(2)))
 
+# The jit documentation looks better if built with sphinx, but can be
+# built with texinfo if sphinx is not available.
+# configure sets "doc_build_sys" to "sphinx" or "texinfo" accordingly
+doc_build_sys=@doc_build_sys@
+
 # --------
 # UNSORTED
 # --------
@@ -1227,6 +1234,8 @@ OBJS = \
        gimple-iterator.o \
        gimple-fold.o \
        gimple-low.o \
+       gimple-match.o \
+       generic-match.o \
        gimple-pretty-print.o \
        gimple-ssa-isolate-paths.o \
        gimple-ssa-strength-reduction.o \
@@ -1240,7 +1249,6 @@ OBJS = \
        graphds.o \
        graphite.o \
        graphite-blocking.o \
-       graphite-clast-to-gimple.o \
        graphite-isl-ast-to-gimple.o \
        graphite-dependences.o \
        graphite-interchange.o \
@@ -1258,6 +1266,7 @@ OBJS = \
        incpath.o \
        init-regs.o \
        internal-fn.o \
+       ipa-chkp.o \
        ipa-cp.o \
        ipa-devirt.o \
        ipa-polymorphic-call.o \
@@ -1336,6 +1345,7 @@ OBJS = \
        reload1.o \
        reorg.o \
        resource.o \
+       rtl-chkp.o \
        rtl-error.o \
        rtl.o \
        rtlhash.o \
@@ -1372,6 +1382,7 @@ OBJS = \
        asan.o \
        tsan.o \
        ubsan.o \
+       sanopt.o \
        tree-call-cdce.o \
        tree-cfg.o \
        tree-cfgcleanup.o \
@@ -1394,6 +1405,8 @@ OBJS = \
        tree-outof-ssa.o \
        tree-parloops.o \
        tree-phinodes.o \
+       tree-chkp.o \
+       tree-chkp-opt.o \
        tree-predcom.o \
        tree-pretty-print.o \
        tree-profile.o \
@@ -1500,14 +1513,17 @@ BACKEND = libbackend.a main.o @TREEBROWSER@ libcommon-target.a libcommon.a \
 # front-end checking.
 TREECHECKING = @TREECHECKING@
 
+# The full name of the driver on installation
+FULL_DRIVER_NAME=$(target_noncanonical)-gcc-$(version)$(exeext)
+
 MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \
  insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
  insn-attr.h insn-attr-common.h insn-attrtab.c insn-dfatab.c \
  insn-latencytab.c insn-opinit.c insn-opinit.h insn-preds.c insn-constants.h \
- tm-preds.h tm-constrs.h checksum-options \
+ tm-preds.h tm-constrs.h checksum-options gimple-match.c generic-match.c \
  tree-check.h min-insn-modes.c insn-modes.c insn-modes.h \
  genrtl.h gt-*.h gtype-*.h gtype-desc.c gtyp-input.list \
- xgcc$(exeext) cpp$(exeext) \
+ xgcc$(exeext) cpp$(exeext) $(FULL_DRIVER_NAME) \
  $(EXTRA_PROGRAMS) gcc-cross$(exeext) \
  $(SPECS) collect2$(exeext) gcc-ar$(exeext) gcc-nm$(exeext) \
  gcc-ranlib$(exeext) \
@@ -1516,6 +1532,12 @@ MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \
  gengtype$(exeext) *.[0-9][0-9].* *.[si] *-checksum.c libbackend.a \
  libcommon-target.a libcommon.a libgcc.mk
 
+# This symlink makes the full installation name of the driver be available
+# from within the *build* directory, for use when running the JIT library
+# from there (e.g. when running its testsuite).
+$(FULL_DRIVER_NAME): ./xgcc
+       $(LN) -s $< $@
+
 #\f
 # Language makefile fragments.
 
@@ -1669,6 +1691,7 @@ aclocal_deps = \
        $(srcdir)/../config/codeset.m4 \
        $(srcdir)/../config/extensions.m4 \
        $(srcdir)/../config/gettext-sister.m4 \
+       $(srcdir)/../config/gcc-plugin.m4 \
        $(srcdir)/../config/iconv.m4 \
        $(srcdir)/../config/lcmessage.m4 \
        $(srcdir)/../config/lib-ld.m4 \
@@ -2021,7 +2044,7 @@ $(common_out_object_file): $(common_out_file)
 .PRECIOUS: insn-config.h insn-flags.h insn-codes.h insn-constants.h \
   insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
   insn-attr.h insn-attr-common.h insn-attrtab.c insn-dfatab.c \
-  insn-latencytab.c insn-preds.c
+  insn-latencytab.c insn-preds.c gimple-match.c generic-match.c
 
 # Dependencies for the md file.  The first time through, we just assume
 # the md file itself and the generated dependency file (in order to get
@@ -2230,6 +2253,20 @@ s-tm-texi: build/genhooks$(build_exeext) $(srcdir)/doc/tm.texi.in
          false; \
        fi
 
+gimple-match.c: s-match gimple-match-head.c ; @true
+generic-match.c: s-match generic-match-head.c ; @true
+
+s-match: build/genmatch$(build_exeext) $(srcdir)/match.pd
+       $(RUN_GEN) build/genmatch$(build_exeext) --gimple $(srcdir)/match.pd \
+           > tmp-gimple-match.c
+       $(RUN_GEN) build/genmatch$(build_exeext) --generic $(srcdir)/match.pd \
+           > tmp-generic-match.c
+       $(SHELL) $(srcdir)/../move-if-change tmp-gimple-match.c \
+                                               gimple-match.c
+       $(SHELL) $(srcdir)/../move-if-change tmp-generic-match.c \
+                                               generic-match.c
+       $(STAMP) s-match
+
 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 \
@@ -2238,7 +2275,7 @@ GTFILES = $(CPP_ID_DATA_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
   $(srcdir)/libfuncs.h $(SYMTAB_H) \
   $(srcdir)/real.h $(srcdir)/function.h $(srcdir)/insn-addr.h $(srcdir)/hwint.h \
   $(srcdir)/fixed-value.h \
-  $(srcdir)/output.h $(srcdir)/cfgloop.h \
+  $(srcdir)/output.h $(srcdir)/cfgloop.h $(srcdir)/cfg.h \
   $(srcdir)/cselib.h $(srcdir)/basic-block.h  $(srcdir)/ipa-ref.h $(srcdir)/cgraph.h \
   $(srcdir)/reload.h $(srcdir)/caller-save.c $(srcdir)/symtab.c \
   $(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c $(srcdir)/cgraph.c \
@@ -2262,6 +2299,7 @@ GTFILES = $(CPP_ID_DATA_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
   $(srcdir)/stringpool.c $(srcdir)/tree.c $(srcdir)/varasm.c \
   $(srcdir)/gimple.h \
   $(srcdir)/gimple-ssa.h \
+  $(srcdir)/tree-chkp.c \
   $(srcdir)/tree-ssanames.c $(srcdir)/tree-eh.c $(srcdir)/tree-ssa-address.c \
   $(srcdir)/tree-cfg.c \
   $(srcdir)/tree-dfa.c \
@@ -2286,6 +2324,7 @@ GTFILES = $(CPP_ID_DATA_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
   $(srcdir)/asan.c \
   $(srcdir)/ubsan.c \
   $(srcdir)/tsan.c \
+  $(srcdir)/sanopt.c \
   $(srcdir)/ipa-devirt.c \
   $(srcdir)/internal-fn.h \
   @all_gtfiles@
@@ -2378,6 +2417,8 @@ build/rtl.o: rtl.c $(BCONFIG_H) coretypes.h $(GTM_H) $(SYSTEM_H)  \
   $(RTL_H) $(GGC_H) errors.h
 build/vec.o : vec.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(VEC_H)      \
    $(GGC_H) toplev.h $(DIAGNOSTIC_CORE_H)
+build/hash-table.o : hash-table.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h  \
+   $(HASH_TABLE_H) $(GGC_H) toplev.h $(DIAGNOSTIC_CORE_H)
 build/gencondmd.o : build/gencondmd.c $(BCONFIG_H) $(SYSTEM_H)         \
   coretypes.h $(GTM_H) insn-constants.h                                        \
   $(filter-out insn-flags.h, $(RTL_H) $(TM_P_H) $(FUNCTION_H) $(REGS_H) \
@@ -2473,6 +2514,8 @@ build/genhooks.o : genhooks.c $(TARGET_DEF) $(C_TARGET_DEF)               \
   $(COMMON_TARGET_DEF) $(BCONFIG_H) $(SYSTEM_H) errors.h
 build/genmddump.o : genmddump.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
   coretypes.h $(GTM_H) errors.h $(READ_MD_H) gensupport.h
+build/genmatch.o : genmatch.c $(BCONFIG_H) $(SYSTEM_H) \
+  coretypes.h errors.h $(HASH_TABLE_H) hash-map.h $(GGC_H)
 
 # Compile the programs that generate insn-* from the machine description.
 # They are compiled with $(COMPILER_FOR_BUILD), and associated libraries,
@@ -2493,11 +2536,25 @@ genprogerr = $(genprogmd) genrtl modes gtype hooks
 $(genprogerr:%=build/gen%$(build_exeext)): $(BUILD_ERRORS)
 
 # Remaining build programs.
-genprog = $(genprogerr) check checksum condmd
+genprog = $(genprogerr) check checksum condmd match
 
 # These programs need libs over and above what they get from the above list.
 build/genautomata$(build_exeext) : BUILD_LIBS += -lm
 
+# For stage1 and when cross-compiling use the build libcpp which is
+# built with NLS disabled.  For stage2+ use the host library and
+# its dependencies.
+ifeq ($(build_objdir),$(build_libobjdir))
+BUILD_CPPLIB = $(build_libobjdir)/libcpp/libcpp.a
+else
+BUILD_CPPLIB = $(CPPLIB) $(LIBIBERTY)
+build/genmatch$(build_exeext): BUILD_LIBDEPS += $(LIBINTL_DEP) $(LIBICONV_DEP)
+build/genmatch$(build_exeext): BUILD_LIBS += $(LIBINTL) $(LIBICONV)
+endif
+
+build/genmatch$(build_exeext) : $(BUILD_CPPLIB) \
+  $(BUILD_ERRORS) build/vec.o build/hash-table.o
+
 # These programs are not linked with the MD reader.
 build/gengtype$(build_exeext) : build/gengtype-lex.o build/gengtype-parse.o \
               build/gengtype-state.o build/version.o build/errors.o
@@ -2832,7 +2889,8 @@ TEXI_GCCINT_FILES = gccint.texi gcc-common.texi gcc-vers.texi             \
         configfiles.texi collect2.texi headerdirs.texi funding.texi    \
         gnu.texi gpl_v3.texi fdl.texi contrib.texi languages.texi      \
         sourcebuild.texi gty.texi libgcc.texi cfg.texi tree-ssa.texi   \
-        loop.texi generic.texi gimple.texi plugins.texi optinfo.texi
+        loop.texi generic.texi gimple.texi plugins.texi optinfo.texi   \
+        match-and-simplify.texi
 
 TEXI_GCCINSTALL_FILES = install.texi install-old.texi fdl.texi         \
         gcc-common.texi gcc-vers.texi
@@ -3243,9 +3301,9 @@ install-driver: installdirs xgcc$(exeext)
        -rm -f $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
        -$(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
        -if [ "$(GCC_INSTALL_NAME)" != "$(target_noncanonical)-gcc-$(version)" ]; then \
-         rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version)$(exeext); \
+         rm -f $(DESTDIR)$(bindir)/$(FULL_DRIVER_NAME); \
          ( cd $(DESTDIR)$(bindir) && \
-           $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-$(version)$(exeext) ); \
+           $(LN) $(GCC_INSTALL_NAME)$(exeext) $(FULL_DRIVER_NAME) ); \
        fi
        -if [ ! -f gcc-cross$(exeext) ] \
            && [ "$(GCC_INSTALL_NAME)" != "$(GCC_TARGET_INSTALL_NAME)" ]; then \