public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] aarch64: Restrict aarch64-tune.md regeneration to --enable-maintainer-mode [PR105144]
@ 2022-04-04  9:10 Jakub Jelinek
  2022-04-04 10:10 ` Richard Sandiford
  0 siblings, 1 reply; 6+ messages in thread
From: Jakub Jelinek @ 2022-04-04  9:10 UTC (permalink / raw)
  To: Richard Earnshaw, Richard Sandiford, Kyrylo Tkachov; +Cc: 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  <jakub@redhat.com>

	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.

--- 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) \

	Jakub


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-04-04 12:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-04  9:10 [PATCH] aarch64: Restrict aarch64-tune.md regeneration to --enable-maintainer-mode [PR105144] Jakub Jelinek
2022-04-04 10:10 ` Richard Sandiford
2022-04-04 10:49   ` Jakub Jelinek
2022-04-04 11:32     ` Richard Earnshaw
2022-04-04 12:12       ` Jakub Jelinek
2022-04-04 12:20         ` Richard Earnshaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).