Reasons to still not build buildworld buildkernel via system-clang --John Baldwin notes one I was unaware of
Mark Millard
marklmi at yahoo.com
Thu Oct 18 15:27:32 UTC 2018
I described to John Baldwin what I know of for why clang is
not yet appropriate to buildworld buildkernel for powerpc64
and powerpc:
QUOTE
Unfortunately, clang is broken in other ways for buildworld
buildkernel use for targeting powerpc64 or powerpc:
A) it silently ignores __builtin_eh_return(offset,handler)
and so produces system-library code that is broken
relative to handling thrown C++ exceptions.
B) it produces types of linkage for buildkernel that
FreeBSD does not handle, leading to dynamic loads
of .ko files that crash the system. (Back in clang
4 days it did not have this problem and I was
running kernels built by clang.)
END QUOTE
John Baldwin reported back something of which I was unaware:
QUOTE
It will also get the TLS model wrong for powerpc. Both MIPS and powerpc
have an implicit default to PIC mode and llvm interprets this implicit
PIC to mean that it should use dynamic TLS models (intended for use in
shared libraries) always. GCC only uses dynamic models if -fPIC is
explicitly passed on the command line. I have a hack to force the TLS model
for static libraries and binaries for MIPS in bsd.*.mk that isn't in-tree,
but it really needs to be fixed in clang and llvm.
END QUOTE
I wonder if there is anything in llvm's bugzilla about this, or
FreeBSD's bugzilla for that matter.
Are there other known issues not covered by the above 3?
===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)
More information about the freebsd-ppc
mailing list