Fix the detection of toolchain support for Cortex-A53 erratum 835769 workaround
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Nov 2014 09:06:30 +0000 (09:06 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Nov 2014 09:06:30 +0000 (09:06 +0000)
https://bugs.webkit.org/show_bug.cgi?id=138840

Patch by Akos Kiss <akiss@inf.u-szeged.hu> on 2014-11-19
Reviewed by Csaba Osztrogonác.

* Source/cmake/OptionsCommon.cmake:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@176314 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
Source/cmake/OptionsCommon.cmake

index f652160..888ceed 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2014-11-19  Akos Kiss  <akiss@inf.u-szeged.hu>
+
+        Fix the detection of toolchain support for Cortex-A53 erratum 835769 workaround
+        https://bugs.webkit.org/show_bug.cgi?id=138840
+
+        Reviewed by Csaba Osztrogonác.
+
+        * Source/cmake/OptionsCommon.cmake:
+
 2014-11-13  Csaba Osztrogonác  <ossy@webkit.org>
 
         Remove Source/Platform cruft
index 045fdcf..c76aa90 100644 (file)
@@ -51,13 +51,12 @@ if (WTF_CPU_ARM64_CORTEXA53)
     if (NOT WTF_CPU_ARM64)
         message(FATAL_ERROR "WTF_CPU_ARM64_CORTEXA53 set without WTF_CPU_ARM64")
     endif ()
-    message("Checking if compiler supports -mfix-cortex-a53-835769")
-    execute_process(COMMAND ${CMAKE_C_COMPILER} -mfix-cortex-a53-835769 ERROR_VARIABLE COMPILER_OUTPUT)
-    if ((NOT "${COMPILER_OUTPUT}" MATCHES "unrecognized command line option")
-        AND (NOT "${COMPILER_OUTPUT}" MATCHES "unknown argument"))
+    include(TestCXXAcceptsFlag)
+    CHECK_CXX_ACCEPTS_FLAG(-mfix-cortex-a53-835769 CXX_ACCEPTS_MFIX_CORTEX_A53_835769)
+    if (CXX_ACCEPTS_MFIX_CORTEX_A53_835769)
         set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfix-cortex-a53-835769")
         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfix-cortex-a53-835769")
-        message("Enabling Cortex-A53 workaround for compiler")
+        message(STATUS "Enabling Cortex-A53 workaround for compiler")
     endif ()
 endif ()