Adding includes to module.cc triggered the kind of build failure I
wanted to check for. In this case it was MODULE_VERSION not being
defined, and module.cc's internal #error triggering. I've relaxed the
check in Make-lang, so we proviude MODULE_VERSION when DEVPHASE is not
empty (rather than when it is 'experimental'). AFAICT devphase is
empty for release builds, and the #error will force us to decide
whether modules is sufficiently baked at that point.
gcc/cp
* Make-lang.in (MODULE_VERSION): Override when DEVPHASE not empty.
* module.cc: Comment.
CFLAGS-cp/module.o += -DHOST_MACHINE=\"$(host)\" \
-DTARGET_MACHINE=\"$(target)\"
-ifeq ($(DEVPHASE_c),experimental)
+# In non-release builds, use a date-related module version.
+ifneq ($(DEVPHASE_c),)
# Some date's don't grok 'r', if so, simply use today's
# date (don't bootstrap at midnight).
MODULE_VERSION := $(shell date -r $(srcdir)/cp/module.cc '+%y%m%d-%H%M' \
#define MODULE_MINOR(V) ((V) % 10000)
#define EXPERIMENT(A,B) (IS_EXPERIMENTAL (MODULE_VERSION) ? (A) : (B))
#ifndef MODULE_VERSION
+// Be sure you're ready! Remove #error this before release!
#error "Shtopp! What are you doing? This is not ready yet."
#include "bversion.h"
#define MODULE_VERSION (BUILDING_GCC_MAJOR * 10000U + BUILDING_GCC_MINOR)