DavidKinder / Git

Fast Glulx interpreter, originally written by Iain Merrick.
MIT License
46 stars 13 forks source link

-lm option needs to be set in gcc 5.4 #6

Closed curiousdannii closed 6 years ago

curiousdannii commented 8 years ago

I'm a complete newbie at C, but I've found that I needed to add -lm to LIBS in the Makefile in order to compile it with gcc 5.4, which is the default for Ubuntu 16.04.

I don't know if that's a kind of change you want to have by default in the Makefile, or if it would cause problems for other compilers or other OSes. But I'm suggesting it here just in case.

BroadcastGames commented 8 years ago

What are the symptoms if you don't set this?

curiousdannii commented 8 years ago

It won't compile. I don't remember exactly what compilation errors are shown.

BroadcastGames commented 7 years ago

Please... Request: can the Makefile be modernized a bit?

  1. advice of "Best settings for GCC 2.95. This generates faster code than GCC 3, so you should use this setup if possible." be updated to more modern choice of GCC 4.9 vs. GCC 5 and relevant recommendations? 2.95 vs. 3 is outdated.
  2. "Step 2: pick a C compiler" add clang as an example? As that's showing up in more systems.
  3. Makefile still shows 1.3.4 instead of 1.3.5
  4. A comment on when USE_BIG_ENDIAN_UNALIGNED should be used. I notice it is for powerpc, but what about some of these mobile systems with MIPS or ARM processors (iPhone, Android, etc). Is the code 'safe' without this setting? what problems might appear (is there a test for it?)
  5. 64bit safe comment in Makefile?

Thank you.

DavidKinder commented 6 years ago

-lm added to LIBS in Makefile