aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmake/EthCompilerSettings.cmake45
-rwxr-xr-xscripts/release_ppa.sh16
2 files changed, 25 insertions, 36 deletions
diff --git a/cmake/EthCompilerSettings.cmake b/cmake/EthCompilerSettings.cmake
index 9b294e27..117dd319 100644
--- a/cmake/EthCompilerSettings.cmake
+++ b/cmake/EthCompilerSettings.cmake
@@ -22,6 +22,18 @@ if(CCACHE_FOUND)
message("Using ccache")
endif(CCACHE_FOUND)
+include(CheckCXXCompilerFlag)
+
+check_cxx_compiler_flag(-fstack-protector-strong have_stack_protector_strong)
+if (have_stack_protector_strong)
+ add_compile_options(-fstack-protector-strong)
+else()
+ check_cxx_compiler_flag(-fstack-protector have_stack_protector)
+ if(have_stack_protector)
+ add_compile_options(-fstack-protector)
+ endif()
+endif()
+
if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))
# Use ISO C++11 standard language.
@@ -79,14 +91,6 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
message(FATAL_ERROR "${PROJECT_NAME} requires g++ 4.7 or greater.")
endif ()
- # Strong stack protection was only added in GCC 4.9.
- # Use it if we have the option to do so.
- # See https://lwn.net/Articles/584225/
- if (GCC_VERSION VERSION_GREATER 4.9 OR GCC_VERSION VERSION_EQUAL 4.9)
- add_compile_options(-fstack-protector-strong)
- add_compile_options(-fstack-protector)
- endif()
-
# Until https://github.com/ethereum/solidity/issues/2479 is handled
# disable all implicit fallthrough warnings in the codebase for GCC > 7.0
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
@@ -96,31 +100,6 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
# Additional Clang-specific compiler settings.
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
- add_compile_options(-fstack-protector)
-
- # Enable strong stack protection only on Mac and only for OS X Yosemite
- # or newer (AppleClang 7.0+). We should be able to re-enable this setting
- # on non-Apple Clang as well, if we can work out what expression to use for
- # the version detection.
-
- # The fact that the version-reporting for AppleClang loses the original
- # Clang versioning is rather annoying. Ideally we could just have
- # a single cross-platform "if version >= 3.4.1" check.
- #
- # There is debug text in the else clause below, to help us work out what
- # such an expression should be, if we can get this running on a Trusty box
- # with Clang. Greg Colvin previously replicated the issue there too.
- #
- # See https://github.com/ethereum/webthree-umbrella/issues/594
-
- if (APPLE)
- if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0 OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
- add_compile_options(-fstack-protector-strong)
- endif()
- else()
- message(WARNING "CMAKE_CXX_COMPILER_VERSION = ${CMAKE_CXX_COMPILER_VERSION}")
- endif()
-
# A couple of extra warnings suppressions which we seemingly
# need when building with Clang.
#
diff --git a/scripts/release_ppa.sh b/scripts/release_ppa.sh
index 4fae90ef..cb3519b0 100755
--- a/scripts/release_ppa.sh
+++ b/scripts/release_ppa.sh
@@ -54,14 +54,24 @@ keyid=703F83D0
email=builds@ethereum.org
packagename=solc
-for distribution in trusty vivid xenial yakkety zesty
+for distribution in trusty vivid xenial zesty
do
cd /tmp/
+rm -rf $distribution
mkdir $distribution
cd $distribution
+# Dependency
+if [ $distribution = trusty -o $distribution = vivid ]
+then
+ Z3DEPENDENCY=""
+else
+ Z3DEPENDENCY="libz3-dev,
+ "
+fi
+
# Fetch source
-git clone --recursive https://github.com/ethereum/solidity.git -b "$branch"
+git clone --depth 2 --recursive https://github.com/ethereum/solidity.git -b "$branch"
mv solidity solc
# Fetch jsoncpp dependency
@@ -102,7 +112,7 @@ Source: solc
Section: science
Priority: extra
Maintainer: Christian (Buildserver key) <builds@ethereum.org>
-Build-Depends: debhelper (>= 9.0.0),
+Build-Depends: ${Z3DEPENDENCY}debhelper (>= 9.0.0),
cmake,
g++-4.8,
git,