diff --git a/CMakeLists.txt b/CMakeLists.txt
index 80a3bdcd6798a48d10ea928d60ca3c4fb77bf353..8803620e7a9305cb28359aa31c973223d4df247f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -75,6 +75,7 @@ option(SRB2_CONFIG_ERRORMODE "Compile C code with warnings treated as errors." O
 option(SRB2_CONFIG_DEBUGMODE "Compile with PARANOIA, ZDEBUG, RANGECHECK and PACKETDROP defined." OFF)
 option(SRB2_CONFIG_MOBJCONSISTANCY "Compile with MOBJCONSISTANCY defined." OFF)
 option(SRB2_CONFIG_PACKETDROP "Compile with PACKETDROP defined." OFF)
+option(SRB2_CONFIG_EXECINFO "Enable stack trace dump support." ON)
 option(SRB2_CONFIG_ZDEBUG "Compile with ZDEBUG defined." OFF)
 # SRB2_CONFIG_PROFILEMODE is probably superceded by some CMake setting.
 option(SRB2_CONFIG_PROFILEMODE "Compile for profiling (GCC only)." OFF)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 01c35d85476284e0c0395aac3e35042259d837a3..49f783722ab429986fb45b317a2d00c36a4b5f94 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -278,7 +278,7 @@ target_compile_options(SRB2SDL2 PRIVATE
 
 		$<$<VERSION_GREATER_EQUAL:$<C_COMPILER_VERSION>,4.5.0>:
 			-Wlogical-op
-			-Wno-error=array-bounds
+			#-Wno-error=array-bounds
 		>
 
 		$<$<VERSION_GREATER_EQUAL:$<C_COMPILER_VERSION>,4.6.0>:
@@ -378,6 +378,11 @@ endif()
 if(SRB2_CONFIG_PACKETDROP)
 	target_compile_definitions(SRB2SDL2 PRIVATE -DPACKETDROP)
 endif()
+if(SRB2_CONFIG_EXECINFO)
+else()
+	target_compile_definitions(SRB2SDL2 PRIVATE -DNOEXECINFO)
+	message(STATUS "You have disabled stack trace dump support")
+endif()
 if(SRB2_CONFIG_ZDEBUG)
 	target_compile_definitions(SRB2SDL2 PRIVATE -DZDEBUG)
 endif()
diff --git a/src/Makefile b/src/Makefile
index b730cd0bb03986c626613fd5a13947d04329e144..6dba19c2418d9ee465b435b40332245762ecd21f 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -66,6 +66,7 @@
 # NOPOSTPROCESSING=1 - ?
 # MOBJCONSISTANCY=1 - ??
 # PACKETDROP=1 - ??
+# NOEXECINFO=1 - Disable stack trace dump support
 # DEBUGMODE=1 - Enable various debugging capabilities.
 #               Also disables optimizations.
 # NOZLIB=1 - Disable some compression capability. Implies
diff --git a/src/Makefile.d/versions.mk b/src/Makefile.d/versions.mk
index d2877b374346115621773c822af00a92dd4de72c..2523d7f3c25f6c519e67d728417a40e9e052e883 100644
--- a/src/Makefile.d/versions.mk
+++ b/src/Makefile.d/versions.mk
@@ -116,7 +116,7 @@ ifdef GCC43
  #WFLAGS+=-Wno-error=clobbered
 endif
 ifdef GCC44
- WFLAGS+=-Wno-error=array-bounds
+#WFLAGS+=-Wno-error=array-bounds
 endif
 ifdef GCC46
  WFLAGS+=-Wno-error=suggest-attribute=noreturn