File angband-enable-buildopt.patch of Package angband
diff -ru Angband-4.2.5/src/Makefile Angband-4.2.5-orig/src/Makefile
--- Angband-4.2.5/src/Makefile 2023-08-18 23:42:53.000000000 -0400
+++ Angband-4.2.5/src/Makefile 2023-11-29 15:15:08.615450182 -0500
@@ -10,10 +10,10 @@
# Will dynamically generate version.h with the build number.
CFLAGS += -DHAVE_VERSION_H -DALLOW_BORG
-CFLAGS += -I. -fPIC -std=c99 -O0
+CFLAGS += -I. -fPIC -std=c99
# Replace above line with the two below and then look at gmon.out
# to do performance monitoring
-# CFLAGS += -g -pg -I. -fPIC -std=c99 -O0
+# CFLAGS += -g -pg -I. -fPIC -std=c99
# LDFLAGS += -g -pg
# gcov intermediate data
diff -ru Angband-4.2.5/src/Makefile.std Angband-4.2.5-orig/src/Makefile.std
--- Angband-4.2.5/src/Makefile.std 2023-08-18 23:42:53.000000000 -0400
+++ Angband-4.2.5/src/Makefile.std 2023-11-29 15:15:21.132249888 -0500
@@ -55,7 +55,7 @@
# Basic compiler stuff
CC = gcc
WARNINGS = -W -Wall -Wextra -Wold-style-definition -Wmissing-declarations -Wredundant-decls -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wformat-security -Winit-self -Wmissing-include-dirs -Wundef -Wmissing-format-attribute -Wnested-externs -Wunreachable-code -Wno-unused-parameter -Wno-missing-field-initializers
-CFLAGS = -O0 -g $(WARNINGS)
+CFLAGS = -g $(WARNINGS)
# Add additional search directives here
# Example: -I/usr/X11R6/include -I/usr/include/ncurses