diff --git a/autobuild.xml b/autobuild.xml
index 8c813bef5717a21591147429ba72623330c94eab..a01704cc3703901544502632ed26d2a5e98f68f5 100755
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -1358,11 +1358,11 @@
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>a6c3e60653a3e2714583390cf0524a07</string>
+              <string>c6e45120273752f6200ea2e87db5ffea</string>
               <key>hash_algorithm</key>
               <string>md5</string>
               <key>url</key>
-              <string>http://depot.alchemyviewer.org/pub/linux64/lib/googlemock-1.7.0-linux64-201501032003.tar.bz2</string>
+              <string>http://depot.alchemyviewer.org/pub/linux64/lib/googlemock-1.7.0-linux64-201504231410.tar.bz2</string>
             </map>
             <key>name</key>
             <string>linux64</string>
@@ -2510,11 +2510,11 @@
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>13c952a1b2dd61d214ecf79fa70a90fe</string>
+              <string>f008ca71683ebbb7cc8b2f5e694b1697</string>
               <key>hash_algorithm</key>
               <string>md5</string>
               <key>url</key>
-              <string>http://depot.alchemyviewer.org/pub/linux64/lib/llqtwebkit-4.8.6-linux64-201501031811.tar.bz2</string>
+              <string>http://depot.alchemyviewer.org/pub/linux64/lib/llqtwebkit-4.8.6-linux64-201504231429.tar.bz2</string>
             </map>
             <key>name</key>
             <string>linux64</string>
@@ -3037,90 +3037,6 @@
         <key>version</key>
         <string>1.0.1m</string>
       </map>
-      <key>pcre</key>
-      <map>
-        <key>copyright</key>
-        <string>Copyright (c) 1997-2014 University of Cambridge; Copyright(c) 2009-2014 Zoltan Herczeg; Copyright (c) 2007-2012, Google Inc.</string>
-        <key>description</key>
-        <string>PCRE Perl-compatible regular expression library</string>
-        <key>license</key>
-        <string>BSD</string>
-        <key>license_file</key>
-        <string>LICENSES/pcre.txt</string>
-        <key>name</key>
-        <string>pcre</string>
-        <key>platforms</key>
-        <map>
-          <key>darwin</key>
-          <map>
-            <key>archive</key>
-            <map>
-              <key>hash</key>
-              <string>e4bcc671f386b97d26938b1a442c84ab</string>
-              <key>hash_algorithm</key>
-              <string>md5</string>
-              <key>url</key>
-              <string>https://bitbucket.org/alchemyviewer/publiclibs-darwin2/downloads/pcre-8.36-darwin-201501011107.tar.bz2</string>
-            </map>
-            <key>name</key>
-            <string>darwin</string>
-          </map>
-          <key>linux</key>
-          <map>
-            <key>archive</key>
-            <map>
-              <key>hash</key>
-              <string>5e6368d39b95f2c0d5162dac2c17c67f</string>
-              <key>url</key>
-              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3pl_3p-pcre-update/rev/290406/arch/Linux/installer/pcre-8.35-linux-20140530.tar.bz2</string>
-            </map>
-            <key>name</key>
-            <string>linux</string>
-          </map>
-          <key>linux64</key>
-          <map>
-            <key>archive</key>
-            <map>
-              <key>hash</key>
-              <string>a9dc6b77957573e7c13385034d9f3822</string>
-              <key>hash_algorithm</key>
-              <string>md5</string>
-              <key>url</key>
-              <string>http://depot.alchemyviewer.org/pub/linux64/lib/pcre-8.36-linux64-201501030107.tar.bz2</string>
-            </map>
-            <key>name</key>
-            <string>linux64</string>
-          </map>
-          <key>windows</key>
-          <map>
-            <key>archive</key>
-            <map>
-              <key>hash</key>
-              <string>c7c98dccb566375fc66330a1784606b2</string>
-              <key>url</key>
-              <string>https://bitbucket.org/alchemyviewer/publiclibs-vs12/downloads/pcre-8.36-windows-20141016.tar.bz2</string>
-            </map>
-            <key>name</key>
-            <string>windows</string>
-          </map>
-          <key>windows64</key>
-          <map>
-            <key>archive</key>
-            <map>
-              <key>hash</key>
-              <string>5ab629c0fa68794bb8780d54d90e93b9</string>
-              <key>hash_algorithm</key>
-              <string>md5</string>
-              <key>url</key>
-              <string>http://depot.alchemyviewer.org/pub/windows/lib/pcre-8.36-windows64-201501010019.tar.bz2</string>
-            </map>
-            <key>name</key>
-            <string>windows64</string>
-          </map>
-        </map>
-        <key>version</key>
-        <string>8.36</string>
-      </map>
       <key>quicktime</key>
       <map>
         <key>license</key>
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index df88d5e69aedf18201a353723f0d8f87fddff38b..3c45e4dc5b9ee150621e0e3c4bc5e4c257ff3a1d 100755
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -5,6 +5,7 @@
 if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
 set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
 
