crunch icon indicating copy to clipboard operation
crunch copied to clipboard

Fix Linux 64bit GCC compilation, adjust Makefile

Open CounterPillow opened this issue 9 years ago • 3 comments

There are still lots of warnings, mostly related to dangerous casts, but it compiles and is able to show the help output with GCC 5.2.0.

Makefile

  • COMPILER_OPTIONS was replaced with the standard convention of CXXFLAGS for C++ files.
  • LINKER_OPTIONS was replaced with the standard convention of LDFLAGS.
  • g++ was replaced with $(CXX), which by default is g++ for GNU Make.
  • all was made a phony target due to not creating an output named "all".
  • A phony target clean was added, which calls $(RM) (equivalent to rm -f in GNU Make by default) on the output files.
  • Replaced -march=core2 with -march=native. Closes issue #13.

Code

  • Fix a number of compilation errors by turning calls to members in some places to dependant(?) calls by prefixing this->.
  • Turn is_power_of_2 into a template to solve ambiguity errors related to calling it with size_t.
  • Explicitly cast a size_t to uint32 in one place to resolve an ambiguity error. Might be incorrect, but I'm not knowledgeable enough with C++ to propose a cleaner fix.
  • Systems other than Windows can have 64 bits too.

All in all, most likely closes issue #10.

CounterPillow avatar Nov 19 '15 11:11 CounterPillow

It is a good pull request. Why isn't it merged?

MAnyKey avatar Apr 25 '16 17:04 MAnyKey

I assume because the project is dead.

CounterPillow avatar Apr 25 '16 22:04 CounterPillow

We're busy with several projects that have paying customers.

richgel999 avatar Sep 21 '21 02:09 richgel999