From c7a10649ab593af66d818c29687496d0563ad619 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 19 Dec 2023 10:07:06 -0800 Subject: [PATCH] Force -O0 in 2005/giljade - optimiser breaks it --- 2005/giljade/Makefile | 7 +++++-- 2005/giljade/README.md | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/2005/giljade/Makefile b/2005/giljade/Makefile index df5d6c7ae..cb200f713 100644 --- a/2005/giljade/Makefile +++ b/2005/giljade/Makefile @@ -69,8 +69,9 @@ CDEFINE= CINCLUDE= -include stdio.h -include string.h -include unistd.h -include stdlib.h # Optimization +# We DISABLE the optimiser because having it enabled BREAKS the program. # -OPT= +OPT= -O0 # Default flags for ANSI C compilation # @@ -135,8 +136,10 @@ all: data ${TARGET} clean clobber install love haste waste maker easter_egg \ sandwich supernova deep_magic magic charon pluto +# NOTE: We FORCE the use of -O0 even if someone overrides it because this entry +# will not work with it enabled. ${PROG}: ${PROG}.c - ${CC} ${CFLAGS} $< -o $@ ${LDFLAGS} + ${CC} ${CFLAGS} -O0 $< -o $@ ${LDFLAGS} test: ${PROG} test.sh ./test.sh diff --git a/2005/giljade/README.md b/2005/giljade/README.md index 19a2f4fe5..652729ac6 100644 --- a/2005/giljade/README.md +++ b/2005/giljade/README.md @@ -4,6 +4,9 @@ make ``` +NOTE: We FORCE the use of -O0 even if someone overrides it because this entry +will not work with it enabled. + ### Bugs and (Mis)features: