From patchwork Thu Apr 6 09:45:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 80161 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp895523vqo; Thu, 6 Apr 2023 02:47:11 -0700 (PDT) X-Google-Smtp-Source: AKy350anWfn/5B/Ja3q+JGiMOjUpjTnYsYJ8H1NgywsXGwO0Tc7rwgtSS/CChjpiY3IBxKdFxX+u X-Received: by 2002:a17:906:78e:b0:947:72bd:f72a with SMTP id l14-20020a170906078e00b0094772bdf72amr5339901ejc.72.1680774431389; Thu, 06 Apr 2023 02:47:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680774431; cv=none; d=google.com; s=arc-20160816; b=modMKUGpZx0YjX1Yr42Eqs6vEl3CvZCe0OvVLDG/KvnCExeBO1DYm7Zfdb/gMUgNc4 c2hq+mFJlneeeWSipOzCgLyT2qhSwFqySGRf9yhYKtWkeTp3jg6N24eqk6/VGgq201Hd ZsUezA76/G3NL9AvVBuDLc0sug+JfY4mHiGpXhKtCx+XyozSPbPP5USJ6xjEv/60WdNE iwPwqD4GO2GdjrtybZpRc2fJAkIsWTwlv/7Ij0mUgyVqktK061ZSgpOItJxoFZ6cFYm7 GUm/Kl6WGgtHFfe1Qrg1m4WRb2HU3AhdTuxzAIXugFlqaI5i+T5jIK26eCjnGHUqt0bE fvzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:cc:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=NmsnOQr0p0jxOzhDPzfpspjpsBhBHj0BAGtAPbiw+gE=; b=HZmwBPMnr1ycNl+3Jw8HYjyo9bEvQsBJf5RXL2iw16eXegcKWqsJc5ghcLH/j8pOWo XD7UFmzjr/+RITq6SJHX3Yj7E3m1w+3zo1qZ1ruV1CNyo9cEWwFb5JwUhfNiTtom28Ud tFMKD5ijLWkaCZSZQeMBwkmpBt4KOwRw9TbeAi1RyNBibKBOSJDNCWRlaJKNQb0xr4eP UmGyviTPduGZ2yq0fvJfUdWWKWMdD1xHc1p0t3f+obgE6kO2yT67vSB3189APO5mVy67 rrDpawQ46cG41jBWoaqA7Pcs0XZhFCx0vfCKU2LT27ssgUR7qEWzth3I6gcELvD3J1ky O2Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=buY7HzKl; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id gm1-20020a1709073d0100b00931ebd43e82si889451ejc.628.2023.04.06.02.47.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 02:47:11 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=buY7HzKl; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 483213858431 for ; Thu, 6 Apr 2023 09:47:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 483213858431 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680774430; bh=NmsnOQr0p0jxOzhDPzfpspjpsBhBHj0BAGtAPbiw+gE=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=buY7HzKlAXYPC4D5NAStkNbkwCZ9XMLQZsbBDAlayZkE8Cg65GP2Q/80lcJx7q+G6 txQqRVnucQ4jKnF4XFEw0LsXcJ8yciNWWAAw6RXvfksoW1UUyDgzOhiGFuv4MxZNxT yftP5KT9k2fNt6lgpwX33KhU2ZmaOadV7hy2Gj3g= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id E8B6C3858291 for ; Thu, 6 Apr 2023 09:45:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E8B6C3858291 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-98-l2DZM7SkOyyxjpBXJLqjXA-1; Thu, 06 Apr 2023 05:45:53 -0400 X-MC-Unique: l2DZM7SkOyyxjpBXJLqjXA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C4ACC2A5954E; Thu, 6 Apr 2023 09:45:52 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 87D4C40C20FA; Thu, 6 Apr 2023 09:45:52 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 3369joFW3992932 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 6 Apr 2023 11:45:50 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 3369jnjN3992931; Thu, 6 Apr 2023 11:45:49 +0200 Date: Thu, 6 Apr 2023 11:45:49 +0200 To: Jeff Law Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] riscv: Fix genrvv-type-indexer dependencies Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762419730297806670?= X-GMAIL-MSGID: =?utf-8?q?1762419730297806670?= Hi! I've noticed make: Circular build/genrvv-type-indexer.o <- gtype-desc.h dependency dropped. The following patch fixes that. The RTL_BASE_H variable includes a lot of headers which the generator doesn't include, including gtype-desc.h. I've preprocessed it and checked all gcc/libiberty headers against what is included in the other dependency variables and here is what I found: 1) coretypes.h includes align.h, poly-int.h and poly-int-types.h which weren't listed (most of dependencies are thankfully done automatically, so it isn't that big deal except for these generators and the like) 2) system.h includes filenames.h (already listed) but filenames.h includes hashtab.h; instead of adding FILENAMES_H I've just added the dependency to SYSTEM_H 3) $(RTL_BASE_H) wasn't really needed at all and insn-modes.h is already included in $(CORETYPES_H) I'll bootstrap/regtest this on x86_64-linux tonight, ok for trunk? 2023-04-06 Jakub Jelinek * Makefile.in (CORETYPES_H): Depend on align.h, poly-int.h and poly-int-types.h. (SYSTEM_H): Depend on $(HASHTAB_H). * config/riscv/t-riscv (build/genrvv-type-indexer.o): Remove unused dependency on $(RTL_BASE_H), remove redundant dependency on insn-modes.h. Jakub --- gcc/Makefile.in.jj 2023-03-21 11:04:19.034831460 +0100 +++ gcc/Makefile.in 2023-04-06 10:55:58.457207062 +0200 @@ -945,7 +945,8 @@ TARGET_DEF_H = target-def.h target-hooks C_TARGET_DEF_H = c-family/c-target-def.h c-family/c-target-hooks-def.h \ $(TREE_H) $(C_COMMON_H) $(HOOKS_H) common/common-targhooks.h CORETYPES_H = coretypes.h insn-modes.h signop.h wide-int.h wide-int-print.h \ - insn-modes-inline.h $(MACHMODE_H) double-int.h + insn-modes-inline.h $(MACHMODE_H) double-int.h align.h poly-int.h \ + poly-int-types.h RTL_BASE_H = $(CORETYPES_H) rtl.h rtl.def reg-notes.def \ insn-notes.def $(INPUT_H) $(REAL_H) statistics.h $(VEC_H) \ $(FIXED_VALUE_H) alias.h $(HASHTAB_H) @@ -998,7 +999,8 @@ C_COMMON_H = c-family/c-common.h c-famil C_PRAGMA_H = c-family/c-pragma.h $(CPPLIB_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 + $(srcdir)/../include/safe-ctype.h $(srcdir)/../include/filenames.h \ + $(HASHTAB_H) PREDICT_H = predict.h predict.def CPPLIB_H = $(srcdir)/../libcpp/include/line-map.h \ $(srcdir)/../libcpp/include/cpplib.h --- gcc/config/riscv/t-riscv.jj 2023-03-31 09:26:47.996219555 +0200 +++ gcc/config/riscv/t-riscv 2023-04-06 10:56:48.166479250 +0200 @@ -102,8 +102,8 @@ $(common_out_file): $(srcdir)/config/ris $(srcdir)/config/riscv/riscv-protos.h \ $(srcdir)/config/riscv/riscv-subset.h -build/genrvv-type-indexer.o: $(srcdir)/config/riscv/genrvv-type-indexer.cc $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \ - $(CORETYPES_H) $(GTM_H) errors.h $(GENSUPPORT_H) insn-modes.h +build/genrvv-type-indexer.o: $(srcdir)/config/riscv/genrvv-type-indexer.cc $(BCONFIG_H) $(SYSTEM_H) \ + $(CORETYPES_H) $(GTM_H) errors.h $(GENSUPPORT_H) build/genrvv-type-indexer$(build_exeext): build/genrvv-type-indexer.o +$(LINKER_FOR_BUILD) $(BUILD_LINKERFLAGS) $(BUILD_LDFLAGS) -o $@ \