Skip to content
Permalink
Browse files
Upgrade GCC baseline
https://bugs.webkit.org/show_bug.cgi?id=174155

Reviewed by Michael Catanzaro.

.:

This patch bumps the version of GCC from 4.9.0 to 5.0.0,
which is shipped with Ubuntu 16.04 LTS. And the latest
Debian stable (stretch) already ships newer GCC (6.3.0).
Remove workaround for old GCC. And move GCC version check
to the top-level CMakeLists.txt.

* CMakeLists.txt:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/WebKitHelpers.cmake:

Source/WebCore:

Remove workaround for old GCC.

* CMakeLists.txt:

Source/WTF:

* wtf/Compiler.h:

Canonical link: https://commits.webkit.org/191031@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219186 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Constellation committed Jul 6, 2017
1 parent 1a882d7 commit d4a9d9cfb7153dfee8fc4a513691d1374c0662b7
Showing 8 changed files with 45 additions and 19 deletions.
@@ -46,6 +46,12 @@ if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_CXX_COMPILER_ID} STREQU
set(COMPILER_IS_CLANG ON)
endif ()

if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
if (${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS "5.0.0")
message(FATAL_ERROR "GCC 5.0.0 is required to build WebKitGTK+, use a newer GCC version or clang")
endif ()
endif ()

if (CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANG)
set(COMPILER_IS_GCC_OR_CLANG ON)
endif ()
@@ -1,3 +1,20 @@
2017-07-05 Yusuke Suzuki <utatane.tea@gmail.com>

Upgrade GCC baseline
https://bugs.webkit.org/show_bug.cgi?id=174155

Reviewed by Michael Catanzaro.

This patch bumps the version of GCC from 4.9.0 to 5.0.0,
which is shipped with Ubuntu 16.04 LTS. And the latest
Debian stable (stretch) already ships newer GCC (6.3.0).
Remove workaround for old GCC. And move GCC version check
to the top-level CMakeLists.txt.

* CMakeLists.txt:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/WebKitHelpers.cmake:

2017-07-05 Don Olmstead <don.olmstead@sony.com>

[WinCairo] Consolidate CMake code related to CURL
@@ -1,3 +1,12 @@
2017-07-05 Yusuke Suzuki <utatane.tea@gmail.com>

Upgrade GCC baseline
https://bugs.webkit.org/show_bug.cgi?id=174155

Reviewed by Michael Catanzaro.

* wtf/Compiler.h:

2017-07-05 Yusuke Suzuki <utatane.tea@gmail.com>

WTF::StringImpl::copyChars segfaults when built with GCC 7
@@ -94,8 +94,8 @@
#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
#define GCC_VERSION_AT_LEAST(major, minor, patch) (GCC_VERSION >= (major * 10000 + minor * 100 + patch))

#if !GCC_VERSION_AT_LEAST(4, 9, 0)
#error "Please use a newer version of GCC. WebKit requires GCC 4.9.0 or newer to compile."
#if !GCC_VERSION_AT_LEAST(5, 0, 0)
#error "Please use a newer version of GCC. WebKit requires GCC 5.0.0 or newer to compile."
#endif

#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
@@ -4036,12 +4036,6 @@ if (SHARED_CORE)
install(TARGETS WebCore DESTINATION "${LIB_INSTALL_DIR}")
endif ()

# [ARM] Build SVGPathElement.cpp with -O2 due to a GCC bug
# https://bugs.webkit.org/show_bug.cgi?id=145377
if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND WTF_CPU_ARM AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.9") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9.3"))
set_source_files_properties(svg/SVGPathElement.cpp PROPERTIES COMPILE_FLAGS "-O2")
endif ()

if (MSVC)
set_target_properties(WebCore PROPERTIES
COMPILE_PDB_NAME ${WebCore_OUTPUT_NAME}
@@ -1,3 +1,14 @@
2017-07-05 Yusuke Suzuki <utatane.tea@gmail.com>

Upgrade GCC baseline
https://bugs.webkit.org/show_bug.cgi?id=174155

Reviewed by Michael Catanzaro.

Remove workaround for old GCC.

* CMakeLists.txt:

2017-07-05 Chris Dumez <cdumez@apple.com>

Unreviewed attempt to fix iOS build after r219177.
@@ -6,12 +6,6 @@ set(PROJECT_VERSION_MICRO 4)
set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_MICRO})
set(WEBKITGTK_API_VERSION 4.0)

if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9.0")
message(FATAL_ERROR "GCC 4.9.0 is required to build WebKitGTK+, use a newer GCC version or clang")
endif ()
endif ()

# Libtool library version, not to be confused with API version.
# See http://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html
CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(WEBKIT2 60 0 23)
@@ -22,11 +22,6 @@ macro(WEBKIT_SET_EXTRA_COMPILER_FLAGS _target)
set(OLD_COMPILE_FLAGS "-Wno-parentheses-equality ${OLD_COMPILE_FLAGS}")
endif ()

# Suppress -Wmissing-field-initializers due to a GCC bug, see https://bugs.webkit.org/show_bug.cgi?id=157888 for details.
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION MATCHES "4\\.9")
set(OLD_COMPILE_FLAGS "-Wno-missing-field-initializers ${OLD_COMPILE_FLAGS}")
endif ()

# Enable warnings by default
if (NOT ${OPTION_IGNORECXX_WARNINGS})
set(OLD_COMPILE_FLAGS "-Wall -Wextra -Wcast-align -Wformat-security -Wmissing-format-attribute -Wpointer-arith -Wundef -Wwrite-strings ${OLD_COMPILE_FLAGS}")

0 comments on commit d4a9d9c

Please sign in to comment.