Galladite27 / ONScripter-EN

Continuation of ONScripter-EN with updated dependencies and more features and bugfixes. Also see onscripter-insani (https://github.com/insani-org/onscripter-insani), our sister project.
http://galladite.net/~galladite/ons-en/
GNU General Public License v2.0
52 stars 11 forks source link

configure: clang as a supported compiler, OpenBSD fixes, -O3 to -O2 #16

Closed grodzio1 closed 10 months ago

grodzio1 commented 10 months ago

I have modified the script to accept clang as a supported compiler. ONScripter-EN builds without fail using clang, this useful mostly on OpenBSD and FreeBSD. I've made it so any OS that also uses clang can be easily added in the future. I've also fixed the bzip2 check on OpenBSD, and as above I've made it so any other OS that uses different paths for bzip2 libraries and headers can be easily added to it. Lastly, I've changed the compiler optimisation flags from -O3 to -O2, as -O3 is generally not recommended.

SeanMcG commented 10 months ago

Commit history really should not have the reverts, can you squash these?

SeanMcG commented 10 months ago

Also, I really really really think we should convert the compiler identification to something that is actually compiled -- especially now that I have looked at the new Intel compiler suite and how both it's binary name (icc -> icx) and it's output for --version has changed since ICC.

SeanMcG commented 10 months ago

I'm not generally opposed to the O3 -> O2 change, but I wonder if we are maybe going to lose some of the nicer optimizations at that level -- like some of the loop-unrolling stuff in gcc anyways. We don't really have metrics on what that does either, and I am guessing no stats on how old a machine people run ons-en with.

grodzio1 commented 10 months ago

Also, I really really really think we should convert the compiler identification to something that is actually compiled -- especially now that I have looked at the new Intel compiler suite and how both it's binary name (icc -> icx) and it's output for --version has changed since ICC.

What I wrote is more or less a quick fix just so it can compile under clang. I don't think it ought to be permanent. The compiler detection probably should be rewritten to work with modern versions of compilers.

I'm not generally opposed to the O3 -> O2 change, but I wonder if we are maybe going to lose some of the nicer optimizations at that level -- like some of the loop-unrolling stuff in gcc anyways. We don't really have metrics on what that does either, and I am guessing no stats on how old a machine people run ons-en with.

I don't think a visual novel engine needs maximum performance. In this case, -O3 is more trouble than it's worth.

Galladite27 commented 10 months ago

Commit history really should not have the reverts, can you squash these?

Agreed, would it be possible to please submit a pr with just the one commit for OpenBSD fixes?

grodzio1 commented 10 months ago

Fixed. Now there is a commit for compiler flags and the other one for clang and OpenBSD fixes. Is this ok?

SeanMcG commented 10 months ago

Fixed. Now there is a commit for compiler flags and the other one for clang and OpenBSD fixes. Is this ok?

Much better, thanks.