actboy168 / luamake

MIT License
171 stars 36 forks source link

FreeBSD support is incomplete #32

Closed assistcontrol closed 8 months ago

assistcontrol commented 1 year ago

I maintain the lua_ls port in FreeBSD, and I have to do some patching every time luamake is updated. It'd be nice if some of the changes were merged in here, rather than patching on every release.

You can see FreeBSD's luamake patch here: https://github.com/freebsd/freebsd-ports/blob/main/devel/lua-language-server/files/patch-3rd_luamake_compile_ninja_freebsd.ninja

Thank you for all the work you've done to support FreeBSD!

actboy168 commented 1 year ago

FreeBSD comes with clang and not gcc. Our packages are never built with gcc. I see that you have a clang spec; can freebsd.ninja be updated to use it instead of gcc?

Done.

Compilation commands need -I/usr/loca/include, and linker commands need -L/usr/local/lib

Done.

-Wno-maybe-uninitialized does not exist and causes clang to error out. Can it be -Wno-uninitialized instead?

After switching to clang, this option will not be available.

-Wl,-E causes clang to error, so we drop that word entirely

What is error?

actboy168 commented 8 months ago

With the help of other contributors, luamake can now compile and work correctly under freebsd.