+# Note [fiddle-stage1-version]
+# The version of the GHC package changes every day, since the
+# patchlevel is the current date. We don't want to force
+# recompilation of the entire compiler when this happens, so for stage
+# 1 we omit the patchlevel from the version number. For stage 2 we
+# have to include the patchlevel since this is the package we install,
+# however.
+#
+# Note: we also have to tweak the version number of the package itself
+# when it gets registered; see Note [munge-stage1-package-config]
+# below.
+ifneq "$(ProjectPatchLevel)" "0"
+define compiler_PACKAGE_MAGIC
+compiler_stage1_VERSION = $(subst .$(ProjectPatchLevel),,$(ProjectVersion))
+endef
+endif
+