toolchain/gcc: Fix GCC version check
authorHauke Mehrtens <hauke@hauke-m.de>
Mon, 19 Dec 2022 23:58:19 +0000 (00:58 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 8 Jan 2023 23:23:41 +0000 (00:23 +0100)
The version check which sets GCC_VERSION_FILE to the correct value only
worked when the advanced options menu was active and not when it was not
active.

Thank you Tony Butler for the fix.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
toolchain/gcc/common.mk

index 6661b0aa38dfc73f041a1f9490395991370237e1..ea2e2634b69ddf69b1ab7255b562f7ca962be2ae 100644 (file)
@@ -178,7 +178,7 @@ define Host/SetToolchainInfo
 endef
 
 
-ifdef CONFIG_GCC_USE_VERSION_12
+ifeq ($(GCC_MAJOR_VERSION),12)
        GCC_VERSION_FILE:=gcc/genversion.cc
 else
        GCC_VERSION_FILE:=gcc/version.c