quickjs icon indicating copy to clipboard operation
quickjs copied to clipboard

[macOS] Compiler should not be hardcoded, as gcc can also be used (and _should_ be used on some platforms)

Open barracuda156 opened this issue 1 year ago • 2 comments

Current Makefile forces Clang for macOS and FreeBSD, this is undesirable and in certain cases breaking. It is okay to fall back to Clang by default, but provided CC has not been set in the environment and build args.

barracuda156 avatar Jun 22 '24 07:06 barracuda156

I guess we could check for a CC environment variable. Note however that gcc on macOS is by default an alias for clang. The gcc toolchain can still be installed manually I suppose.

chqrlie avatar Jun 23 '24 03:06 chqrlie

@chqrlie Yes, gcc (real one) can be used on macOS. (On some legacy versions it is the only working compiler.)

barracuda156 avatar Jun 23 '24 15:06 barracuda156

You can use 'make CONFIG_CLANG=' to disable the use of clang on MacOS and BSD. If you have a better solution as a Makefile patch, I'll be happy to look at it.

bellard avatar May 24 '25 09:05 bellard