version check (#2673)

This commit is contained in:
Matthew Kennedy 2021-05-09 17:26:53 -07:00 committed by GitHub
parent 5ba7577496
commit f0de0d8718
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View File

@ -11,6 +11,7 @@
#include "os_access.h"
#include "rusefi.h"
#include "mpu_util.h"
#include "version_check.h"
int main(void) {
/*

13
firmware/version_check.h Normal file
View File

@ -0,0 +1,13 @@
// This file asserts that the compiler is appropriate for rusEFI use.
#pragma once
// non-MCU builds are significantly more tolerant
#if EFI_PROD_CODE
static constexpr auto gccVersion = (__GNUC__ * 100) + (__GNUC_MINOR__ * 10) + ( __GNUC_PATCHLEVEL__ );
// Firmware builds require at least GCC 9.3.1
static_assert(gccVersion >= 931, "GCC compiler >= 9.3.1 required");
#endif