From patchwork Mon Apr 4 09:10:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 52608 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AB5D53858025 for ; Mon, 4 Apr 2022 09:11:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AB5D53858025 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1649063492; bh=DO6v2o9kmkCeeBJgEjfLF/+SokuLpsSuiiPTNIVUfP8=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=r85Zgggt7wiYZiXjpd/HHtIjvmHuE1sHeiZkIat2JMt7Zcpj/xs6GigvgkuDIyvAK eV/gI85xgrtC5oKSLAIJgyAL1TU1ofTcnsqLWsKIGo2ETZoOgpWyNvagsvv8KCNn/M Jr0gy695flBbAnxUO0m0A4A4pzfZ2/QNH4Xxvvxw= 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.129.124]) by sourceware.org (Postfix) with ESMTPS id D9ABD385800E for ; Mon, 4 Apr 2022 09:10:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D9ABD385800E Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-443-I0L08vPMPqu-AZ-thBeYEg-1; Mon, 04 Apr 2022 05:10:43 -0400 X-MC-Unique: I0L08vPMPqu-AZ-thBeYEg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DFF3A80379F; Mon, 4 Apr 2022 09:10:42 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.194.220]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 989D1C44CC1; Mon, 4 Apr 2022 09:10:42 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.16.1/8.16.1) with ESMTPS id 2349AdqT2052050 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 4 Apr 2022 11:10:39 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.16.1/8.16.1/Submit) id 2349AcRX2052049; Mon, 4 Apr 2022 11:10:38 +0200 Date: Mon, 4 Apr 2022 11:10:38 +0200 To: Richard Earnshaw , Richard Sandiford , Kyrylo Tkachov Subject: [PATCH] aarch64: Restrict aarch64-tune.md regeneration to --enable-maintainer-mode [PR105144] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, MEDICAL_SUBJECT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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 Cc: gcc-patches@gcc.gnu.org Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Hi! Normally updates to the source directory files are guarded with --enable-maintainer-mode, e.g. we don't regenerate configure, config.h, Makefile.in in directories that use automake etc. unless gcc is configured that way. Otherwise the source tree can't be e.g. stored on a read-only filesystem etc. In gcc/Makefile.in we use @MAINT@ for that but that works because gcc/Makefile is generated by configure. In config/*/t-* files we need to check $(ENABLE_MAINTAINER_RULES): # The following provides the variable ENABLE_MAINTAINER_RULES that can # be used in language Make-lang.in makefile fragments to enable # maintainer rules. So, ENABLE_MAINTAINER_RULES is 'true' in # maintainer mode, and '' otherwise. @MAINT@ ENABLE_MAINTAINER_RULES = true This is incremental patch does that, tested again on aarch64-linux and x86_64-linux (cross in that case), ok for trunk? 2022-04-04 Jakub Jelinek PR target/105144 * config/aarch64/t-aarch64 ($(srcdir)/config/aarch64/aarch64-tune.md, s-aarch64-tune-md, s-mddeps): Only enable the rules if $(ENABLE_MAINTAINER_RULES) is non-empty. Jakub --- gcc/config/aarch64/t-aarch64.jj 2022-04-04 10:14:30.256323070 +0200 +++ gcc/config/aarch64/t-aarch64 2022-04-04 10:32:55.591651822 +0200 @@ -24,6 +24,7 @@ OPTIONS_H_EXTRA += $(srcdir)/config/aarc $(srcdir)/config/aarch64/aarch64-fusion-pairs.def \ $(srcdir)/config/aarch64/aarch64-tuning-flags.def +ifneq ($(strip $(ENABLE_MAINTAINER_RULES)),) $(srcdir)/config/aarch64/aarch64-tune.md: s-aarch64-tune-md; @true s-aarch64-tune-md: $(srcdir)/config/aarch64/gentune.sh \ $(srcdir)/config/aarch64/aarch64-cores.def @@ -35,6 +36,7 @@ s-aarch64-tune-md: $(srcdir)/config/aarc $(STAMP) s-aarch64-tune-md s-mddeps: s-aarch64-tune-md +endif aarch64-builtins.o: $(srcdir)/config/aarch64/aarch64-builtins.cc $(CONFIG_H) \ $(SYSTEM_H) coretypes.h $(TM_H) \