diff options
author | Jack Lloyd <[email protected]> | 2020-11-29 14:42:59 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2020-11-29 14:42:59 -0500 |
commit | 378072eac558b5ac1f726fe9ee37459d10eac04a (patch) | |
tree | c48421a87b71f14ecbd3e1506e34ae447574189e /configure.py | |
parent | 96be66f0a26298e029321ecd4b5ff63b6070ee29 (diff) |
Tighten up the check on feature macro datestamps
Should be YYYYMMDD make some attempt to check this.
Diffstat (limited to 'configure.py')
-rwxr-xr-x | configure.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/configure.py b/configure.py index c9eedda79..f856630f3 100755 --- a/configure.py +++ b/configure.py @@ -900,7 +900,14 @@ class ModuleInfo(InfoObject): if not re.match('^[0-9A-Za-z_]{3,30}$', key): raise InternalError('Module defines key has invalid format: "%s"' % key) if not re.match('^20[0-9]{6}$', value): - raise InternalError('Module defines value has invalid format: "%s"' % value) + raise InternalError('Module defines value has invalid format: "%s" (should be YYYYMMDD)' % value) + + year = int(value[0:4]) + month = int(value[4:6]) + day = int(value[6:]) + + if year < 2013 or month == 0 or month > 12 or day == 0 or day > 31: + raise InternalError('Module defines value has invalid format: "%s" (should be YYYYMMDD)' % value) def cross_check(self, arch_info, cc_info, all_os_features, all_isa_extn): |