diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5fbc7002ad42fea1c9966bad85569c19a0d87797..405fa95725122c67e7e1e802299500f838b053fc 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -253,6 +253,7 @@ target_compile_options(SRB2SDL2 PRIVATE
 		-Winline
 		-Wformat-y2k
 		-Wformat-security
+		-fwrapv
 
 		$<$<VERSION_LESS:$<C_COMPILER_VERSION>,2.9.5>:
 			-Wno-div-by-zero
@@ -260,10 +261,6 @@ target_compile_options(SRB2SDL2 PRIVATE
 			-Wdisabled-optimization
 		>
 
-		$<$<VERSION_GREATER_EQUAL:$<C_COMPILER_VERSION>,3.4.0>:
-			-fwrapv
-		>
-
 		$<$<VERSION_GREATER_EQUAL:$<C_COMPILER_VERSION>,4.0.0>:
 			-Wold-style-definition
 			-Wmissing-field-initializers
@@ -326,6 +323,7 @@ target_compile_options(SRB2SDL2 PRIVATE
 		-Wno-error=non-literal-null-conversion
 		-Wno-error=constant-conversion
 		-Wno-error=unused-but-set-variable
+		-fwrapv
 	>
 
 	# C, MSVC
diff --git a/src/Makefile b/src/Makefile
index a0a18be769e0cc64b98d8774b4b3a1aeb3c177ad..b730cd0bb03986c626613fd5a13947d04329e144 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -164,7 +164,7 @@ sources:=
 makedir:=../make
 
 # -DCOMPVERSION: flag to use comptime.h
-opts:=-DCOMPVERSION -g
+opts:=-DCOMPVERSION -g -fwrapv
 libs:=
 
 # This is a list of variables names, of which if defined,
diff --git a/src/Makefile.d/detect.mk b/src/Makefile.d/detect.mk
index 3d9fc276618ee789506a4e248c268731c47ffba0..9e27369462b00c407f02cb95dbda22ef284a91d1 100644
--- a/src/Makefile.d/detect.mk
+++ b/src/Makefile.d/detect.mk
@@ -65,8 +65,7 @@ gcc_versions:=\
 	75 74 73 72 71 70\
 	64 63 62 61 60\
 	55 54 53 52 51 50\
-	49 48 47 46 45 44 43 42 41 40\
-	34
+	49 48 47 46 45 44 43 42 41 40
 
 latest_gcc_version:=13.2
 
diff --git a/src/Makefile.d/versions.mk b/src/Makefile.d/versions.mk
index 40ccd9f26117a5c59fc6a97161e2aff460d77e1d..d2877b374346115621773c822af00a92dd4de72c 100644
--- a/src/Makefile.d/versions.mk
+++ b/src/Makefile.d/versions.mk
@@ -160,10 +160,6 @@ opts+=-O0
 endif
 endif
 
-ifdef GCC34
-opts+=-fwrapv
-endif
-
 ifdef VALGRIND
 ifdef GCC46
 WFLAGS+=-Wno-error=unused-but-set-variable