Fix 2019/karns

A strange problem is that although it worked with macOS and linux for me
numerous times in the past it stopped working under both. I went to try
and figure it out but when disabling the optimiser for debug symbols the
problem vanished. Changing it back to -O3 and the problem reappeared
both with macOS and linux. Thus it appears that the entry should not
have -O level > 0. I'm not sure if this is the same issue the author
reported where it sometimes segfaults but I did not try and figure it
out either (in any event the crash disappeared when -O0 was specified so
it'd be harder to debug).

Added to .gitignore the file the author noted the program is called (as
the command he gives creates). To make it easier I just made it a
symlink to prog.

Fixed formatting in README.md.
This commit is contained in:
Cody Boone Ferguson committed 2023-04-03 09:57:21 -07:00
1 parent 946b73151b
commit 0791a31fc7
3 files changed
+35 -14

No files matched your search

+10 -1
View File
@@ -68,7 +68,7 @@ CINCLUDE=
# Optimization
#
OPT= -O3
OPT=
# Default flags for ANSI C compilation
#
@@ -120,6 +120,10 @@ TARGET= ${PROG}
ALT_OBJ=
ALT_TARGET=
############################
# FORCE no -O level #
# ##########################
COPT+= -O0
#################
# build the entry
@@ -134,6 +138,11 @@ all: data ${TARGET}
${PROG}: ${PROG}.c
${CC} ${CFLAGS} $< -o $@ ${LIBS}
${LN} -sf ${PROG} tbfs
test: prog
${CAT} prog.c | ./prog
# alternative executable
#