GCC: fix build error due to missing template keyword in GCC 12.

From GCC 12, the missing template keyword warning will break
build. As this warning is new in GCC 12, this change disables it for
that version or newer.

Bug: swiftshader:182
Change-Id: I27e766a0e62bee7a004f66b0b3c57afcd4df5a4b
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/71091
Commit-Queue: Shahbaz Youssefi <syoussefi@google.com>
Tested-by: Shahbaz Youssefi <syoussefi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@google.com>
diff --git a/third_party/llvm-10.0/CMakeLists.txt b/third_party/llvm-10.0/CMakeLists.txt
index 9f55d48..87a6aa8 100644
--- a/third_party/llvm-10.0/CMakeLists.txt
+++ b/third_party/llvm-10.0/CMakeLists.txt
@@ -1242,6 +1242,11 @@
             "-Wno-init-list-lifetime"  # assignment from temporary initializer_list does not extend the lifetime of the underlying array
         )
     endif()
+    if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12)
+        list(APPEND LLVM_COMPILE_OPTIONS
+            "-Wno-missing-template-keyword"
+        )
+    endif()
 elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
     list(APPEND LLVM_COMPILE_OPTIONS
         "/wd4141" # 'inline': used more than once