From patchwork Thu Jul 25 20:31:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 261930 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 D84A42C00ED for ; Fri, 26 Jul 2013 06:32:51 +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=JHvgCSKb8RzfiwZycswAT7lX+dWeLzysW9yawMjZKy6ydRL3L+CHU l0+0Lg9FlARSzFnqvJ1lfoQMlJjyzwl/1YqMiS9uWIaqXIi20gv0KKi7JomNthib cXtYGKAPzC7lAsq+d/72xbhRNZhKTFKXl5CR4Hn7zn4It8F8w8FMjY= 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=1zoPjq2MvPBdwzD0i0a8LNTrQSo=; b=UP56wq9GOsEzWeCVdrnN i23vbFHOF2PNsdsAFd1+ANAPTv0tfFoIpcfGLkUdyoTOc0YSQeOkKoVUkvl4ijtQ Sp/9gYhgzPqd1IuLvZXQtQ+RNJB+Uykh8yc9bJ9AZ9rukIDII7IqGRkHqh2QI77Q ENj54zjMvCkwuGdgEwBUmP8= Received: (qmail 665 invoked by alias); 25 Jul 2013 20:32:07 -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 600 invoked by uid 89); 25 Jul 2013 20:32:07 -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, TW_BJ 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; Thu, 25 Jul 2013 20:32:06 +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 r6PKVwet003450 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 25 Jul 2013 16:31:58 -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 r6PKVtJd020184; Thu, 25 Jul 2013 16:31:58 -0400 From: Tom Tromey To: gcc-patches@gcc.gnu.org Cc: Tom Tromey Subject: [PATCH 05/18] convert the C front end to automatic dependencies Date: Thu, 25 Jul 2013 14:31:40 -0600 Message-Id: <1374784313-2102-6-git-send-email-tromey@redhat.com> In-Reply-To: <1374784313-2102-1-git-send-email-tromey@redhat.com> References: <1374784313-2102-1-git-send-email-tromey@redhat.com> This converts the C front end. Note that this fixes a latent bug in gcc/Makefile.in's definition of C_TREE_H. This is needed to avoid breaking this build with this patch. * Makefile.in (C_TREE_H): Reference c/c-tree.h. * Make-lang.in (c/gccspec.o): Remove. (CFLAGS-c/gccspec.o): New variable. (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o) (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o) (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove. --- gcc/Makefile.in | 2 +- gcc/c/Make-lang.in | 60 +----------------------------------------------------- 2 files changed, 2 insertions(+), 60 deletions(-) diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 6baa72f..13626ec 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -928,7 +928,7 @@ INSN_ADDR_H = $(srcdir)/insn-addr.h C_COMMON_H = c-family/c-common.h c-family/c-common.def $(TREE_H) \ $(SPLAY_TREE_H) $(CPPLIB_H) $(GGC_H) $(DIAGNOSTIC_CORE_H) C_PRAGMA_H = c-family/c-pragma.h $(CPPLIB_H) -C_TREE_H = c-tree.h $(C_COMMON_H) $(DIAGNOSTIC_H) +C_TREE_H = c/c-tree.h $(C_COMMON_H) $(DIAGNOSTIC_H) SYSTEM_H = system.h hwint.h $(srcdir)/../include/libiberty.h \ $(srcdir)/../include/safe-ctype.h $(srcdir)/../include/filenames.h PREDICT_H = predict.h predict.def diff --git a/gcc/c/Make-lang.in b/gcc/c/Make-lang.in index 86deb1d..d79fc4f 100644 --- a/gcc/c/Make-lang.in +++ b/gcc/c/Make-lang.in @@ -44,11 +44,7 @@ c: cc1$(exeext) # The C front end driver. This is different from the drivers for other # front ends, because there is no C language specific driver (i.e. nothing # is to cc1 as e.g. g++ is to cc1plus, or gfortran is to f951). -c/gccspec.o: c/gccspec.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(GCC_H) \ - $(OPTS_H) - $(COMPILER) $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \ - $(DRIVER_DEFINES) \ - -c $(srcdir)/c/gccspec.c $(OUTPUT_OPTION) +CFLAGS-c/gccspec.o += $(DRIVER_DEFINES) # The C compiler itself. @@ -71,8 +67,6 @@ cc1-checksum.c : build/genchecksum$(build_exeext) checksum-options \ checksum-options > cc1-checksum.c.tmp && \ $(srcdir)/../move-if-change cc1-checksum.c.tmp cc1-checksum.c -cc1-checksum.o : cc1-checksum.c $(CONFIG_H) $(SYSTEM_H) - cc1$(exeext): $(C_OBJS) cc1-checksum.o $(BACKEND) $(LIBDEPS) +$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) \ cc1-checksum.o $(BACKEND) $(LIBS) $(BACKENDLIBS) @@ -144,55 +138,3 @@ c.stageprofile: stageprofile-start c.stagefeedback: stagefeedback-start -mv c/*$(objext) stagefeedback/c -# -# .o: .h dependencies. -# C language specific files. -C_TREE_H = c/c-tree.h $(C_COMMON_H) $(DIAGNOSTIC_H) -c/c-aux-info.o : c/c-aux-info.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ - $(C_TREE_H) $(TREE_H) $(FLAGS_H) - -c/c-convert.o : c/c-convert.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ - $(TREE_H) $(C_TREE_H) $(FLAGS_H) $(C_COMMON_H) convert.h \ - langhooks.h $(TARGET_H) - -c/c-decl.o : c/c-decl.c c/c-lang.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ - $(TREE_H) $(C_TREE_H) $(GGC_H) $(TARGET_H) $(FLAGS_H) $(FUNCTION_H) \ - output.h debug.h toplev.h intl.h $(TM_P_H) $(TREE_INLINE_H) \ - $(TIMEVAR_H) $(OPTS_H) $(C_PRAGMA_H) gt-c-c-decl.h $(CGRAPH_H) \ - $(HASH_TABLE_H) $(LANGHOOKS_DEF_H) \ - dumpfile.h $(C_COMMON_H) $(CPPLIB_H) $(DIAGNOSTIC_CORE_H) \ - $(INPUT_H) langhooks.h pointer-set.h tree-iterator.h \ - $(PLUGIN_H) c-family/c-ada-spec.h c-family/c-objc.h - -c/c-errors.o: c/c-errors.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ - $(C_TREE_H) $(FLAGS_H) $(DIAGNOSTIC_H) $(TM_P_H) - -c/c-lang.o : c/c-lang.c c/c-objc-common.h \ - $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ - $(C_TREE_H) $(DIAGNOSTIC_CORE_H) \ - langhooks.h $(LANGHOOKS_DEF_H) $(C_COMMON_H) gtype-c.h \ - $(C_PRAGMA_H) $(TREE_INLINE_H) - -c/c-objc-common.o : c/c-objc-common.c c/c-objc-common.h \ - $(CONFIG_H) $(SYSTEM_H) coretypes.h \ - $(TREE_H) $(C_TREE_H) $(FLAGS_H) $(DIAGNOSTIC_H) \ - langhooks.h $(GGC_H) $(C_PRETTY_PRINT_H) intl.h \ - $(TREE_PRETTY_PRINT_H) - -c/c-parser.o : c/c-parser.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ - $(TM_H) $(TREE_H) $(C_TREE_H) $(C_COMMON_H) $(C_PRAGMA_H) $(CPPLIB_H) \ - $(GGC_H) $(TIMEVAR_H) $(INPUT_H) $(FLAGS_H) \ - gt-c-c-parser.h langhooks.h \ - $(VEC_H) $(TARGET_H) $(CGRAPH_H) $(PLUGIN_H) \ - c-family/c-objc.h - -c/c-typeck.o : c/c-typeck.c c/c-lang.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ - $(TREE_H) $(C_TREE_H) $(TARGET_H) $(FLAGS_H) intl.h \ - langhooks.h tree-iterator.h $(BITMAP_H) $(GIMPLE_H) \ - c-family/c-objc.h c-family/c-common.h - -c/c-array-notation.o: c/c-array-notation.c c/c-lang.h $(CONFIG_H) \ - $(SYSTEM_H) coretypes.h $(TREE_H) $(C_TREE_H) $(TARGET_H) \ - intl.h output.h $(EXPR_H) langhooks.h tree-iterator.h $(BITMAP_H) \ - $(GIMPLE_H) c-family/c-objc.h -