Add 2019/poikola alt code, try, try.alt, others
The alt code is so one can more easily filter the long output: it prints
a newline after each number is printed. The try.alt.sh script uses this.
Force -O0: the author stated that with clang they got correct output for
[0123s] but with GCC 6 they only got that with level 0. Since 0 works
with clang and since the author stated that the compilers used were
picky I changed it to level 0. Similarly and for the same reason I
changed the C standard to gnu11 from gnu17.
Format/typo check README.md file.
Updated bugs.md: noted that the max file size is 1GB.
I would like to give two quotes from the person this entry was dedicated
to:
'When you are about to jump, you are all alone and have to make your own
decisions. Up there, it's all "up yours".'
and
'I will move to Copenhagen and apply for Swedish citizenship.'
simply because they're funny and ironic (and one is quoted by the
author). These might be found somewhere in this commit.
This commit is contained in:
1 parent
631869dc7f
commit
9e057cd4ab
8 files changed
+261
-28
No files matched your search
+22
-5
@@ -47,7 +47,8 @@ CWARN= -Wall -Wextra -pedantic ${CSILENCE}
|
||||
|
||||
# Compiler standard
|
||||
#
|
||||
CSTD= -std=gnu17
|
||||
# The author did not test gnu17 but did gnu11 so we set to gnu11.
|
||||
CSTD= -std=gnu11
|
||||
|
||||
# Compiler bit architecture
|
||||
#
|
||||
@@ -66,7 +67,10 @@ CINCLUDE=
|
||||
|
||||
# Optimization
|
||||
#
|
||||
OPT= -O3
|
||||
# We disable the optimiser because the author stated that for GCC optimiser
|
||||
# level 0 gave correct output. With clang [0123s] works which suggests that
|
||||
# [123s] might or might not work with GCC.
|
||||
OPT= -O0
|
||||
|
||||
# Default flags for ANSI C compilation
|
||||
#
|
||||
@@ -116,8 +120,8 @@ CSRC= ${PROG}.o
|
||||
DATA= poikola.tex
|
||||
TARGET= ${PROG}
|
||||
#
|
||||
ALT_OBJ=
|
||||
ALT_TARGET=
|
||||
ALT_OBJ= ${PROG}.alt.o
|
||||
ALT_TARGET= ${PROG}.alt
|
||||
|
||||
DOCS= poikola.tex
|
||||
#################
|
||||
@@ -132,14 +136,27 @@ all: data ${TARGET}
|
||||
clean clobber install love haste waste maker easter_egg \
|
||||
sandwich supernova deep_magic magic charon pluto
|
||||
|
||||
# We disable the optimiser because the author stated that for GCC optimiser
|
||||
# level 0 gave correct output. With clang [0123s] works which suggests that
|
||||
# [123s] might or might not work with GCC. The author also stated that they did
|
||||
# not test gnu17 but for clang and GCC gnu11 does so we also set the standard to
|
||||
# gnu11.
|
||||
${PROG}: ${PROG}.c
|
||||
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
|
||||
${CC} ${CFLAGS} -O0 -std=gnu11 $< -o $@ ${LDFLAGS}
|
||||
|
||||
# alternative executable
|
||||
#
|
||||
alt: data ${ALT_TARGET}
|
||||
@${TRUE}
|
||||
|
||||
# We disable the optimiser because the author stated that for GCC optimiser
|
||||
# level 0 gave correct output. With clang [0123s] works which suggests that
|
||||
# [123s] might or might not work with GCC. The author also stated that they did
|
||||
# not test gnu17 but for clang and GCC gnu11 does so we also set the standard to
|
||||
# gnu11.
|
||||
${PROG}.alt: ${PROG}.alt.c
|
||||
${CC} ${CFLAGS} -O0 -std=gnu11 $< -o $@ ${LDFLAGS}
|
||||
|
||||
# data files
|
||||
#
|
||||
data: ${DATA}
|
||||
|
||||
Reference in new issue
Block a user