From 32e39f7d8f2d6eedda33d9c771cd7321a64d0e28 Mon Sep 17 00:00:00 2001 From: Wetitpig Date: Mon, 10 Aug 2020 07:55:26 +0800 Subject: [PATCH] Use gold linker --- packages/solidity/EthCompilerSettings.cmake.patch | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/solidity/EthCompilerSettings.cmake.patch b/packages/solidity/EthCompilerSettings.cmake.patch index 7d62f3d68..f86320580 100644 --- a/packages/solidity/EthCompilerSettings.cmake.patch +++ b/packages/solidity/EthCompilerSettings.cmake.patch @@ -1,5 +1,5 @@ diff --git a/cmake/EthCompilerSettings.cmake b/cmake/EthCompilerSettings.cmake -index 3bcdad47b..e7d2a82b8 100644 +index 3bcdad47b..0c288288f 100644 --- a/cmake/EthCompilerSettings.cmake +++ b/cmake/EthCompilerSettings.cmake @@ -46,7 +46,6 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA @@ -10,3 +10,14 @@ index 3bcdad47b..e7d2a82b8 100644 add_compile_options(-pedantic) add_compile_options(-Wno-unknown-pragmas) add_compile_options(-Wimplicit-fallthrough) +@@ -208,9 +207,6 @@ option(USE_CVC4 "Allow compiling with CVC4 SMT solver integration" ON) + if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")) + option(USE_LD_GOLD "Use GNU gold linker" ON) + if (USE_LD_GOLD) +- execute_process(COMMAND ${CMAKE_CXX_COMPILER} -fuse-ld=gold -Wl,--version ERROR_QUIET OUTPUT_VARIABLE LD_VERSION) +- if ("${LD_VERSION}" MATCHES "GNU gold") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold") +- endif () ++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold") + endif () + endif ()