The t-arm make fragment currently uses 'mv' to update some files that are automatically regenerated, but this causes problems on read-only filesystems if the date stamps are incorrect and the files have not really changed. So use move-if-change instead.

        PR target/93548
        * config/arm/t-arm: ($(srcdir)/config/arm/arm-tune.md,
        $(srcdir)/config/arm/arm-tables.opt): Use move-if-change.
diff --git a/gcc/config/arm/t-arm b/gcc/config/arm/t-arm
index e8483d45688..b883f796956 100644
--- a/gcc/config/arm/t-arm
+++ b/gcc/config/arm/t-arm
@@ -70,13 +70,15 @@ $(srcdir)/config/arm/arm-tune.md: $(srcdir)/config/arm/parsecpu.awk \
 	$(srcdir)/config/arm/arm-cpus.in
 	$(AWK) -f $(srcdir)/config/arm/parsecpu.awk -v cmd=md \
 		$(srcdir)/config/arm/arm-cpus.in > arm-tune.new
-	mv arm-tune.new $(srcdir)/config/arm/arm-tune.md
+	$(srcdir)/../move-if-change arm-tune.new \
+				    $(srcdir)/config/arm/arm-tune.md
 
 $(srcdir)/config/arm/arm-tables.opt: $(srcdir)/config/arm/parsecpu.awk \
   $(srcdir)/config/arm/arm-cpus.in
 	$(AWK) -f $(srcdir)/config/arm/parsecpu.awk -v cmd=opt \
 		$(srcdir)/config/arm/arm-cpus.in > arm-tables.new
-	mv arm-tables.new $(srcdir)/config/arm/arm-tables.opt
+	$(srcdir)/../move-if-change arm-tables.new \
+				    $(srcdir)/config/arm/arm-tables.opt
 
 arm-cpu.h: s-arm-cpu ; @true
 s-arm-cpu: $(srcdir)/config/arm/parsecpu.awk \

Reply via email to