diff --git a/doc/contributions.txt b/doc/contributions.txt
index 516760aa5a6ee15e4c97dee6a06ada3d5d4a4456..4377a83b336a95a3a927869d4a55112357001e28 100644
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -86,6 +86,7 @@ Aleric Inglewood
 	VWR-24320
     VWR-24321
  	VWR-24354
+	VWR-24366
 	VWR-24519
 	SNOW-84
 	SNOW-477
diff --git a/indra/cmake/GoogleMock.cmake b/indra/cmake/GoogleMock.cmake
index ca5a8034ba442082c5881ec4c046ebe4b7a777e9..06d6d847a05b82bb96b6ef3a0bf859d9b89fa0cb 100644
--- a/indra/cmake/GoogleMock.cmake
+++ b/indra/cmake/GoogleMock.cmake
@@ -8,9 +8,10 @@ set(GOOGLEMOCK_INCLUDE_DIRS
     ${LIBS_PREBUILT_DIR}/include)
 
 if (LINUX)
+	# VWR-24366: gmock is underlinked, it needs gtest.
     set(GOOGLEMOCK_LIBRARIES 
-        gmock  
-        gtest)
+        gmock -Wl,--no-as-needed
+        gtest -Wl,--as-needed)
 elseif(WINDOWS)
     set(GOOGLEMOCK_LIBRARIES 
         gmock)
diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake
index 05f0492234f059146f38ef586295707ef3456cff..cd0eada2d0dbddc0fa804cfe04731cd2bdff1b45 100644
--- a/indra/cmake/LLAddBuildTest.cmake
+++ b/indra/cmake/LLAddBuildTest.cmake
@@ -57,11 +57,6 @@ INCLUDE(GoogleMock)
     ${CMAKE_SOURCE_DIR}/test/test.h
     )
 
-  # Use the default flags
-  if (LINUX)
-    SET(CMAKE_EXE_LINKER_FLAGS "")
-  endif (LINUX)
-
   # start the source test executable definitions
   SET(${project}_TEST_OUTPUT "")
   FOREACH (source ${sources})