ascii-boxes/boxes

Clang support?

anoduck opened this issue · 5 comments

Due to some reason divinated by Theo Der Raadt, gcc is available on OpenBSD, but only as "egcc". Regardless of attempting to redirect the request for gcc with environmental variables, gnu make still is unable of finding egcc.

It would be nice if compilation this compiled on systems that use clang.

Yes, that sounds nice!

I personally have no knowledge about Clang, so you would need to contribute that. 😸

If it's just the different compiler name, we have a CC environment variable that you can set for that. No idea if that's what you need, though.

I think that might be the hangup, the env variable that I am giving on the command line is being overwritten by the one set programmatically. I will tinker around with it with a very inquisitive brow on my face. It "should" be doable.

I apologize, my brain was fried from programming for eight hours straight. I was lucky to formulate coherent sentences at that point. Thanks for working with me.

@tsjensen I was able to get it to build in OpenBSD Current using egcc and gmake.

The steps to build are:

  1. Replace all occurrence of gcc with egcc (e=?) in the make files.
  2. Use gmake (gnu make) instead of make (bsd).
  3. Add flag to include /usr/local/include in the build. gmake CFLAGS_ADDTL=-I/usr/local/include
  4. Viola, it builds.

Hopefully, this will help if there are any other inquiries, and if you need anything at all. Let me know.

Thanks for an awesome program, and the kindness to help. Cheers.

Cool, thank you for letting us know.

I'll try to see if the Makefile can be improved so that you can simply set CC=egcc when calling it. The build is somewhat "custom" atm, anyway. We might also switch to a cmake build once I figure out how. Anyway, thanks!

It all should work. Clang, meson, ninja, or whatever. As long as /usr/local/include is included in the build.

I regret not having taken c++ in college, so you are miles ahead of me.