From fa1f35a7d69cf8055e6c732d076c9e22caf99dbb Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Thu, 6 Jul 2023 11:42:50 -0700 Subject: [PATCH] Fix 2015/endoh3 for linux There was a problem with duplicate symbols of main but using the option -fcommon in the compiler flags solves this problem. It was not an issue with macOS as the default behaviour (I guess default anyway). With this commit I believe that all entries (except for two that are not supposed to compile) compile in linux. They haven't all been tested but all but two should compile in linux if one has the appropriate libraries for those that use other libraries. --- 2015/endoh3/Makefile | 2 +- thanks-for-fixes.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/2015/endoh3/Makefile b/2015/endoh3/Makefile index cfdec289a..2f478f2f6 100644 --- a/2015/endoh3/Makefile +++ b/2015/endoh3/Makefile @@ -57,7 +57,7 @@ ARCH= # Defines that are needed to compile # -CDEFINE= +CDEFINE= -fcommon # Include files that are needed to compile # diff --git a/thanks-for-fixes.md b/thanks-for-fixes.md index 825f65f5e..f14ea7cf5 100644 --- a/thanks-for-fixes.md +++ b/thanks-for-fixes.md @@ -1323,6 +1323,10 @@ were linking errors. ## [2015/endoh3](2015/endoh3/prog.c) ([README.md](2015/endoh3/README.md])) +Cody fixed this to compile with linux which was having a problem with duplicate +symbols of `main()`. The fix is through the option `-fcommon` which will let it +compile like it does with macOS. + The author, Yusuke, supplied the additional source files, which Cody added to the repo for us. Yusuke wrote in his [analysis of the entry](https://mame-github-io.translate.goog/ioccc-ja-spoilers/2015/endoh3.html?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-US&_x_tr_pto=wapp)