From 86380bb177b9e18e345bc302efb3a84b2c5758a9 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Wed, 15 Dec 2010 20:55:10 +0100 Subject: VWR-24254: Add support for using ld.gold on linux. To use ld.gold configure with: -DCMAKE_EXE_LINKER_FLAGS:STRING="-Wl,-use-gold". ld.gold links the viewer on my machine in 8 seconds, as opposed to 19 seconds with ld.bfd. Moreover, it uses a LOT less memory during linking (about 750 MB instead of 2.5 GB!). VWR-24254: Don't link with fontconfig on non-linux. While we already added fontconfig in the above patch, that code turned out to also be used by Windows and Darwin (contrary to the comments in the code). After looking at the history of commits and a discussion on IRC it was decided that the original coder (Kyle Ambroff ) really meant (LINUX AND VIEWER) instead of (NOT LINUX OR VIEWER). --- indra/cmake/BerkeleyDB.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/cmake/BerkeleyDB.cmake') diff --git a/indra/cmake/BerkeleyDB.cmake b/indra/cmake/BerkeleyDB.cmake index d98e79179d..e3ca0fd77d 100644 --- a/indra/cmake/BerkeleyDB.cmake +++ b/indra/cmake/BerkeleyDB.cmake @@ -6,6 +6,11 @@ set(DB_FIND_REQUIRED ON) if (STANDALONE) include(FindBerkeleyDB) else (STANDALONE) - set(DB_LIBRARIES db-4.2) + if (LINUX) + # Need to add dependency pthread explicitely to support ld.gold. + set(DB_LIBRARIES db-4.2 pthread) + else (LINUX) + set(DB_LIBRARIES db-4.2) + endif (LINUX) set(DB_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) endif (STANDALONE) -- cgit v1.2.3