From: Markus Koschany <apo@debian.org>
Date: Sat, 24 Sep 2022 20:24:57 +0200
Subject: gold linker

---
 rts/build/cmake/TestCXXFlags.cmake | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/rts/build/cmake/TestCXXFlags.cmake b/rts/build/cmake/TestCXXFlags.cmake
index 6d6fb4d..0d97810 100644
--- a/rts/build/cmake/TestCXXFlags.cmake
+++ b/rts/build/cmake/TestCXXFlags.cmake
@@ -143,22 +143,10 @@ if (CMAKE_COMPILER_IS_GNUCXX)
 	)
 	set(hasGold FALSE)
 	if ("${linkerVersion}" MATCHES "gold")
-		set(hasGold TRUE)
+        set(hasGold FALSE)
 	endif ()
 
 
-	if (NOT hasGold AND NOT WIN32) #FIND_PROGRAM fails in crosscompile environments (it detects the native ld.gold)
-		# since gcc 4.8 it is possible to switch the linker via that argument
-		check_cxx_accepts_flag("-fuse-ld=gold" HAS_USE_LD)
-		if (HAS_USE_LD)
-			find_program(LD_GOLD ld.gold)
-			if (LD_GOLD)
-				set(hasGold TRUE)
-				set(LDGOLD_CXX_FLAGS "-fuse-ld=gold")
-			endif ()
-		endif ()
-	endif ()
-
 	if (hasGold)
 		set(LDGOLD_FOUND TRUE)
 		set(LDGOLD_LINKER_FLAGS "")