+include(CheckCCompilerFlag)
 include(Variables)
 
 # Portable compilation flags.
@@ -118,10 +119,25 @@ if (LINUX)
       -D_REENTRANT
       -fvisibility=hidden
       -fexceptions
+      -fno-math-errno
+      -fno-strict-aliasing
+      -fsigned-char
+      -std=gnu++11
       -g
       -pthread
       )
 
+  CHECK_C_COMPILER_FLAG(-fstack-protector-strong HAS_STRONG_STACK_PROTECTOR)
+  CHECK_C_COMPILER_FLAG(-fstack-protector HAS_STACK_PROTECTOR)
+
+  if (${CMAKE_BUILD_TYPE} STREQUAL "Release")
+    if(HAS_STRONG_STACK_PROTECTOR)
+      add_definitions(-fstack-protector-strong)
+    elseif(HAS_STACK_PROTECTOR)
+      add_definitions(-fstack-protector)
+    endif(HAS_STRONG_STACK_PROTECTOR)
+    add_definitions(-D_FORTIFY_SOURCE=2)
+  endif (${CMAKE_BUILD_TYPE} STREQUAL "Release")
 
   if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
     find_program(GXX g++)
@@ -139,24 +155,18 @@ if (LINUX)
       set(GXX_VERSION x)
     endif (GXX)
 
-  # The quoting hack here is necessary in case we're using distcc or
-  # ccache as our compiler.  CMake doesn't pass the command line
-  # through the shell by default, so we end up trying to run "distcc"
-  # " g++" - notice the leading space.  Ugh.
+    # The quoting hack here is necessary in case we're using distcc or
+    # ccache as our compiler.  CMake doesn't pass the command line
+    # through the shell by default, so we end up trying to run "distcc"
+    # " g++" - notice the leading space.  Ugh.
 
