WebKit Bugzilla
Attachment 340248 Details for
Bug 182622
: [CMake] Properly detect compiler flags, needed libs, and fallbacks for usage of 64-bit atomic operations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for WebKitGTK+ 2.20.2
182622.patch (text/plain), 1.93 KB, created by
Alberto Garcia
on 2018-05-12 04:10:02 PDT
(
hide
)
Description:
Patch for WebKitGTK+ 2.20.2
Filename:
MIME Type:
Creator:
Alberto Garcia
Created:
2018-05-12 04:10:02 PDT
Size:
1.93 KB
patch
obsolete
>diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt >index 94036df9213..d3d8c841c1e 100644 >--- a/Source/JavaScriptCore/CMakeLists.txt >+++ b/Source/JavaScriptCore/CMakeLists.txt >@@ -116,15 +116,15 @@ set(JavaScriptCore_LIBRARIES > ${LLVM_LIBRARIES} > ) > >-# Since r228149, on MIPS we need to link with -latomic, because >-# __atomic_fetch_add_8 is not available as a compiler intrinsic. It is >-# available on other platforms (including 32-bit Arm), so the link with >-# libatomic is only neede on MIPS. >-if (WTF_CPU_MIPS) >- list(APPEND JavaScriptCore_LIBRARIES >- -latomic >- ) >+file(WRITE ${CMAKE_BINARY_DIR}/test_atomics.cpp >+ "int main(void)\n" >+ "{ long long x = 1; return (int) __atomic_fetch_add_8(&x, 1, 1); }\n") >+try_compile(ATOMICS_BUILD_SUCCEEDED ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/test_atomics.cpp) >+message(STATUS "Found __atomic_fetch_add_8(): ${ATOMICS_BUILD_SUCCEEDED}") >+if (NOT ATOMICS_BUILD_SUCCEEDED) >+ list(APPEND JavaScriptCore_LIBRARIES -latomic) > endif () >+file(REMOVE ${CMAKE_BINARY_DIR}/test_atomics.cpp) > > set(JavaScriptCore_SCRIPTS_SOURCES_DIR "${JAVASCRIPTCORE_DIR}/Scripts") > >diff --git a/Source/WTF/wtf/CMakeLists.txt b/Source/WTF/wtf/CMakeLists.txt >index 220bafd348b..f907cd4c760 100644 >--- a/Source/WTF/wtf/CMakeLists.txt >+++ b/Source/WTF/wtf/CMakeLists.txt >@@ -315,7 +315,6 @@ set(WTF_HEADERS > > set(WTF_SOURCES > Assertions.cpp >- Atomics.cpp > AutomaticThread.cpp > BitVector.cpp > CPUTime.cpp >diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake >index 7b27c71897b..98085d54793 100644 >--- a/Source/cmake/OptionsGTK.cmake >+++ b/Source/cmake/OptionsGTK.cmake >@@ -32,6 +32,7 @@ find_package(LibSoup 2.42.0 REQUIRED) > find_package(LibXml2 2.8.0 REQUIRED) > find_package(PNG REQUIRED) > find_package(Sqlite REQUIRED) >+set(THREADS_PREFER_PTHREAD_FLAG ON) > find_package(Threads REQUIRED) > find_package(ZLIB REQUIRED) > find_package(ATK REQUIRED)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 182622
:
340248
|
340404
|
340430
|
340473
|
340490
|
340984