diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h
index 8689446a4e8a3077d066eddf2f5a957011d0e688..d13959490a1f836754de1170115d065829f32eb6 100644
--- a/indra/llrender/llglslshader.h
+++ b/indra/llrender/llglslshader.h
@@ -30,7 +30,7 @@
 #include "llgl.h"
 #include "llrender.h"
 #include "llstaticstringtable.h"
-#include <unordered_map>
+#include <boost/unordered/unordered_map.hpp>
 
 class LLShaderFeatures
 {
@@ -272,8 +272,8 @@ class LLGLSLShader
 	U32 mAttributeMask;  //mask of which reserved attributes are set (lines up with LLVertexBuffer::getTypeMask())
 	std::vector<GLint> mUniform;   //lookup table of uniform enum to uniform location
 	LLStaticStringTable<GLint> mUniformMap; //lookup map of uniform name to uniform location
-    typedef std::unordered_map<GLint, std::string> uniform_name_map_t;
-    typedef std::unordered_map<GLint, LLVector4> uniform_value_map_t;
+    typedef boost::unordered_flat_map<GLint, std::string> uniform_name_map_t;
+    typedef boost::unordered_flat_map<GLint, LLVector4> uniform_value_map_t;
     uniform_name_map_t mUniformNameMap; //lookup map of uniform location to uniform name
 	uniform_value_map_t mValue; //lookup map of uniform location to last known value
 	std::vector<GLint> mTexture;
@@ -285,7 +285,7 @@ class LLGLSLShader
 	LLShaderFeatures mFeatures;
 	std::vector< std::pair< std::string, GLenum > > mShaderFiles;
 	std::string mName;
-    typedef std::unordered_map<std::string, std::string> defines_map_t;
+    typedef boost::unordered_map<std::string, std::string> defines_map_t;
 	defines_map_t mDefines;
 
 	//statistcis for profiling shader performance
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index 9d9bb0df6694e663663f76dee51c97ba59436b0b..b762c0bd7fd0f8275ff6ac90d7e6c9548b6e83d0 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -579,7 +579,7 @@ void LLShaderMgr::dumpObjectLog(GLhandleARB ret, BOOL warns, const std::string&
 	}
  }
 
-GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_level, GLenum type, std::unordered_map<std::string, std::string>* defines, S32 texture_index_channels)
+GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_level, GLenum type, boost::unordered_map<std::string, std::string>* defines, S32 texture_index_channels)
 {
 
 // endsure work-around for missing GLSL funcs gets propogated to feature shader files (e.g. srgbF.glsl)
@@ -775,7 +775,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
 	
 	if (defines)
 	{
-		for (std::unordered_map<std::string,std::string>::iterator iter = defines->begin(); iter != defines->end(); ++iter)
+		for (boost::unordered_map<std::string,std::string>::iterator iter = defines->begin(); iter != defines->end(); ++iter)
 		{
 			std::string define = "#define " + iter->first + " " + iter->second + "\n";
 			extra_code_text[extra_code_count++] = (GLcharARB *) strdup(define.c_str());
diff --git a/indra/llrender/llshadermgr.h b/indra/llrender/llshadermgr.h
index 809f39124d8127d6d19bb032d1d6c5a7830728f9..489a179663eb2d33e4084dd8201ebb0e607945b7 100644
--- a/indra/llrender/llshadermgr.h
+++ b/indra/llrender/llshadermgr.h
@@ -244,7 +244,7 @@ class LLShaderMgr
     void dumpShaderSource(U32 shader_code_count, GLcharARB** shader_code_text);
 	BOOL	linkProgramObject(GLhandleARB obj, BOOL suppress_errors = FALSE);
 	BOOL	validateProgramObject(GLhandleARB obj);
-	GLhandleARB loadShaderFile(const std::string& filename, S32 & shader_level, GLenum type, std::unordered_map<std::string, std::string>* defines = NULL, S32 texture_index_channels = -1);
+	GLhandleARB loadShaderFile(const std::string& filename, S32 & shader_level, GLenum type, boost::unordered_map<std::string, std::string>* defines = NULL, S32 texture_index_channels = -1);
 
 	// Implemented in the application to actually point to the shader directory.
 	virtual std::string getShaderDirPrefix(void) = 0; // Pure Virtual
diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h
index 5544a99fac45e0eee3ed7aefaad3df8fad5834e0..a5db551dd841070a045e2be748c1852cad76740d 100644
--- a/indra/newview/llspatialpartition.h
+++ b/indra/newview/llspatialpartition.h
@@ -228,10 +228,10 @@ class LLSpatialGroup final : public LLOcclusionCullingGroup
 	typedef std::vector<LLPointer<LLSpatialGroup> > sg_vector_t;
 	typedef std::vector<LLPointer<LLSpatialBridge> > bridge_list_t;
 	typedef std::vector<LLPointer<LLDrawInfo> > drawmap_elem_t; 
-	typedef std::unordered_map<U32, drawmap_elem_t > draw_map_t;	
+	typedef boost::unordered_map<U32, drawmap_elem_t > draw_map_t;	
 	typedef std::vector<LLPointer<LLVertexBuffer> > buffer_list_t;
-	typedef std::unordered_map<LLFace*, buffer_list_t> buffer_texture_map_t;
-	typedef std::unordered_map<U32, buffer_texture_map_t> buffer_map_t;
+	typedef boost::unordered_map<LLFace*, buffer_list_t> buffer_texture_map_t;
+	typedef boost::unordered_map<U32, buffer_texture_map_t> buffer_map_t;
 
 	struct CompareDistanceGreater
 	{
diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h
index 5210df1fd9301f50d6a7a231bf88afb0a72cdc30..26e4967efea3bc289ea9c619c1eee4bd58a3103a 100644
--- a/indra/newview/llviewerprecompiledheaders.h
+++ b/indra/newview/llviewerprecompiledheaders.h
@@ -115,4 +115,6 @@
 #include "llui.h"
 #include "lluictrl.h"
 
+#include "llviewerbuildconfig.h"
+
 #endif
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index b7050ed99131e53d4d976447665172abacf57f8c..d0c19c5be6715817c6000bea678dc455b7afedda 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -897,7 +897,7 @@ std::string LLViewerShaderMgr::loadBasicShaders()
 	}
 	shaders.push_back( make_pair( "objects/nonindexedTextureV.glsl",        1 ) );
 
-	std::unordered_map<std::string, std::string> attribs;
+	boost::unordered_map<std::string, std::string> attribs;
 	attribs["MAX_JOINTS_PER_MESH_OBJECT"] = 
 		fmt::to_string(LLSkinningUtil::getMaxJointCount());
 
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index a5e24b806283c2e71ce2eb05887e5ce9d6e7dc06..d9f6ddd78e51ab18c7d39b4e23014bcdd9cfb0c4 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -778,6 +778,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
 
 S32 LLVOAvatar::getNumBakes() const 
 {
+#if !LL_HAVOK
 	// BAKED_LEFT_ARM is equal to the pre-BOM BAKED_NUM_INDICES
 	if(LLViewerRegion* regionp = getRegion())
 	{
@@ -794,6 +795,9 @@ S32 LLVOAvatar::getNumBakes() const
 	// 				<< LL_ENDL;
 	// fallback, in SL assume BOM, elsewhere assume not.
 	return LLGridManager::instance().isInSecondlife() ? BAKED_NUM_INDICES : BAKED_LEFT_ARM;
+#else
+	return BAKED_NUM_INDICES;
+#endif
 }
 std::string LLVOAvatar::avString() const
 {