-  execute_process(
-      COMMAND sh -c "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} --version"
-      COMMAND sed "s/^[gc+ ]*//"
-      COMMAND head -1
-      OUTPUT_VARIABLE CXX_VERSION
+    execute_process(
+        COMMAND sh -c "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} --version"
+        COMMAND sed "s/^[gc+ ]*//"
+        COMMAND head -1
+        OUTPUT_VARIABLE CXX_VERSION
       OUTPUT_STRIP_TRAILING_WHITESPACE)
 
-    if (${CMAKE_BUILD_TYPE} STREQUAL "Release")
-      if (${GXX_VERSION} STREQUAL ${CXX_VERSION})
-        add_definitions(-D_FORTIFY_SOURCE=2)
-      endif (${GXX_VERSION} STREQUAL ${CXX_VERSION})
-    endif (${CMAKE_BUILD_TYPE} STREQUAL "Release")
-
     # Let's actually get a numerical version of gxx's version
     STRING(REGEX REPLACE ".* ([0-9])\\.([0-9])\\.([0-9]).*" "\\1\\2\\3" CXX_VERSION_NUMBER ${CXX_VERSION})
 
@@ -170,13 +180,6 @@ if (LINUX)
     endif (${CXX_VERSION_NUMBER} GREATER 479)
     # End of hacks.
 
-    add_definitions(
-        -std=gnu++11
-        -fno-math-errno
-        -fno-strict-aliasing
-        -fsigned-char
-        )
-
     if (WORD_SIZE EQUAL 32)
       add_definitions(
         -msse2
@@ -185,8 +188,6 @@ if (LINUX)
     endif (WORD_SIZE EQUAL 32)
 
     if (NOT USESYSTEMLIBS)
-      # this stops us requiring a really recent glibc at runtime
-      add_definitions(-fno-stack-protector)
       # linking can be very memory-hungry, especially the final viewer link
       set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory")
     endif (NOT USESYSTEMLIBS)
@@ -198,20 +199,11 @@ if (LINUX)
     endif (${CXX_VERSION_NUMBER} GREATER 479)
     set(CMAKE_CXX_FLAGS_RELEASE "-O2 ${CMAKE_CXX_FLAGS_RELEASE}")
   elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
-    add_definitions(
-        -std=gnu++11
-        -fno-math-errno
-        -fno-strict-aliasing
-        -fsigned-char
-        )
-
     if (WORD_SIZE EQUAL 32)
       add_definitions(-msse2 -march=pentium4)
     endif (WORD_SIZE EQUAL 32)
 
     if (NOT USESYSTEMLIBS)
-      # this stops us requiring a really recent glibc at runtime
-      add_definitions(-fno-stack-protector)
       # linking can be very memory-hungry, especially the final viewer link
       set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory")
     endif (NOT USESYSTEMLIBS)
@@ -219,18 +211,11 @@ if (LINUX)
     set(CMAKE_CXX_FLAGS_DEBUG "-O0 ${CMAKE_CXX_FLAGS_DEBUG}")
     set(CMAKE_CXX_FLAGS_RELEASE "-O3 ${CMAKE_CXX_FLAGS_RELEASE}")
   elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
-    add_definitions(
-        -fno-math-errno
-        -msse2
-        )
-
     if (NOT USESYSTEMLIBS)
       add_definitions(-march=pentium4)
     endif (NOT USESYSTEMLIBS)
 
     if (NOT USESYSTEMLIBS)
-      # this stops us requiring a really recent glibc at runtime
-      add_definitions(-fno-stack-protector)
       # linking can be very memory-hungry, especially the final viewer link
       set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory")
     endif (NOT USESYSTEMLIBS)
diff --git a/indra/cmake/Audio.cmake b/indra/cmake/Audio.cmake
index 876b7f82a8802f969614d7111b435721be4f039e..f95439245aa28ee287abff7d45e132c286b0a1d3 100755
--- a/indra/cmake/Audio.cmake
+++ b/indra/cmake/Audio.cmake
@@ -8,7 +8,7 @@ if (USESYSTEMLIBS)
   pkg_check_modules(VORBISENC REQUIRED vorbisenc)
   pkg_check_modules(VORBISFILE REQUIRED vorbisfile)
 else (USESYSTEMLIBS)
-  use_prebuilt_binary(ogg-vorbis)
+  use_prebuilt_binary(ogg_vorbis)
   set(VORBIS_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
   set(VORBISENC_INCLUDE_DIRS ${VORBIS_INCLUDE_DIRS})
   set(VORBISFILE_INCLUDE_DIRS ${VORBIS_INCLUDE_DIRS})
diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake
index 4ccf3d3a68d73513f7a7d6ea52fb83168e084ecf..9ce18adbbca2447bb1db04cd307cc3c137ebc5f8 100755
--- a/indra/cmake/LLPrimitive.cmake
+++ b/indra/cmake/LLPrimitive.cmake
@@ -7,7 +7,6 @@ include(LibXML2)
 include(ICU4C)
 
 use_prebuilt_binary(colladadom)
-use_prebuilt_binary(pcre)
 
 set(LLPRIMITIVE_INCLUDE_DIRS
     ${LIBS_OPEN_DIR}/llprimitive
@@ -19,10 +18,6 @@ if (WINDOWS)
         optimized llprimitive
         debug libcollada14dom23-sd
         optimized libcollada14dom23-s
-        debug pcrecppd
-        optimized pcrecpp
-        debug pcred
-        optimized pcre
         ${BOOST_SYSTEM_LIBRARIES}
         )
 elseif (DARWIN)
@@ -30,8 +25,6 @@ elseif (DARWIN)
         llprimitive
         collada14dom
         minizip
-        pcrecpp
-        pcre
         )
 elseif (LINUX)
     set(LLPRIMITIVE_LIBRARIES 
@@ -39,8 +32,6 @@ elseif (LINUX)
         debug collada14dom-d
         optimized collada14dom
         minizip
-        pcrecpp
-        pcre
         )
 endif (WINDOWS)
 LIST(APPEND LLPRIMITIVE_LIBRARIES