Merge pull request #124 from xexyl/2005-giljade

Get 2005/giljade to work
This commit is contained in:
Landon Curt Noll authored and GitHub committed 2023-03-23 17:14:17 -07:00
commit b46fcd191c
2 files changed
+16 -3

No files matched your search

+4 -3
View File
@@ -92,7 +92,7 @@ CSTD= -std=gnu99
#
# By default we assume nothing:
#
ARCH=
ARCH= -m32
# Defines that are needed to compile
#
@@ -101,7 +101,7 @@ CDEFINE=
# Include files that are needed to compile
#
CINCLUDE=
CINCLUDE= -include stdio.h
#CINCLUDE= -include stdlib.h
#CINCLUDE= -include stdio.h
#CINCLUDE= -include stdlib.h -include stdio.h
@@ -119,7 +119,7 @@ CINCLUDE=
#OPT= -O
#OPT= -O1
#OPT= -O2
OPT= -O3
OPT=
# Default flags for ANSI C compilation
#
@@ -188,6 +188,7 @@ all: data ${TARGET}
supernova deep_magic magic charon pluto
${PROG}: ${PROG}.c
@echo "NOTE: this entry requires 32-bit architecture in order to run properly"
${CC} ${CFLAGS} $< -o $@ ${LIBS}
# alternative executable
+12
View File
@@ -12,6 +12,18 @@
make
```
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) discovered that there
are two things that are needed in order to get this to work in modern systems.
First it needs 32-bit architecture so the Makefile now has `-m32`. It appears
it's because of the size of ints being different which affects the bitwise
operations though this is just a hunch. Second is the optimiser cannot be
enabled for this to work. Both changes made and it works. This does prove a
problem for macOS as it no longer easily allows for compiling with 32-bit
possibly even if you have the Intel chip (it certainly does not work with arm64
macOS). It might be possible to get the entry to work with 64-bit by changing
the int size but this is currently unknown.
### To run:
```sh