Open z-erica opened 8 months ago
What happens when clang is used to compile plan 9 instead?
i believe it works fine; the main issue is that i had to patch this file for anything to run in the first place
Great. I see the problem now. The Linux branch only checks CC9 against tcc. There's plenty of code there to support clang on other platforms already. As you know it already works, are you allowed to share, or even contribute your patch?
Otherwise, if something else is already setting CC9 to clang, and if useclang works on Linux just as well as on BSDs, would something like the new code below suffice, to treat Linux clang the same as Dragon clang and BSD clang?
case "$tag" in
*DragonFly*gcc*|*BSD*gcc*) usegcc ;;
*DragonFly*clang|*BSD*clang*|*Linux*clang*) useclang ;;
*Darwin*)
useclang
cflags="$cflags -g3 -m64"
;;
*HP-UX*) cc=${CC9:-cc}; cflags="-g -O -c -Ae" ;;
*Linux*) usegcc
case "${CC9:-gcc}" in
tcc)
cc=tcc
cflags="-c -g"
;;
esac
;;
it should suffice, yes!
https://github.com/9fans/plan9port/blob/be7c68f6954f7dcaa53403e0f600716f65a13d32/bin/9c#L115-L122
some linux distributions (e.g. chimera linux) use clang as a default toolchain. this means 9c can't be used as is