From patchwork Mon Jul 29 16:24:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 262887 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 0D56D2C0098 for ; Tue, 30 Jul 2013 02:27:27 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references; q=dns; s= default; b=Ay9uISPmXD0qrG59ZYKfWH2fF3wc7iPX4AyudMneCH/YReJuVqZw0 CoYKge13FXorLbHidfbV3gfk3D2PHhxJOn1+TNLNRYSl7AIT0NEhIqCWFoqBqZld T9m8KygtPuACVkqLq6EhJgvA8XZuEx7qnm+u4H1ZbJ3tX0jBTrCqhI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references; s= default; bh=9SXk2W6gk/I9YLBxc07TAKIdrLQ=; b=sPonct3A36FP6rfXIgHi UcIHpqlorpFBXUafJM9srOJ9ADT6bIJDXXtJ9WS1gl+0OyXRj/WkvNb/LEwJ79sM e9YFCv6Xcw9eOKkHddCHBFhz33RsuziAd3YZjuuKCeH91zW//z7Hw7dqoUSC9P2w +Xba4yEciIS7963spI3HS2g= Received: (qmail 16786 invoked by alias); 29 Jul 2013 16:24:49 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 16686 invoked by uid 89); 29 Jul 2013 16:24:48 -0000 X-Spam-SWARE-Status: No, score=-4.8 required=5.0 tests=AWL, BAYES_50, KHOP_THREADED, RCVD_IN_HOSTKARMA_W, RCVD_IN_HOSTKARMA_WL, RDNS_NONE, SPF_HELO_PASS, SPF_PASS autolearn=no version=3.3.1 Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 29 Jul 2013 16:24:47 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6TGOdtZ026911 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 29 Jul 2013 12:24:39 -0400 Received: from barimba.redhat.com (ovpn-113-128.phx2.redhat.com [10.3.113.128]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r6TGOXH9016555; Mon, 29 Jul 2013 12:24:39 -0400 From: Tom Tromey To: gcc-patches@gcc.gnu.org Cc: Tom Tromey Subject: [PATCH v2 11/18] convert the Fortran front end to automatic dependencies Date: Mon, 29 Jul 2013 10:24:22 -0600 Message-Id: <1375115069-31143-12-git-send-email-tromey@redhat.com> In-Reply-To: <1375115069-31143-1-git-send-email-tromey@redhat.com> References: <1375115069-31143-1-git-send-email-tromey@redhat.com> This convert fortran. It renames gfortranspec.o to fortran/gfortranspec.o, for uniformity and to allow removing an explicit rule. * Make-lang.in (fortran_OBJS): Use fortran/gfortranspec.o. (gfortranspec.o): Remove. (CFLAGS-fortran/gfortranspec.o): New variable. (GFORTRAN_D_OBJS): Update. ($(F95_PARSER_OBJS), fortran/openmp.o, GFORTRAN_TRANS_DEPS) (fortran/f95-lang.o, fortran/scanner.o, fortran/convert.o) (fortran/frontend-passes.o, fortran/trans.o, fortran/trans-decl.o) (fortran/trans-types, fortran/trans-const.o, fortran/trans-expr.o) (fortran/trans-stmt.o, fortran/trans-openmp.o, fortran/trans-io.o) (fortran/trans-array.o, fortran/trans-intrinsic.o) (fortran/dependency.o, fortran/trans-common.o, fortran/resolve.o) (fortran/data.o, fortran/options.o, fortran/cpp.o) (fortran/scanner.o, fortran/module.o): Remove. --- gcc/fortran/Make-lang.in | 62 +++--------------------------------------------- 1 file changed, 3 insertions(+), 59 deletions(-) diff --git a/gcc/fortran/Make-lang.in b/gcc/fortran/Make-lang.in index 035a1d5..35fff87 100644 --- a/gcc/fortran/Make-lang.in +++ b/gcc/fortran/Make-lang.in @@ -67,7 +67,7 @@ F95_OBJS = $(F95_PARSER_OBJS) $(FORTRAN_TARGET_OBJS) \ fortran/trans-intrinsic.o fortran/trans-io.o fortran/trans-openmp.o \ fortran/trans-stmt.o fortran/trans-types.o fortran/frontend-passes.o -fortran_OBJS = $(F95_OBJS) gfortranspec.o +fortran_OBJS = $(F95_OBJS) fortran/gfortranspec.o # # Define the names for selecting gfortran in LANGUAGES. @@ -76,13 +76,10 @@ fortran: f951$(exeext) # Tell GNU make to ignore files by these names if they exist. .PHONY: fortran -gfortranspec.o: $(srcdir)/fortran/gfortranspec.c $(SYSTEM_H) $(TM_H) $(GCC_H) \ - $(CONFIG_H) coretypes.h intl.h $(OPTS_H) - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \ - $(INCLUDES) $(srcdir)/fortran/gfortranspec.c +CFLAGS-fortran/gfortranspec.o += $(DRIVER_DEFINES) # Create the compiler driver gfortran. -GFORTRAN_D_OBJS = $(GCC_OBJS) gfortranspec.o +GFORTRAN_D_OBJS = $(GCC_OBJS) fortran/gfortranspec.o gfortran$(exeext): $(GFORTRAN_D_OBJS) $(EXTRA_GCC_OBJS) libcommon-target.a \ $(LIBDEPS) +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ @@ -316,59 +313,6 @@ fortran.stagefeedback: stageprofile-start -mv fortran/*$(objext) stagefeedback/fortran # -# .o: .h dependencies. - -# Everything depends on gfortran.h, but only a few files depend on -# the other headers. So at some point we'll have to split out -# which objects depend on what. FIXME -# TODO: Add dependencies on the backend/tree header files - -$(F95_PARSER_OBJS): fortran/gfortran.h fortran/libgfortran.h \ - fortran/intrinsic.h fortran/match.h fortran/constructor.h \ - fortran/parse.h fortran/arith.h fortran/target-memory.h \ - $(CONFIG_H) $(SYSTEM_H) $(TM_H) $(TM_P_H) coretypes.h \ - dumpfile.h $(TREE_H) dumpfile.h $(GGC_H) $(VEC_H) \ - $(FLAGS_H) $(DIAGNOSTIC_H) errors.h $(FUNCTION_H) \ - fortran/iso-c-binding.def fortran/iso-fortran-env.def -fortran/openmp.o: pointer-set.h $(TARGET_H) toplev.h - -GFORTRAN_TRANS_DEPS = fortran/gfortran.h fortran/libgfortran.h \ - fortran/intrinsic.h fortran/trans-array.h \ - fortran/trans-const.h fortran/trans-const.h fortran/trans.h \ - fortran/trans-stmt.h fortran/trans-types.h \ - $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(TM_H) coretypes.h $(GGC_H) \ - fortran/iso-c-binding.def fortran/iso-fortran-env.def CFLAGS-fortran/cpp.o += $(TARGET_SYSTEM_ROOT_DEFINE) -fortran/f95-lang.o: $(GFORTRAN_TRANS_DEPS) fortran/mathbuiltins.def \ - gt-fortran-f95-lang.h gtype-fortran.h $(CGRAPH_H) $(TARGET_H) fortran/cpp.h \ - $(BUILTINS_DEF) fortran/types.def \ - $(TM_H) debug.h langhooks.h $(FLAGS_H) $(EXPR_H) $(LANGHOOKS_DEF_H) \ - libfuncs.h expr.h $(DIAGNOSTIC_H) -fortran/scanner.o: toplev.h fortran/cpp.h -fortran/convert.o: $(GFORTRAN_TRANS_DEPS) convert.h -fortran/frontend-passes.o: $(GFORTRAN_TRANS_DEPS) -fortran/trans.o: $(GFORTRAN_TRANS_DEPS) tree-iterator.h -fortran/trans-decl.o: $(GFORTRAN_TRANS_DEPS) gt-fortran-trans-decl.h \ - $(CGRAPH_H) $(TARGET_H) $(FUNCTION_H) $(FLAGS_H) $(RTL_H) $(GIMPLE_H) \ - $(TREE_DUMP_H) debug.h pointer-set.h -fortran/trans-types.o: $(GFORTRAN_TRANS_DEPS) gt-fortran-trans-types.h \ - $(REAL_H) toplev.h $(TARGET_H) $(FLAGS_H) dwarf2out.h -fortran/trans-const.o: $(GFORTRAN_TRANS_DEPS) realmpfr.h -fortran/trans-expr.o: $(GFORTRAN_TRANS_DEPS) fortran/dependency.h -fortran/trans-stmt.o: $(GFORTRAN_TRANS_DEPS) fortran/dependency.h -fortran/trans-openmp.o: $(GFORTRAN_TRANS_DEPS) -fortran/trans-io.o: $(GFORTRAN_TRANS_DEPS) gt-fortran-trans-io.h \ - fortran/ioparm.def -fortran/trans-array.o: $(GFORTRAN_TRANS_DEPS) $(GIMPLE_H) -fortran/trans-intrinsic.o: $(GFORTRAN_TRANS_DEPS) fortran/mathbuiltins.def \ - gt-fortran-trans-intrinsic.h -fortran/dependency.o: $(GFORTRAN_TRANS_DEPS) fortran/dependency.h -fortran/trans-common.o: $(GFORTRAN_TRANS_DEPS) $(TARGET_H) $(RTL_H) -fortran/resolve.o: fortran/dependency.h fortran/data.h fortran/target-memory.h -fortran/data.o: fortran/data.h -fortran/options.o: $(PARAMS_H) $(TARGET_H) fortran/cpp.h -fortran/cpp.o: fortran/cpp.c incpath.h incpath.o cppbuiltin.h -fortran/scanner.o: fortran/scanner.h CFLAGS-fortran/module.o += $(ZLIBINC) -fortran/module.o: fortran/scanner.h